//File : monthApplication.cpp //Author : Andre Long //Due : October 20, 2004 //Description : This application will demonstrate the month class from CH14pc4 #include #include #include"month.h" #include"myString.h" using namespace std; void main() { MyString nameOfMonth; MyString nameOfMarriedMonth; month startMonth; int month1; int month2; int currentMonth; int desiredMonths; int numericMarriedMonth; int countMonths = 0; month i; cout<<"What is the name of the month you were born? "; cin>>nameOfMonth; cout<>birthdayMonth; //overloaded insertion operator cout<>month1; cout<<"How many months would you like to spend in jail? "<>month2; month jailMonth(month1); for(int i=month1; i<(month1+month2); i++) { ++jailMonth; //prefixed increment operator } cout<<"The month you get out is "<>currentMonth; cout<>desiredMonths; cout<>nameOfMarriedMonth; marriedMonth.setMonthName(nameOfMarriedMonth); //demonstrate set function cout<>numericMarriedMonth; marriedMonth.setMonthNumber(numericMarriedMonth); //demonstrate set function month currentMonthObject(currentMonth); cout<<"The current month is "<>currentMonth; month statetax(currentMonth); cout<<"Month(s) you need records for are : "<