Member variables: • int day; • int month; • int year; Member functions: • setDate: Takes three arguments: the day, month, and year. Sets the day, month, and year members of the object. Do not allow values to be negative, day to be greater than 31, and month to be greater than 12. • printDate: Uses cout to print the data in the format "dd/mm/yyyy". You need to include iostream to your Date.cpp file to do this. • Getters for the members. Event should have the following: Member variables: • Date "eventDate; Note: Make sure your Event class has a pointer to a Date and not a Date object on the stack. • tring eventName: • int startHour: Uses a 24-hour clock, so should be a value between 0 and 23 • int endHour: Uses a 24-hour clock, so should be a value between 0 and 23 Member functions: • printEvent. Use cout to print all info about this event. The name of the event, the start and end times (you can simply print their value i.e. from 14 to 16) and the Date. • etters and Getters for the member variables. • A constructor which takes a string for the name, ints for the start and end hours, and a pointer to a Date object. Make sure the end hour is larger than the start hour. • A destructor which deletes the object eventDate points to. Note: For sake of simplicity, each event will only take one day. Each event will also not go over midnight, so startHour must be less than endHour. For example, an event that starts at 2pm and ends at 4pm would have a startHour of 14 and an endHour of 16.
Member variables: • int day; • int month; • int year; Member functions: • setDate: Takes three arguments: the day, month, and year. Sets the day, month, and year members of the object. Do not allow values to be negative, day to be greater than 31, and month to be greater than 12. • printDate: Uses cout to print the data in the format "dd/mm/yyyy". You need to include iostream to your Date.cpp file to do this. • Getters for the members. Event should have the following: Member variables: • Date "eventDate; Note: Make sure your Event class has a pointer to a Date and not a Date object on the stack. • tring eventName: • int startHour: Uses a 24-hour clock, so should be a value between 0 and 23 • int endHour: Uses a 24-hour clock, so should be a value between 0 and 23 Member functions: • printEvent. Use cout to print all info about this event. The name of the event, the start and end times (you can simply print their value i.e. from 14 to 16) and the Date. • etters and Getters for the member variables. • A constructor which takes a string for the name, ints for the start and end hours, and a pointer to a Date object. Make sure the end hour is larger than the start hour. • A destructor which deletes the object eventDate points to. Note: For sake of simplicity, each event will only take one day. Each event will also not go over midnight, so startHour must be less than endHour. For example, an event that starts at 2pm and ends at 4pm would have a startHour of 14 and an endHour of 16.
Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
Related questions
Question
C++ Question
Hello Please answer the attached C++
Please create the code yourself. Thank you.
![In your program's Source.cpp, create a vector that holds Event objects (Hint: Recall from lecture 18, we discussed
adding objects to an array. You can also add objects to a vector in a similar way). In main, the user has the following
choices:
• Add an event to the vector. Ask the user for the date info (day, month, year) start and end time (the user should
enter values between 0 and 23) and the name of the event: If there is already an event in the vector on the given
date and its time overlaps the event the user is trying to add, print out the info about that event and do not add the
new event.
• Cancel an event: The user will type in the name of the event to cancel. Remove the event from the vector (if it
exists).
• View all events: In a loop, print the info of all the events currently planned.
Quit](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F0d46332a-4771-46b4-8cc3-bfaffe8066c3%2F62d636ae-a277-456d-8357-ab1e60aa1510%2Fpzox7un_processed.jpeg&w=3840&q=75)
Transcribed Image Text:In your program's Source.cpp, create a vector that holds Event objects (Hint: Recall from lecture 18, we discussed
adding objects to an array. You can also add objects to a vector in a similar way). In main, the user has the following
choices:
• Add an event to the vector. Ask the user for the date info (day, month, year) start and end time (the user should
enter values between 0 and 23) and the name of the event: If there is already an event in the vector on the given
date and its time overlaps the event the user is trying to add, print out the info about that event and do not add the
new event.
• Cancel an event: The user will type in the name of the event to cancel. Remove the event from the vector (if it
exists).
• View all events: In a loop, print the info of all the events currently planned.
Quit
![You will be writing a scheduling application allowing a convention center to schedule events at their location. This
program will contain two different classes: Date and Event. Both classes should have .h and .cpp files: You will have five
files in total.
The Date class should have the following:
Member variables:
• int day;
• int month;
• int year;
Member functions:
• setDate: Takes three arguments: the day, month, and year. Sets the day, month, and year members of the object. Do
not allow values to be negative, day to be greater than 31, and month to be greater than 12.
• printDate: Uses cout to print the data in the format "dd/mm/yyyy". You need to include iostream to your Date.cpp
file to do this.
• Getters for the members.
Event should have the following:
Member variables:
• Date *eventDate; Note: Make sure your Event class has a pointer to a Date and not a Date object on the stack.
• tring eventName:
• int startHour: Uses a 24-hour clock, so should be a value between 0 and 23
• int endHour: Uses a 24-hour clock, so should be a value between 0 and 23
Member functions:
• printEvent. Use cout to print all info about this event. The name of the event, the start and end times (you can
simply print their value i.e. from 14 to 16) and the Date.
• Setters and Getters for the member variables.
• A constructor which takes a string for the name, ints for the start and end hours, and a pointer to a Date object.
Make sure the end hour is larger than the start hour.
• A destructor which deletes the object eventDate points to.
Note: For sake of simplicity, each event will only take one day. Each event will also not go over midnight, so startHour
must be less than endHour. For example, an event that starts at 2pm and ends at 4pm would have a startHour of 14 and
an endHour of 16.](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F0d46332a-4771-46b4-8cc3-bfaffe8066c3%2F62d636ae-a277-456d-8357-ab1e60aa1510%2F7w5cufl_processed.jpeg&w=3840&q=75)
Transcribed Image Text:You will be writing a scheduling application allowing a convention center to schedule events at their location. This
program will contain two different classes: Date and Event. Both classes should have .h and .cpp files: You will have five
files in total.
The Date class should have the following:
Member variables:
• int day;
• int month;
• int year;
Member functions:
• setDate: Takes three arguments: the day, month, and year. Sets the day, month, and year members of the object. Do
not allow values to be negative, day to be greater than 31, and month to be greater than 12.
• printDate: Uses cout to print the data in the format "dd/mm/yyyy". You need to include iostream to your Date.cpp
file to do this.
• Getters for the members.
Event should have the following:
Member variables:
• Date *eventDate; Note: Make sure your Event class has a pointer to a Date and not a Date object on the stack.
• tring eventName:
• int startHour: Uses a 24-hour clock, so should be a value between 0 and 23
• int endHour: Uses a 24-hour clock, so should be a value between 0 and 23
Member functions:
• printEvent. Use cout to print all info about this event. The name of the event, the start and end times (you can
simply print their value i.e. from 14 to 16) and the Date.
• Setters and Getters for the member variables.
• A constructor which takes a string for the name, ints for the start and end hours, and a pointer to a Date object.
Make sure the end hour is larger than the start hour.
• A destructor which deletes the object eventDate points to.
Note: For sake of simplicity, each event will only take one day. Each event will also not go over midnight, so startHour
must be less than endHour. For example, an event that starts at 2pm and ends at 4pm would have a startHour of 14 and
an endHour of 16.
Expert Solution
![](/static/compass_v2/shared-icons/check-mark.png)
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 2 steps
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
Recommended textbooks for you
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
![Concepts of Database Management](https://www.bartleby.com/isbn_cover_images/9781337093422/9781337093422_smallCoverImage.gif)
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
![Prelude to Programming](https://www.bartleby.com/isbn_cover_images/9780133750423/9780133750423_smallCoverImage.jpg)
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
![Sc Business Data Communications and Networking, T…](https://www.bartleby.com/isbn_cover_images/9781119368830/9781119368830_smallCoverImage.gif)
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY