Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

c++ 3 files Question 1: Use the class Novel to complete the following task. Implement Event class for selling novels as follows: 1. The member

c++ 3 files image text in transcribed
image text in transcribed
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 GetTotalPrice which returns the sum of all novels price in the same event. 7. A friend function removeNovelFromEvent(Event& currentEvent, int n): 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

blur-text-image

Get Instant Access with AI-Powered 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

Students also viewed these Databases questions