Answered step by step
Verified Expert Solution
Question
1 Approved Answer
I need help making this program in C++. I have the instructions and examples with txt file Txt.file is here : Two Towers Fantasy Fiction
I need help making this program in C++. I have the instructions and examples with txt file
Txt.file is here :
Two Towers
Fantasy Fiction
PG13
3
Return of the King
Fantasy Fiction
PG13
4
The Fellowship of the Ring
Fantasy Fiction
PG13
1
The Hobbit
Fantasy Fiction
PG13
3
Mandatory Instructions A new DVD store in your neighborhood is about to pen However, it does not have a program to keep track of its DVDs. You have been asked to write a program for their store. The program should be able to the following operations: 1. 2. 3. 4. 5. Rent a DVD; that is, check out a DVD Retun, or check in a DVD Display a list of DVDs owned by the store Show the details of a particular DVD Check whether a particular DVD is in the store DVDs have the following information that will need to be stored for each DVD owned by the store: Title of the movie, genre, movie rating, number of copies owned by the store. Define Node structure to store the necessary information. Data should be allocated dynamically. All such allocated data mst be deallocated when program is finished. The following functions nmst be implemented: CreateDVDLinkedList- read the data file and create the linked list of DVD nodes. List will be maintained in the order data is organized, i.e., do not sort the list. ShowDVDInformation - given pointer to the node, display the DVD information DisplayDVDLibrary- given pointer to the first node. display all DVDs owned by the store (tabular form) FindDVDbyTitle - given pointer to the first node and the title, find and return pointer to the appropriate node in the list or nullptr otherwise. Linear search should be utilized to find given movie title. Checkout -given pointer to the DVD node, decrement number of DVDs currently in the store, if DVD owned by the store and if not 0 already Checkin -given pointer to the DVD node, increment number of DVDs currently in the store if DVD owned by the store. DeleteList- given pointer to the first node deallocate all memory holding the list. Function void CreateDvDLinkedList(Node &) note head pointer is passed by reference void ShoNDVDInformation (Node); void DisplayDVDLibrary (Node); Node FindDvDbyTitle(Node*, string) void Checkout (Node) void CheckIn(Node) void DeleteList (Node) Show ERROR messages when movie is not found, when check out cannot be performed because all DVDs are rented out
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started