Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Problem Statement You are to develop a C++ code for the CD store to keep track of its CDs and customers. The store manager want

image text in transcribed

Problem Statement 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: Return, or check in, a CD. Create a list of CDs owned by the store. Show the details of a particular CD. Print a list of all of the CDs in the store. Check whether a particular CD is in the store. Maintain a customer database. Print a list of all of the CDs rented by each customer. We also need to maintain the following lists: A list of all of the CDs in the store. A list of all of the store's customers. 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: Name of the movie Name of the stars 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: Set the CD information-that is, the title, stars and so on. Show the details of a particular CD. Check the number of copies in the store. 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. 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. Check whether a particular CD is available-that 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. Print the name, account number, and the list of rented CDs. Rent a CD; that is, add the rented CD to the list. Return a CD; that is, delete the rented CD from the list 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. Additional points will be awarded to more interactive console screen designs

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 Driven Web Sites

Authors: Mike Morrison, Joline Morrison

1st Edition

061901556X, 978-0619015565

More Books

Students also viewed these Databases questions

Question

2. Are my sources up to date?

Answered: 1 week ago