Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Question 1: Use the class Novel to complete the following task. Implement Event class for selling novels as follows: 1. The member variables: - event
Question 1: Use the class Novel to complete the following task. Implement Event class for selling novels as follows: 1. The member variables: - event id: int. - event location: string. - number of novels: int. It is unknown and can vary from one event to another. - novels: Novel array, its size is the number of novels. 2. An Event class constructor that receives: event number and location. You have to use this pointer. 3. A member function void SetNovels( novels * n, int num_of_novels) which sets the novels for the event according to received array of novels. Note that this function can be used to change the novels as well. 4. A Destructor for Event Class. 5. copy constructor. 6. A member function Get TotalPrice which returns the sum of all novels price in the same event. Lab Assignment # 8 7. A friend function removeNovelFromEvent(Event& currentEvent, int i): this function remove the ith novel from the array novels in the currentEvent object and shifts remaining Novels. i should be in a proper range. Note: you have to create new Novel array. 8. A friend function printDetails(Event& e) to print the details of the event
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