Question
Youve been hired by Music Magicians to write a C++ console application that manages song data. The application stores the following information for each song:
Youve been hired by Music Magicians to write a C++ console application that manages song data. The application stores the following information for each song:
Title
Year released
Download cost
The data may be stored in parallel arrays or in an array of structs.(PLEASE USE ARRAY OF STRUCTS). In either case, you can assume that no more than 100 songs will be stored at any given time. Present the following menu to the user:
Music Magicians Menu
1 Add song
2 Edit song
3 Delete song
4 List songs
9 Exit
Enter an option:
Here are what the options do:
? Add song prompts for and gets from the user a song title, year released, and download cost*. If the song title already exists in the data, it prints an error message. If the song title doesnt exist in the data, it adds it, and prints a confirmation message.
? Edit song prompts for and gets from the user a song title and searches the data for the title. If the song title doesnt exist in the data, it prints an error message. If the song title exists in the data, it prompts for and gets from the user a new year released and download cost*. It changes the data and prints a confirmation message.
? Delete song prompts for and gets from the user a song title and searches the data for the title. If the song title doesnt exist in the array list, it prints an error message. If the song title exists in the data, it removes it and prints a message.
? List songs shows all song data formatted in three columns with column headers. It then lists the number of songs and the total download cost.
? Exit ends the application.
Continue to process menu options until the user enters option 4.
* Validate the data so that:
Year released is between 1900 and 2020
Download cost is between 0.01 and 3.99
Any data from the user outside these ranges must be rejected and the user reprompted until each datum is valid (use validation loops).
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