Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Im not sure how to proceed with this part of the question. However I was able to do Question 1 to 4. In C++ please

Im not sure how to proceed with this part of the question. However I was able to do Question 1 to 4. In C++ please and adding comments would be very much helpful!

Q5. ReferenceManager Create a class called ReferenceManager that will be used as a container to hold objects of classes Article, Book, and TextBook. 1. ReferenceManager has a fixed capacity. It uses a fixed size array to store References. 2. The first reference added to the container will be added at position zero, the second one at position 1, and so on. A reference is always added at the next available position; 3. A ReferenceManager has one regular constructor: ReferenceManager(int capacity). The constructor must create an array of size capacity, which will be used to store References. It will also initialize the instance variables that your implementation requires. 4. ReferenceManager will have size data member, which will track the number of references in the array. 5. bool add(Reference & reference): adds a reference at the next available position and returns true, or returns false if the reference manager is full. 6. int get(int pos): returns the identifier of the Reference object stored at position pos of the ReferenceManager. You can assume that pos is a valid index, i.e. 0 <= pos < size; 7. bool delete(int pos): removes the element at position pos of this ReferenceManager and returns true, or returns false if pos was not a valid index. It must also shift the elements of the array towards the beginning of the array; 8. bool search(int id); return true if the reference with identifier id exists, false otherwise

In summary, Q1 was the base class "Reference" with member functions set and get ID, set and get title, set and get author, set and get year of publication

Q2 was a derived class of Reference "Article" with member functions set and get startPage, set and get endPage, getnumofPages

Q3 was a derived class of Reference "Book" with member functions set and get publisher, getnumofPages,

Q4 was a derived class of Book "TextBook" with member functions set and get URL.

Key Notes: All the classes should have At least a default constructor, a copy constructor and a destructor Accessing functions A print function

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

Database Design Application And Administration

Authors: Michael Mannino, Michael V. Mannino

2nd Edition

0072880678, 9780072880670

More Books

Students also viewed these Databases questions

Question

3. SCC Soft Computer

Answered: 1 week ago

Question

2. KMPG LLP

Answered: 1 week ago

Question

5. Wyeth Pharmaceuticals

Answered: 1 week ago