A text file contains the names of the students and their scores. Write an interactive program that does the followings: 1. Displays a menu list that has five options a.Getting the total number of students; b.Getting the average scores; c. Getting the highest score and the student's name; d. Getting the lowest score and the student's name; e. List the names and scores with the descending order of the scores. f. Quit. 2. Once the user picks one option except option f, the program should display the appropriate information first , then once the user types any key stroke, the menu should reappear. If the users choose option f, then the program terminates.Apply functional decomposition in this project. Specify the function interfaces in the source code. No global variables are allowed. Submit the following files: Design (25%), Source Code(50%), Test plan (20%), and three screen shots. the first screen shot, use input file at http://cms.dt.uh.edu/Faculty/yuans/cours...
Apply functional decomposition in this project?
Functional decomposition in this context refers to breaking the program down into various functions - for example, a function for the menu, a function for option a, another function for b, etc. The alternative would be (if you were using C) to write the entire program in the main function.
Writing an entire program in one function would technically be valid, but the code would not be too readable to someone else, or even yourself after a few days/weeks/years so leads to difficulties in maintaining the software if a new feature needs to be added, or a bug is discovered.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment