You work for an online song distribution company. 2. Code a modular program that will accept an order of playlists that allows users to pick the platform and the number of songs in the playlist. 3. Your program will calculate the total of the order of playlists. 4. Do not accept any values for playlists other than the possible menu options. Use the table below to calculate the individual playlist costs. Playlist Platform Playlist length Cost Per Playlist Jim Bob’s Pretty Good Music Three Songs $2.23 Five Songs $3.99 Ten Songs $6.69 Suzy Bob’s Better Music Three Songs $3.52 Five Songs $5.05 Ten Songs $8.77 In In addition to main, the program must contain the following functions:  getPlaylists() o Ask the user how many playlists will be ordered. Validate the input of the number of playlists so that the user must enter at least one playlist before proceeding with the program. Function must return the validated number of playlists.  getPlatform() o Use a menu to prompt the user for the streaming platform. This should be done using a function that accepts a number for the current playlist number and displays the playlist platform menu. This function must prompt the user for a selection and return the choice. User must be given an unlimited number of chances to enter a valid playlist platform choice. Function must return the validated streaming platform.  getPlaylistLength() o Prompt the user for the playlist length using a menu. This should be done using a function that accepts the current playlist number. User must be given an unlimited number of chances to enter a valid playlist length. Function must return the validated playlist length.  calculatePlaylistCost() o Include a function that calculates the cost of a playlist. This function should accept the streaming platform and the playlist length. Function must return the mask cost. Use global constants stored as lists for the cost of playlist amounts. Calculate and display the total cost of the order of all playlists. Dollar amounts should be properly formatted. Input and Output (formatting, spacing, and indentation should be as shown below) – Input is in bold Enter the number of playlists (min: 1): -99 ** ERROR: INVALID NUMBER OF PLAYLISTS ** Enter the number of playlists: 3 Select from one of the following streaming platforms: 1. Jim Bob’s 2. Suzy Bob’s Please choose the streaming platform for playlist #1: 3 ** ERROR: INVALID STREAMING PLATFORM ** Select from one of the following streaming platforms: 1. Jim Bob’s 2. Suzy Bob’s Please choose the streaming platform for playlist #1: 1 Select from one of the following playlist lengths: 1. 3 Songs 2. 5 Songs 3. 10 Songs Please choose the length of playlist #1: -1 ** ERROR: INVALID PLAYLIST LENGTH ** Select from one of the following playlist lengths: 1. 3 Songs 2. 5 Songs 3. 10 Songs Please choose the length of playlist #1: 1 The total of all playlists: $2.23

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

 1. You work for an online song distribution company. 2. Code a modular program that will accept an order of playlists that allows users to pick the platform and the number of songs in the playlist. 3. Your program will calculate the total of the order of playlists. 4. Do not accept any values for playlists other than the possible menu options. Use the table below to calculate the individual playlist costs. Playlist Platform Playlist length Cost Per Playlist Jim Bob’s Pretty Good Music Three Songs $2.23 Five Songs $3.99 Ten Songs $6.69 Suzy Bob’s Better Music Three Songs $3.52 Five Songs $5.05 Ten Songs $8.77 In In addition to main, the program must contain the following functions:  getPlaylists() o Ask the user how many playlists will be ordered. Validate the input of the number of playlists so that the user must enter at least one playlist before proceeding with the program. Function must return the validated number of playlists.  getPlatform() o Use a menu to prompt the user for the streaming platform. This should be done using a function that accepts a number for the current playlist number and displays the playlist platform menu. This function must prompt the user for a selection and return the choice. User must be given an unlimited number of chances to enter a valid playlist platform choice. Function must return the validated streaming platform.  getPlaylistLength() o Prompt the user for the playlist length using a menu. This should be done using a function that accepts the current playlist number. User must be given an unlimited number of chances to enter a valid playlist length. Function must return the validated playlist length.  calculatePlaylistCost() o Include a function that calculates the cost of a playlist. This function should accept the streaming platform and the playlist length. Function must return the mask cost. Use global constants stored as lists for the cost of playlist amounts. Calculate and display the total cost of the order of all playlists. Dollar amounts should be properly formatted. Input and Output (formatting, spacing, and indentation should be as shown below) – Input is in bold Enter the number of playlists (min: 1): -99 ** ERROR: INVALID NUMBER OF PLAYLISTS ** Enter the number of playlists: 3 Select from one of the following streaming platforms: 1. Jim Bob’s 2. Suzy Bob’s Please choose the streaming platform for playlist #1: 3 ** ERROR: INVALID STREAMING PLATFORM ** Select from one of the following streaming platforms: 1. Jim Bob’s 2. Suzy Bob’s Please choose the streaming platform for playlist #1: 1 Select from one of the following playlist lengths: 1. 3 Songs 2. 5 Songs 3. 10 Songs Please choose the length of playlist #1: -1 ** ERROR: INVALID PLAYLIST LENGTH ** Select from one of the following playlist lengths: 1. 3 Songs 2. 5 Songs 3. 10 Songs Please choose the length of playlist #1: 1 The total of all playlists: $2.23

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 5 steps with 3 images

Blurred answer
Follow-up Questions
Read through expert solutions to related follow-up questions below.
Follow-up Question

The total of all playlists needs to be $2.23 how do we fix this?

Solution
Bartleby Expert
SEE SOLUTION
Knowledge Booster
Software Development
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education