Partial preview of the text
Download Structured Program Development in C -Assignment | CS 350 and more Assignments Computer Science in PDF only on Docsity!
CS 350: Computer SYSTEM CONCEPTS PROGRAMMING ASSIGNMENT 1 DATE ANNOUNCED: FER, 12, 2009 Duc 2 Fes. 24,2009, 5:00pm (HARDCOPY OF DOCUMENTATION - IN CLASS) : Fes. 26,2009, 11:59PM (PROGRAMS & DOCUMENTATION ~— SUBMIT COMMAND) MAXIMUM MARK: 100 Problems are taken from the reconemended book for the HM. Deitel and P.J. Deitel, C: How to Program, Prenti Language Parl: Hall, Upper Saddle River, NJ, 1994, 2001. Question 1 (Data Encryption) 15 marks Exercise 3.46, pp. 99 Question 2 (Computer Aided Instruction) 20 marks 2a, Exercise 5.32, pp. 190 2b. Exercise 5.33, pp. 190 Question 3 (Palindromes) 20 marks 3a, Exercise’533, pp. 248 (With recursion) 3b. Exercise 5°33, pp. 248 (Without recursion — Le. solve the same problem, but without using recursion) & Question 4 (Eight Queens) 35 marks Lxercise 6.26, pp. 246 ‘You are required to do the following: (1) Print out an empty chessboard at the beginning (2) Display the Table of Elimination Numbers at the beginning (3) After each successful placement, show the status of the chessboard. Indicate the queens currently on the board by using their numbers (1. 2. ..., 8). Your program can stop after finding and displaying one valid placement for all the eight queens. [Hint : You might think of using different functions, l’or instance, we could use a different function for each of the following: compute the Table of imination Numbers, print (display) the chessboard, check for valid placement, etc.] ‘You can represent the 8x8 chessboard with a two-dimensional array. Question 4 (Bonus Mark) 5 marks Exercise 6.27, pp. 246 Programming Style 10 marks Marks will be given for good programming style, exception handling, and special considerations for improving the program beyond the stated requirement. ‘he maximum here will be 10 marks. Algorithm Design Phase. For each problem above, you are required to include a documentation of the algorithm you used to solve the problem, before you started to code. The algorithm will carry about 30% of the mark, before we start to consider the programs. This is different from the 10 marks for programming style. Submit algorithm design phase as a text file, or a file in ps, .pdf or Word format. Also, you are required to submit hard copies of your assignment in class as indicated above. Please submit your assignment using the usual swbmit command: Iittp://www.csee.wvi.edu/~adjeruh/c} sfts350/assessment/submit. html