Write a complete C++ program to create a music player. Your program should read in several...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Write a complete C++ program to create a music player. Your program should read in several album names, each album has up to 5 tracks as well as a genre. First declare genre for the album as an enumeration with at least three entries. Then declare an album structure that has five elements to hold the album name, genre, number of tracks, name of those tracks and track location. You can use the template given below, but highly recommended to use your own variable names and enumeration list. enum genre{ pop, Jazz, Classic}; struct album { string album name; genre kind; int track number; string tracks [51; string tracklocation; } ; Declare a vector (user determines the number of albums at the runtime) of type album to create database for album. In main you should have four option: Option 1: call a function add_album - it allows the user to enter the album details. Option 2: call a function named print_all_album to print out the album details. Option 3: call a select_track_to_play function that allows the user to choose an album and then a track to play. It should print out: When the user selects a track to play your program must call an external program to play the track. Option 4: Quit Enter the option: 1 to add an album 2 to print the album details 3 to play a track fron an album 4 to exit Enter albun name Dangerous Enter genre 0-> pop, 1 -> Jazz, 2 -> Classic Enter nunber of tracks in the album 3 Enter the names for these 3 tracks BlackOrlhite HealTheWorld Who IsIt Enter the file location of these tracks track folderi Enter the opt ion: 1 to add an album 2 to print the album details 3 to play a track from an album 4 to exit : Dangerous Name of the album Genre of the album : pop No. of tracks Tracks are : BlackorWhite HealTheWorld Who IsIt Tracks are located at track_folderi : 3 Enter the option: 1 to add an album 2 to print the album details 3 to play a track fron an album 4 to exit Enter album name Thriller Enter genre 0-> pop, 1 -> Jazz, 2 -> Classic Enter nunber of tracks in the album Enter the P.Y.T. Beatit BillieJean HumanNature Enter the file location of these tracks track_folder2 anes for these 4 tracks Screen shot continue in the next page, these screen shots are taken from a single run. Write a complete C++ program to create a music player. Your program should read in several album names, each album has up to 5 tracks as well as a genre. First declare genre for the album as an enumeration with at least three entries. Then declare an album structure that has five elements to hold the album name, genre, number of tracks, name of those tracks and track location. You can use the template given below, but highly recommended to use your own variable names and enumeration list. enum genre{ pop, Jazz, Classic}; struct album { string album name; genre kind; int track number; string tracks [51; string tracklocation; } ; Declare a vector (user determines the number of albums at the runtime) of type album to create database for album. In main you should have four option: Option 1: call a function add_album - it allows the user to enter the album details. Option 2: call a function named print_all_album to print out the album details. Option 3: call a select_track_to_play function that allows the user to choose an album and then a track to play. It should print out: When the user selects a track to play your program must call an external program to play the track. Option 4: Quit Enter the option: 1 to add an album 2 to print the album details 3 to play a track fron an album 4 to exit Enter albun name Dangerous Enter genre 0-> pop, 1 -> Jazz, 2 -> Classic Enter nunber of tracks in the album 3 Enter the names for these 3 tracks BlackOrlhite HealTheWorld Who IsIt Enter the file location of these tracks track folderi Enter the opt ion: 1 to add an album 2 to print the album details 3 to play a track from an album 4 to exit : Dangerous Name of the album Genre of the album : pop No. of tracks Tracks are : BlackorWhite HealTheWorld Who IsIt Tracks are located at track_folderi : 3 Enter the option: 1 to add an album 2 to print the album details 3 to play a track fron an album 4 to exit Enter album name Thriller Enter genre 0-> pop, 1 -> Jazz, 2 -> Classic Enter nunber of tracks in the album Enter the P.Y.T. Beatit BillieJean HumanNature Enter the file location of these tracks track_folder2 anes for these 4 tracks Screen shot continue in the next page, these screen shots are taken from a single run.
Expert Answer:
Answer rating: 100% (QA)
Source Code include include using namespace std enum genrepopJa... View the full answer
Related Book For
Basic Business Statistics Concepts and Applications
ISBN: 978-0132168380
12th edition
Authors: Mark L. Berenson, David M. Levine, Timothy C. Krehbiel
Posted Date:
Students also viewed these accounting questions
-
Write a program that stores names and telephone numbers in a database. Write another program that stores names and addresses in a database. Modify the programs to use external, conceptual, and...
-
Write a program that stores names and dates of birth in a database. Extend the program so that it stores the format of the data in the database; in other words, create a system catalog. Provide an...
-
Your landlord has read up on the benefits of electric heat pumps, and has decided to replace your ancient 45,000 BTU/hr gas furnace with a 1500W electric heat pump space heater (which has both space...
-
The accompanying table shows proportions of computer salespeople classified according to marital status and whether they left their jobs or stayed over a period of 1 year. a. What is the probability...
-
Analyze Singing Valleys strategy and its problem. At the minimum, include the following in your response: a. An analysis of the five forces of the Singing Valley market. Make and justify any...
-
Calculate the gain with and without feedback for an FET amplifier as in Fig. 14.7 for circuit values R1, = 800k(, R2 = 200k(, Ro = 40k(, RD = 8k(, and gm = 5000 (S.
-
Explain the idea behind meansends analysis. Compare it with search as a planning method. Which more closely matches the methods people use when formulating plans in everyday life?
-
The Noonan Corporation prepares quarterly financial statements and invests its excess funds in marketable securities. At the end of 2006 Noonan's portfolio of investments available for sale consisted...
-
You have started a company and are in lucklong dasha venturecapitalist has offered to invest. You own 100% of the company with4.73 million shares. The VC offers $1.14 million for 780,000 newshares....
-
1. What is your assessment of the financial performance of Nelson Nurseries? 2. Do you agree with Christine Barton?s accounts-payable policy? 3. What explains the erosion of the cash balance? 4. What...
-
(a) What is plane polarised light? Two polaroids are placed at 90 to each other and the transmitted intensity is zero. What happens when one more polaroid is placed between these two, bisecting the...
-
Please show your work and explain how you got your answer along the way. Do not simply show an answer or show a picture of an excel spreadsheet please. The following table gives data on daily dollar...
-
A pharmaceutical company is studying the possibility of satisfying its electrical and thermal requirements using cogeneration. There are several possible configurations to carry out cogeneration,...
-
A municipal drinkign water service authority is adding softening to its water treatment. The facility is treating the water flow of 18,000 m3/d with the following hardness/alkalinity: Ca2 =347 mg/L;...
-
Metabolic Effect Effects of Insulin on Carbohydrate and Lipid Metabolism Glucose uptake (muscle, adipose) Glucose uptake (liver) Glycogen synthesis (liver, muscle) Glycogen breakdown (liver, muscle)...
-
firms market share % HHI <2100 HHI aftrer Lg &HTC merger HHI after huawei & nokia merger samsung 30 apple 24 huawei 16 LG 15 yota 5 htc 4 motorola 3 nokia 2 others 1 total 100 What is the value of...
-
Ethan bought a new car worth $54,000. After 5 years, the car was worth $28,497.52. Calculate the annual depreciation rate of Ethan's car.
-
Use the graphs of f and g to graph h(x) = (f + g) (x). To print an enlarged copy of the graph, go to MathGraphs.com. 1. 2. y 24 8. 2. -2 -2 4 6
-
In Problem 13.8 on page 531, you used annual revenues to predict the value of a baseball franchise. Perform a residual analysis for these data (stored in BBRevenue). Based on these results, evaluate...
-
One of the variables most often included in surveys is income. Sometimes the question is phrased "What is your income (in thousands of dollars)?" In other surveys, the respondent is asked to "Select...
-
Toby's Trucking Company determined that the distance traveled per truck per year is normally distributed, with a mean of 50 thousand miles and a standard deviation of 12 thousand miles. 1. What...
-
On 1 June, Sugar Rush Ltd had Accounts Receivable and Allowance for Doubtful Debts accounts as below. GST Inclusive. The following transactions occurred during the month of June: 5. Credit sales...
-
On 1 June, Cambria Financial Services Ltd had balances in the Accounts Receivable and Allowance for Doubtful Debts accounts as set out below. Ignore GST. The following transactions occurred during...
-
Outback Get Away Ltd sells four-wheel drive accessories and recovery equipment on credit. The accounting records at 30 June 2023 highlights the following. Ignore GST. In the past, the companys yearly...
Study smarter with the SolutionInn App