Question: If - Else - If - Statement Audlobooks.cs An online audiobook service provider has three different subscription packages for its customers: Package A: For $

If-Else-If-Statement
Audlobooks.cs
An online audiobook service provider has three different subscription packages for its customers:
Package A: For $9.95 per month, 10 audiobooks are provided. Additional books are $2.00 per book.
Package B: For $13.95 per month, 20 audiobooks are provided. Additional books are $1.00 per book.
Package C. For $19.95 per month, unlimited audiobook access is provided.
Write a program that calculates a customer's monthly bill using an If-Else-If statement. It should:
Ask the user to enter the letter of the package the customer fias purchased (A, B, or C)
Ask the user to enter the number of audiobooks that were read
Display the total charges
Display a message indicating that the wrong input was entered (i.e., if someone enters F)
Variable declarations o Constant double variable for the following:
Each subscription base price
Book price for additional books for each relevant subscription package
Number of books included for each relevant subscription package o choice - char input from user o
numBooks- int input from user o totalCharges - double calculated total
Other o Rename your file as Audiobooks.cs
The constant variables should replace hard coded data, including in the calculations o
Account for uppercase or lowercase input
Hint: there are a couple ways to do this:
string has a couple methods
modify your conditional statement (but do not create a separate condition for upper and lowercase)
Format the output to 2 decimal places
Run and test your program
**BONUS: In the if-else-if statement, only the final else condition contains a write statement.
If - Else - If - Statement Audlobooks.cs An

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!