Question: Q4. Modified Programming Exercise 5.31 (page 198) (15 marks) (Display calendar using loop, user defined functions, top-down design) Write a program that prompts the user
Q4. Modified Programming Exercise 5.31 (page 198) (15 marks) (Display calendar using loop, user defined functions, top-down design) Write a program that prompts the user to enter the year and the first day of the year and output the calendar table for the year to a text file. You should follow the steps described below. a) Develop an algorithm in pseudo language that specifies the main steps at the top level. b) Apply the top-down design principle to refine non-trivial steps in the main algorithm into separate algorithms for sub-steps. c) If there are still non-trivial steps in the sub-steps, do further refinement to them as necessary. d) Implement your algorithm in a C++ program. The top-level algorithm will be implemented as the main( ) function, and other algorithms as user defined functions. e) Answers to a), b) and c) will be put in the program as heading comments for the corresponding functions.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
