CSCI 261VA – Project 6 – Missing functions added with output file
(CSCI 261 VA) Project Six Solution
This project will help the students to reinforce the knowledge from
Chapter Six of the textbook.
Objectives:
1. Understand and apply top-down design concept
2. Implement the functions according to specified requirements
3. Understand and apply file output stream to output information to
file
4. Test and debug the functions
Problem Description:
Project Six is a continuation of project Five, which will allow the user to
print out a calendar for any given year to the screen and to the file.
A template cpp file will be given. The template file already implements
the functionality to print out calendar on screen. The students just need
to understand the template file and implement / modify couple
functions.
Please study the template file first. It contains the solution to project five.
Once you understand the template file and answer three questions in it,
you will understand more about project five and this project six.
Please run the demo to see how the program will run. Due date will be
announced on Blackboard.
Sample Run for Project Six
***************************************************
* Menu *
* 1. Query a date *
* 2. Print calendar of a given month *
* 3. Print calendar of a given year *
* 4. Print calendar of a given year to file *
* 5. Quit *
***************************************************
Please enter your choice: 1
Enter the date in form of mm dd yyyy: 10 25 2016
October 25 , 2016 is Tuesday
***************************************************
* Menu *
* 1. Query a date *
* 2. Print calendar of a given month *
* 3. Print calendar of a given year *
* 4. Print calendar of a given year to file *
* 5. Quit *
***************************************************
Please enter your choice: 2
Enter the month and year in form of mm yyyy: 10 2016
October, 2016
SUN MON TUE WED THU FRI SAT
1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31
***************************************************
* Menu *
* 1. Query a date *
* 2. Print calendar of a given month *
* 3. Print calendar of a given year *
* 4. Print calendar of a given year to file *
* 5. Quit *
***************************************************
Please enter your choice: 3
Enter the year as yyyy: 2016
January, 2016
SUN MON TUE WED THU FRI SAT
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31
Febraury, 2016
SUN MON TUE WED THU FRI SAT
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29
March, 2016
SUN MON TUE WED THU FRI SAT
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31
April, 2016
SUN MON TUE WED THU FRI SAT
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
May, 2016
SUN MON TUE WED THU FRI SAT
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31
June, 2016
SUN MON TUE WED THU FRI SAT
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30
July, 2016
SUN MON TUE WED THU FRI SAT
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31
August, 2016
SUN MON TUE WED THU FRI SAT
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31
September, 2016
SUN MON TUE WED THU FRI SAT
1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30
October, 2016
SUN MON TUE WED THU FRI SAT
1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31
November, 2016
SUN MON TUE WED THU FRI SAT
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30
December, 2016
SUN MON TUE WED THU FRI SAT
1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31
***************************************************
* Menu *
* 1. Query a date *
* 2. Print calendar of a given month *
* 3. Print calendar of a given year *
* 4. Print calendar of a given year to file *
* 5. Quit *
***************************************************
Please enter your choice: 4 2016
Enter the year as yyyy:
Calendar of year 2016 has be print to file hzeng.txt
***************************************************
* Menu *
* 1. Query a date *
* 2. Print calendar of a given month *
* 3. Print calendar of a given year *
* 4. Print calendar of a given year to file *
* 5. Quit *
***************************************************
Please enter your choice: 5
Thank you for using Zeng’s calendar program!
Program ended with exit code: 0