Question: In C programming In this assignment you are required to implement a for CD a store. The store wants to keep for each artist a
In this assignment you are required to implement a for CD a store. The store wants to keep for each artist a list of For each CD a CD number (int), title (char l200, and a count (int) of the stock will be stored in the database. Each CD should have a unique number. For each artist, artist name (char 1200 and a list of CD's will be stored. write a program that implements this database. Use Structs. To make it easy, approach the program development in various phases You should present the user with a menu that allows him/her to do the following operations: 10 Stock a new CD 2) Print the details of an artist 3) Search a CD 4) Sell a CD 5) Quit When the user selects the first menu item, your program must ask the following information of the new CD: 1. Artist name 2. CD number 3. CD title 4. The amount to be stocked. If the artist's record already exists in the database, your program should add the new CD to the list of CD's of the artist in CD number order the CD's are kept in ascending order of CD numbers and remember that CD numbers are unique). If the artist doesn't exist in the database, you need to add the artist information and create the list with one CD. When the user selects the second menu item, your program should ask the name of the artist and print the details of all of hisher CDs in the stock. (e. the number, title, count) When the user selects the third menu item, your program should ask the CD number and print its details (ie. artist name, title, count in stock if it is in store. If the CD is not in store your program should print an appropriate message. When the user selects the fourth menu item, your program should ask the CD number, search the database and if it is found, it should decrement the amount in stock by one, this amount is zero, then that CD should be deleted from the list. An appropriate message should be printed to the screen after the purchase, or if the purchase could not be made. When the user selects the fifth menu item, your programs ends
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
