Problem Solving Assignment
Total Page:16
File Type:pdf, Size:1020Kb
Assignment #1
DT211/1 - Program Design
Objective: Design an IT solution for a music reading and playing a tune system.
Specification:
The system take in a string of characters, e.g. defffefa2abacaded
And it will scan in each of the characters one at a time, and determine if the character is an alphabetical character ('a'-'z'), or a numerical character ('0'-'9'). If it is not either of those two types of characters, e.g. a dash ('-'), a colon (':'), or a semi-colon (';') then we ignore that character.
Assume there is a function as follows;
PLAY NOTE X FOR DURATION Y; if there is no number following a note (e.g. 'd') we give it a duration of 1, but if there is a number after the note (e.g. 'a2'), then we give it the duration of that note.
Try to express your solution in as much detail as possible, highlighting any potential data structures you may deem suitable, and identify possible input errors that you are trapping. Also explain how the program will know it has reached the end of the tune.
Assignment Submission: 1. Explain what background reading you undertook to understand the system (if any). 2. Explain in simple English how the system will work. 3. Draw a flowchart for the design of this system. 4. Write the pseudo-code to follow the flowchart. 5. Highlight the benefits of your approach, the drawbacks of your approach, and any alternatives you could have undertaken.
Submission Date and Details: You are required to submit by 8th November 2011. You will submit your assignment accompanied by Labs #1-5 and Tutorials #1-3 using the template file on this webpage. Your submission will be in all of the following three ways (1) using webcourses, (2) by email with an email heading PROGRAM DESIGN ASSIGNMENT, and (3) print out and hand up to my in class your completed submission.
Please Note: This is an individual assignment. Do your own work. Any student suspected of copying or plagiarising another piece of work will be dealt with by the DIT code of ethical conduct.