Please help me with this project...
I have to structure a school timetable in C++ code. The user has to put the day and the time and the program has to say where should the student be. The program has to say the class after that found the student should be too.
Please, tell me the code example...
Thank you...
I good way to get started is just to chip away at what you know you'll need. For example, based on what you've said you might need. In the description below I'll use "class" to mean a C++ class and "course" to mean the thing that a student takes in school.
- You need a class Course. It might hold the name, start time and end time and day of the course.
- A collection of Courses.
- A function that takes a time and day, and finds the next course in the collection.
- Maybe a function to read all the courses from a file? Where does the schedule come from?
With those pieces, the main program becomes pretty easy:
- read the courses
- prompt the user for a time and da
- call the function to find the next course
- print the course details.