Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Programming Language: C++ You are to develop a C++ code for the CD store to keep track of its CDs and customers. The store manager

Programming Language: C++

You are to develop a C++ code for the CD store to keep track of its CDs and customers. The store manager want someone to write a program for their system so that the CD store can function. The program should be able to perform the following operations:

1 Return, or check in, a CD.

2 Create a list of CDs owned by the store.

3 Show the details of a particular CD.

4 Print a list of all of the CDs in the store.

5 Check whether a particular CD is in the store.

6 Maintain a customer database.

7 Print a list of all of the CDs rented by each customer.

We also need to maintain the following lists:

1 A list of all of the CDs in the store.

2 A list of all of the stores customers.

3 Lists of the CDs currently rented by the customers.

The programming requirement tells us that the CD store has two major components: CDs and customers. We will describe these two components in detail. The common things associated with a CD are as follows:

1 Name of the movie

2 Name of the stars

3 Number of copies in the store

From this list, we see that some of the operations to be performed on a CD object are as follows:

1 Set the CD informationthat is, the title, stars and so on.

2 Show the details of a particular CD.

3 Check the number of copies in the store.

4 Check out (that is, rent) the CD. In other words, if the number of copies is greater than zero, decrement the number of copies by one.

5 Check in (that is, return) the CD. To check in a CD, first we must check whether the store owns such a CD and, if it does, increment the number of copies by one.

6 Check whether a particular CD is availablethat is, check whether the number of copies currently in the store is greater than zero.

The details of implementing the customer component are as follows. Set the name and account number, and the list of rented CDs.

1 Print the name, account number, and the list of rented CDs.

2 Rent a CD; that is, add the rented CD to the list.

3 Return a CD; that is, delete the rented CD from the list.

4 Show the account number.

The deletion of a CD from the CD list requires that the list be searched for the CD to be deleted. Thus, we need to check the title of a CD to find out which CD is to be deleted from the list. For simplicity, we assume that two CDs are the same if they have the same title. This program requires us to maintain a list of all of the CDs in the store. We also should be able to add a new CD to our list. In general, we would not know how many CDs are in the store, and adding or deleting a CD from the store would change the number of CDs in the store.

It will be great if I get code instead of its screenshot. Thank you.

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

Oracle Databases On The Web Learn To Create Web Pages That Interface With Database Engines

Authors: Robert Papaj, Donald Burleson

11th Edition

1576100995, 978-1576100998

More Books

Students also viewed these Databases questions

Question

+ NaOMe E lim ? ination

Answered: 1 week ago

Question

1. Identify three communication approaches to identity.

Answered: 1 week ago

Question

d. Who are important leaders and heroes of the group?

Answered: 1 week ago

Question

3. Describe phases of minority identity development.

Answered: 1 week ago