Question: Using C++ Create a Video Store We need to write a program for a Video Store. The Video Store will do the following tasks: Rent

Using C++ Create a Video Store

We need to write a program for a Video Store. The Video Store will do the following tasks:

Rent a video; that is, check out a video.

Return, or check in, a video.

Create a list of videos owned by the store.

Show the details of a particular video.

Print a list of all the videos in the store.

Check whether a particular video is in the store.

Maintain a customer database.

Print a list of all the videos rented by each customer.

The video store has two major components: videos and customers. The class videoType will be used to implement a video. The common things associated with a video are as follows:

Title of the movie

Names of the stars

Name of the producer

Name of the director

Name of the production company

Number of copies in the store

The basic operations on an object of type videoType are as follows:

Set the video information that is, the title, stars, production company, and so on.

Show the details of a particular video.

Check the number of copies in the store.

Check out (that is, rent) the video. 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 video. To check in a video, first we must check whether the store owns such a video and, if it does, increment the number of copies by one.

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

The class customerType will be used to implement a customer. The customer object stores information about a customer, such as the first name, last name, account number, and a list of videos rented by the customer.

The basic operations on an object of type customerType are as follows:

Print the name, the account number, and the list of rented videos.

Set the name and the account number.

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

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

Show the account number.

The video store will maintain various lists:

A list of all the videos in the store.

A list of all the stores customers.

Lists of the videos currently rented by each customer

Use a function createVideoList in the main program to read the videos data from a provided videos input file and create a linked list of videos. The function will do this using the following steps:

1 Read the videos data and store it in a video object.

2 Insert the video in the list.

3 Repeat Steps 1 and 2 for each videos data in the file.

Use another function, createCustomerList, to read the customers data from a provided customers input file and create a list of customers.

Use the function displayMenu to inform the user what to do. It contains the following output statements:

Select one of the following:

1: To check whether the store carries a particular video

2: To check out a video

3: To check in a video

4: To check whether a particular video is in stock

5: To print only the titles of all the videos

6: To print a list of all the videos

9: To exit

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!