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. 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. (3) You should store the schedules in a vector (4) Create the struct Time and class Schedule in a file named schedule.h which you must include in main.cpp (5) Your program should produce EXACTLY the same output as the enclosed program (run sample.exe to see the output). Feel free to use the skeletal program I have provided in the enclosed zip file.
Below are the extracted files for main.cpp and schedule.h that i need to work them.
main.cpp
void DisplaySchedule(vector int main(int argc, char** argv) { //FILL IN THE CODES return 0; } schedule.h #pragma once #include using namespace std; struct Time { int Hour; int Minute; int Second; Time():Time(0,0,0){ } //default constructor - "calls" constructor with parameters Time(int hr, int min, int sec) //constructor with parameters { Hour = hr; Minute = min; Second = sec; }; //read time from user void ReadTime() { } //show time void Show() { cout<
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started