Question: Write a C++ program to display workers schedule for a company. To accomplish this (1) Write a struct Time with attributes (at least) : hours,
Write a C++ program to display workers schedule for a company. To accomplish this (1) Write a struct Time with attributes (at least) : hours, minutes and seconds (using military time). Add other functions or attributes you need to get the job done (2) Write a class Schedule with attributes : Day of week, start_time, end_time and activity. Schedule should have at least (a) Display to display the schedule (b) Length to return the duration of the schedule (ie end_time - start_time), (c) ReadSchedule to read schedule from user (2b) Your program must check that only appropriate numbers are entered for Time in ReadSchedule (default value for hour/minute and second is 0) (2c) Your program should indicate error when end_time < start_time and should not add such schedule to the vector containing the weekly schedules (3) Your program should read list of schedules from a csv file named schedules.csv (a) schedules.csv must contain a schedule per line (day,start-time,end-time,activity) for example Mon,10:30:0,12:15:30,Swimming lesson (the enclosed CSVReader contains a method getCellAsIntArray(':') that returns an array like [hour,min,sec] which you can use to get the time part of the csv) (b) schedules.csv must contain at least two schedules per day of the week (Mon - Sun) (c) YOU MAY NOT DIRECTLY USE MY SCHEDULES.CSV FOR SUBMISSION - YOU MUST PROVIDE YOUR OWN - USING MINE WILL RESULT IN DEDUCTION OF 5 POINTS (4) Create the struct Time and class Schedule in a file named schedule.h which you must include in main.cpp (5) Your program must be able to search for schedule given (a) day of the week (not case sensitive, ie entering MON or Mon or mon or mOn should mean the same thing) (b) activity type (not case sensitive) (c) I have included a file called stringutils.h which contains functions for comparing strings which may be of use to you - feel free to use it (6) Your program should produce EXACTLY the same output as the enclosed program (run sample.exe to see the output). Feel free to customize my Scheduler program provided for version 2 of this project
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
