Department
of Computer Science.
CSc 2311
J. L. Bhola
Due
Note: (1) For all assignments, always use comments to explain your program.
(2) No copying allowed. If it is found that students copy from each other, all of these programs will get 0.
(3)
You must use the name given to name your
program.
Should you use a different name, you would lose 10% of what
the program is worth.
Description
of program:
Here
are some requirements
for the program:
The
program must display a
menu consisting of the following:
(a)
Add a user’s input number
of days to the default
date and display the new date and old (default) date. Say if the new Date is a leap
year.
(b)
Subtract a user’s input number
of days from the default
date and display the new date and old (default) date. Say if the new Date is a leap
year.
(c)
Add user’s input number
of months to the default
date and display the new date and old (default) date. Say if the new Date is a leap
year.
(d)
Subtract a user’s input number
of months from the
default date and display the new date and old (default) date. Say
if the new Date is a leap year.
(e)
Add a user’s input number
of years to the default
date and display the new date and old (default) date. Say if the new Date is a leap
year.
(f)
Subtract a user’s input number
of years from the default
date and display the new date and old (default) date. Say if the new Date is a leap
year.
(g)
Compare two user’s
input dates and display
these dates with an appropriate message if date1 == Date2, Date1 <
Date2 or
Date1 > Date2.
(h)
Quit.
1.
A 3.5
inches floppy disk (IBM compatible) consisting of
the .cpp and the .exe files. MAKE SURE THAT
YOUR DISK IS VIRUS CLEAN.
2.
A print out of each of the
.cpp
file (source code) and .h (header file) if you used separate files.
3.
Make sure that your name is written clearly
both on the print out and
the disk.
4.
Make sure that both the .cpp and .exe files
are on the root directory
i.e. on the a:\ drive.
Example:
a:\ cal_date.cpp
a:\
cal_date.exe
And if you use
separate files for the Date object, then
a:\Date.cpp
a:\Date.h
Should you use
any subdirectory (whatsoever) your program would not be graded and you
will
receive a 0 (zero).