Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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 stores 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 informationthat 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 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. 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.

note that the program must be in c++ language. and must be designed by using concepts of data structure and object oriented programing and must be according to dev-c++.

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

JDBC Database Programming With J2ee

Authors: Art Taylor

1st Edition

0130453234, 978-0130453235

More Books

Students also viewed these Databases questions