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...
-
Let represent a three- dimensional vector of random variables that is uniformly distributed over the unit sphere. That is, (a) Find the constant c. (b) Find the marginal PDF for a subset of two of...
-
Brandon is the production manager of a large manufacturing firm. He is worried about the prospect of bonuses for the upcoming year. The company has paid out bonuses for the past 10 years, so Brandon...
-
Vann Stubbs started Stubbs Carpet Installers, Inc., and during the first month of operations (December 2011) the business completed the following selected transactions: a. Stubbs began the business...
-
The board of trustees of a local church is concerned about the internal accounting controls for the offering collections made at weekly services. The trustees ask you to serve on a three-person audit...
-
1. How did Scudery's ideas on conversation differ from Castiglione's? 2. How did the social and/ or political context of their time impact Scudery's and Castiglione's views on rhetoric and...
-
Many of a bank's customers use its automated banking machine (ABM). During the early evening hours in the summer months, customers arrive at the ABM at the rate of one every other minute (assume...
-
4) Based on your data - A) sort the number of manufacturers from most items to least items; B) indicate next to each manufacturer how many of the 15 items each manufacturer (firm) had; C) calculate...
-
Why is pricing so important in digital platforms and marketplaces?
-
What are currently the most widely used approaches for price setting in the SaaS industry?
-
How are you modeling your monetization, which is shifting from users to usage, in this new world?
-
Why are most SaaS companies not leveraging the full power pricing and packaging science?
-
In which respect are pricing models currently changing in the SaaS industry? Please briefly characterize different pricing models.
-
Emily owns a flower shop. Their monthly revenue is usually constant, except in the month of May, they made arrangements for a large wedding. In the month of February, there was a major snowstorm that...
-
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...
-
Measured data for performance of the reaction turbines at Shasta Dam near Redding, California, are shown in Fig. 10.38. Each turbine is rated at \(103,000 \mathrm{hp}\) when operating at \(138.6...
-
Francis turbine Units 19, 20, and 21, installed at the Grand Coulee Dam on the Columbia River, are very large [55]. Each runner is \(32.6 \mathrm{ft}\) in diameter and contains 550 tons of cast...
-
Conditions at the inlet to the nozzle of a Pelton wheel are \(p=700 \mathrm{psig}\) and \(V=15 \mathrm{mph}\). The jet diameter is \(d=7.5 \mathrm{in}\). and the nozzle loss coefficient is \(K_{\text...
Study smarter with the SolutionInn App