Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Use a menu to offer the user a choice between the different types of audio files. This file type menu must consist of the first

Use a menu to offer the user a choice between the different types of audio files. This file type menu must consist of the first outputs when your program begins executing. If the user enters a choice that is not on the audio file type menu, display an error and immediately terminate the program. The file type menu format must match the ones in the Sample Run Videos. See Sample Run Video E for an example of how the file type menu error messaging must look in your program.If the user chooses a MP3, the program must do the following:
Your program must use a menu to offer the user a choice between different MP3 file quality bitrates. On this platform, MP3s can be stored in the following bitrates: Standard Quality -160kbps, Premium Quality -192kbps, or Ultra Quality -320kbps. If the user enters a choice that is not on the MP3 file quality menu, display an error and immediately terminate the program. The MP3 bitrate menu must match the ones in the Sample Run Videos. See Sample Run Video F for an example of how the MP3 file quality menu must look in your program.
If the user selects a valid MP3 file quality from the menu, use the appropriate named constant for the MP3 bitrate based on the table of bitrates above.
Otherwise, if the user chooses a WAV file, the program must do the following:
Your program must use a menu to offer the user a choice between different WAV file sound types. On this platform, WAV files can have the following sound types: Mono (single channel) or Stereo (dual channel). If the user enters a choice that is not on the WAV file sound type menu, display an error and immediately terminate the program. The WAV file sound type menu must match the ones in the Sample Run Videos. See Sample Run Video G for an example of how the WAV file sound type menu must look in your program.Once a valid WAV file sound type is selected, the program must use another menu to offer the user a choice between different WAV file quality bitrates. On this platform, WAVs can be stored in the following bitrates: Standard -16 bit, 44.1 kHz, Premium -24 bit, 48 kHz, or Ultra -24 bit, 96 kHz. If the user enters a choice that is not on the WAV file quality menu, display an error and immediately terminate the program. The WAV bitrate menu must match the ones in the Sample Run Videos. See Sample Run Video H for an example of how the WAV file quality menu must look in your program.If the user selects a valid WAV file sound type and WAV file quality from the previous two menus, use the appropriate named constant for the WAV bitrate based on the table of bitrates above. Once valid information for the MP3 or WAV audio file is entered per the previous step (and subsequent sub steps), the duration of the recording must be entered in minutes and seconds. On this platform, the maximum duration for any recording is 180 minutes. To get the input of the minutes and seconds do the following:First, use an output to ask the user for the input of the whole minutes of the recording. See Sample Run Videos A, B, C, and/or D for examples of how the prompt for the input of the minutes must look in your program. Validate the input of the whole minutes of the recording so that the program terminates immediately if fewer than 0 minutes are entered or more than 180 minutes are entered. See Sample Run Video I for an example of how the input of the minutes must be validated in your program.If the user enters a duration of 180 minutes, skip the input of the seconds below. See Sample Run Videos C and/or D for examples of the user entering 180 minutes for the length of the recording.If the user enters a number of minutes that is less than 180 minutes, then use an output to ask the user for the input of the whole seconds of the recording (in addition to the minutes previously entered). See Sample Run Videos A and/or B for examples of how the prompt for the input of the seconds must look in your program.Validate the input of the whole seconds of the recording so that the program terminates immediately if fewer than 0 seconds are entered or more than 60 seconds are entered. See Sample Run Video J for an example of how the input of the seconds must be validated in your program.Once the minutes and / or seconds of the recording are entered, convert the duration to a decimal number by using the following conversion equation: duration = minutes + seconds /60.0. NOTE: Use type casting to ensure the conversion is stored as a float or double.Once the duration of the recording has been calculated in the previous step, calculate the base subtotal based on the rates in the table of base subtotals above.Calculate the file size by multiplying the appropriate bitrate constant based on step 1 and the duration that was entered in step 2(and subsequently calculated in step 3.Calculate the cost per minute of the stream by dividing the subtotal from step 4 by the duration calculated in step 3.Calculate the cost per MB of the stream by dividing the subtotal fromstep4
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Harness The Power Of Big Data The IBM Big Data Platform

Authors: Paul Zikopoulos, David Corrigan James Giles Thomas Deutsch Krishnan Parasuraman Dirk DeRoos Paul Zikopoulos

1st Edition

0071808183, 9780071808187

More Books

Students also viewed these Databases questions