Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C. (40 points) Define a new class called Event using class composition. The class Event consists of four private member variables: string name string location

C. (40 points) Define a new class called Event using class composition. The class Event consists of four private member variables: string name string location Date date Time time The class Event should also include the following public member functions: 1. print to print the even name, location, date, and time information. 2. setEvent to set the event name, location, date, and time using two string parameters, one Date parameter, and one Time parameter. 3. setEventName to set the event name according to the parameter. 4. getEventName to return the event name. 5. setLocation to set the event location according to the parameter. 6. getLocation to return the event location. 7. setDate to set the event date using a Date object. 8. getDate to return the date, a Date object. 9. setTime to set the event time using a Time object. 10. getTime to return the time, a Time object. 11. equalEventDate to compare two event dates. Return true if they are the same, otherwise, return false. 12. A default constructor to initialize name and location to None. (The default constructor of Date and Time will be automatically invoked.) 13. An overloaded constructor that initializes name, location, date, and time according to the parameters (two string parameters, one Date parameter, and one Time parameter). D. (20 points) In the client program, you should write statements to test your class implementation including the following functions in the Event class: default constructor, overloaded constructor, mutator functions, accessor functions, and equalEventDate function. : You should submit a ZIP file that contains seven files on the following names: Time.h Time.cpp Date.h Date.cpp Event.h Event.cpp hw4main.cpp.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2019 Wurzburg Germany September 16 20 2019 Proceedings Part 2 Lnai 11907

Authors: Ulf Brefeld ,Elisa Fromont ,Andreas Hotho ,Arno Knobbe ,Marloes Maathuis ,Celine Robardet

1st Edition

3030461467, 978-3030461461

More Books

Students also viewed these Databases questions

Question

List the common input, output and communication devices.

Answered: 1 week ago

Question

13-1 How does building new systems produce organizational change?

Answered: 1 week ago