hey guys, i'm writing a program that schedules appointments, cancels them, etc..
i have 6 classes...
appointment- checks to see if an appointment is valid
car- holds all information about a car, reads and prints information
date-uses various functions to convert dates
time-uses various functions to convert times
schedule- schedules all the appointments
customer- keeps track of all the customer information
anyways..when i ask a customer for a date...it needs to be written in as MM/DD/YY..and then converted... but for this particular program we are only working on the days from 01/20/03 to 01/25/03...and for time it needs to be like this XX:YY in military time...open hours are from 8-6.
anyways i want to build in a check to make sure the user enters an appropriate date and time...
but for some reason it only catches certain errors if you enter the inproper month or year its find the error, but for days, and time...it doesnt' find the error...
here's the code i have right now...
thanks for the help...somethings just a little bit off i think...
while (cont == 'y')
cout << "What day would you like to bring the car in
if(date1.GetMonth() == 1 && date1.GetDay() >= 20 &&
date1.GetDay() < 26 && date1.GetYear() == 2003)
cont = 'n';
cout << "What time would you like to bring in the car
if((time1.GetHours() > 8 && time1.GetHours() <= 16) &&
time1.GetMinutes() == 20 || time1.GetMinutes() == 40 ||
time1.GetMinutes() == 00)
cont = 'n';
if(cont == 'y')
cout << "\n\n\tI'm sorry, the date or time you've entered is