PROGRAM: OLD SCHOOL Monthly Cell Phone Bill: This program is to generate an old school monthly...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
PROGRAM: OLD SCHOOL Monthly Cell Phone Bill: This program is to generate an old school monthly cell phone bill for an old school cell phone company (think late 1990s). By old school I mean from the old days when they charged per minute and all plans weren't unlimited minutes. A cell phone company has two different plans available for its customers (for simplicity, assume the phones do calls only, no texts or pictures etc.): Plan 1 (500 min plan): The base cost of this plan is: $24.99 per month. This plan has 500 free minutes of cell phone calls per month provided. Additional minutes used during the month in excess of 500 cost $0.18 (18 cents) per minute. Plan 2 (Unlimited min plan): For $59.99 per month, an unlimited number of minutes for cell phone calls are provided. Write a program that computes and displays a customer's monthly cell phone bill based on the type of plan they have and how many minutes they used for the month. 1. The program should begin by declaring the variables needed for the program and initializing them if necessary. Make sure and think about what variables your program will need and declare them to be the correct data type. Read all of the directions and then come back and determine which variables you might need. HINTS on some variables you will need: you'll need a variable for the customer name, you'll need a variable to hold the user input for the minutes used, you'll need a variable to hold the base cost of the plan, you'll need a variable to hold the excess minutes cost, and you'll need a variable to hold the total plan cost. You should also add more variables as you need them. 2. The program should then display the following menu: CELLPHONE BILL GENERATOR 1) PLAN 1: 500 Minute Plan 2) PLAN 2: 3) Quit the program Please make a selection: Unlimited Minute Plan -Store the user's selection in a variable named selection. 2. The program should then display the following menu: CELLPHONE BILL GENERATOR 1) PLAN 1: 2) PLAN 2: 3) Quit the program Please make a selection: 500 Minute Plan Unlimited Minute Plan -Store the user's selection in a variable named selection. ♦ If the user selections choice 1 or 2 the NEXT step is: to ask the user the name of the customer. You must do this next!! Don't change the order. (HINT: if you get stuck look at the additional topics Chapter 2 lecture slides) If the user selects choice 1: ♦ 1. Ask the user how many minutes the customer used for the month and save the user's input. Calculate the base cost of the customer's plan for the month. (24.99 for Plan 1) Next calculate the cost of any excess minutes the customer used for the month (minutes in excess of 500). Note: if the customer used 500 or fewer minutes for the month the cost of the excess minutes should equal zero. 2. 3. If the user selects choice 2: 1. Calculate the base cost of the customer's plan for the month. (59.99 for Plan 2) 2. The excess minutes cost for Plan 2 is always zero since minutes are unlimited. If the user enters a choice that is NOT 1,2, or 3: print an error message that says: You have made an invalid selection. If the user selects choice 3 to "Quit the Program": display a message thanking the user for using the program and end the program. 2 If the user selected choice 1 or choice 2 the final step is to print the customer's invoice (if the user chose to quit the program or made an invalid selection you should NOT print the invoice): The invoice should look similar to the one(s) below (there is an example output shown for each type of plan). Make sure and print all the data shown in the invoice examples below. NOTE: the customer's name should NOT always be John Smith or Jane Doe, it should be the customer name the USER entered. The formatting of the invoice doesn't have to be perfect but should use the formatting methods we learned in class and be as close as possible to the format. NOTE: there is a way to only print the invoice one time in your code. Example Output #1: The example below is for a customer on Plan 1 that talked 600 minutes during the month. CELL PHONE BILL CUSTOMER: John Smith Base Cost: 100 Extra Minutes: TOTAL COST: Base Cost: 0 Extra Minutes: $24.99 $18.00 Example Output # 2: The example below is for a customer on Plan 2. CELL PHONE BILL CUSTOMER: Jane Doe TOTAL COST: $42.99 $59.99 $0.00 $59.99 Note: For this program, you are required to use Scanner to get user input (I have a reason - sorry dialog box fans!). Don't forget to format your output using the DecimalFormat class (do NOT use printf). (There are different ways to correctly do the program so no two programs should look exactly the same - if two (or more!) programs look too similar you may be asked to explain your code.) Don't forget to Test Your Program! Turn in the Following: Submit your java file on Canvas. Do NOT submit the .class file (you will not get to do the program over if you do that!!). Do not forget to submit your java file and double check you submitted the right file. Submitting the wrong file is not an excuse to re-do the program. PROGRAM: OLD SCHOOL Monthly Cell Phone Bill: This program is to generate an old school monthly cell phone bill for an old school cell phone company (think late 1990s). By old school I mean from the old days when they charged per minute and all plans weren't unlimited minutes. A cell phone company has two different plans available for its customers (for simplicity, assume the phones do calls only, no texts or pictures etc.): Plan 1 (500 min plan): The base cost of this plan is: $24.99 per month. This plan has 500 free minutes of cell phone calls per month provided. Additional minutes used during the month in excess of 500 cost $0.18 (18 cents) per minute. Plan 2 (Unlimited min plan): For $59.99 per month, an unlimited number of minutes for cell phone calls are provided. Write a program that computes and displays a customer's monthly cell phone bill based on the type of plan they have and how many minutes they used for the month. 1. The program should begin by declaring the variables needed for the program and initializing them if necessary. Make sure and think about what variables your program will need and declare them to be the correct data type. Read all of the directions and then come back and determine which variables you might need. HINTS on some variables you will need: you'll need a variable for the customer name, you'll need a variable to hold the user input for the minutes used, you'll need a variable to hold the base cost of the plan, you'll need a variable to hold the excess minutes cost, and you'll need a variable to hold the total plan cost. You should also add more variables as you need them. 2. The program should then display the following menu: CELLPHONE BILL GENERATOR 1) PLAN 1: 500 Minute Plan 2) PLAN 2: 3) Quit the program Please make a selection: Unlimited Minute Plan -Store the user's selection in a variable named selection. 2. The program should then display the following menu: CELLPHONE BILL GENERATOR 1) PLAN 1: 2) PLAN 2: 3) Quit the program Please make a selection: 500 Minute Plan Unlimited Minute Plan -Store the user's selection in a variable named selection. ♦ If the user selections choice 1 or 2 the NEXT step is: to ask the user the name of the customer. You must do this next!! Don't change the order. (HINT: if you get stuck look at the additional topics Chapter 2 lecture slides) If the user selects choice 1: ♦ 1. Ask the user how many minutes the customer used for the month and save the user's input. Calculate the base cost of the customer's plan for the month. (24.99 for Plan 1) Next calculate the cost of any excess minutes the customer used for the month (minutes in excess of 500). Note: if the customer used 500 or fewer minutes for the month the cost of the excess minutes should equal zero. 2. 3. If the user selects choice 2: 1. Calculate the base cost of the customer's plan for the month. (59.99 for Plan 2) 2. The excess minutes cost for Plan 2 is always zero since minutes are unlimited. If the user enters a choice that is NOT 1,2, or 3: print an error message that says: You have made an invalid selection. If the user selects choice 3 to "Quit the Program": display a message thanking the user for using the program and end the program. 2 If the user selected choice 1 or choice 2 the final step is to print the customer's invoice (if the user chose to quit the program or made an invalid selection you should NOT print the invoice): The invoice should look similar to the one(s) below (there is an example output shown for each type of plan). Make sure and print all the data shown in the invoice examples below. NOTE: the customer's name should NOT always be John Smith or Jane Doe, it should be the customer name the USER entered. The formatting of the invoice doesn't have to be perfect but should use the formatting methods we learned in class and be as close as possible to the format. NOTE: there is a way to only print the invoice one time in your code. Example Output #1: The example below is for a customer on Plan 1 that talked 600 minutes during the month. CELL PHONE BILL CUSTOMER: John Smith Base Cost: 100 Extra Minutes: TOTAL COST: Base Cost: 0 Extra Minutes: $24.99 $18.00 Example Output # 2: The example below is for a customer on Plan 2. CELL PHONE BILL CUSTOMER: Jane Doe TOTAL COST: $42.99 $59.99 $0.00 $59.99 Note: For this program, you are required to use Scanner to get user input (I have a reason - sorry dialog box fans!). Don't forget to format your output using the DecimalFormat class (do NOT use printf). (There are different ways to correctly do the program so no two programs should look exactly the same - if two (or more!) programs look too similar you may be asked to explain your code.) Don't forget to Test Your Program! Turn in the Following: Submit your java file on Canvas. Do NOT submit the .class file (you will not get to do the program over if you do that!!). Do not forget to submit your java file and double check you submitted the right file. Submitting the wrong file is not an excuse to re-do the program.
Expert Answer:
Answer rating: 100% (QA)
Heres the program with variable declarations and menu display Python Declare variables customername minutesused 0 basecost 00 excessminutescost 00 totalplancost 00 selection 0 Initialize base cost bas... View the full answer
Related Book For
Posted Date:
Students also viewed these programming questions
-
Managing Scope Changes Case Study Scope changes on a project can occur regardless of how well the project is planned or executed. Scope changes can be the result of something that was omitted during...
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
(b) (i) What is the smallest natural number n, such that n!> 2" (ii) Prove that n !> 2" is true any natural number greater than or equal that number. (c) Given a finite set of natural numbers ACN....
-
Harker Company manufactures automobile components for the worldwide market. The company has three large production facilities in Virginia, New Jersey, and California, which have been operating for...
-
In the Excel file Call Center Data, how strongly is length of service correlated with starting age?
-
Electrons are accelerated from rest through an \(8000 \mathrm{~V}\) potential difference. By what factor would their de Broglie wavelength increase if they were instead accelerated through a \(2000...
-
1. Cisco Systems went from a push to a pull approach to its supply chain after the dot-com debacle. How are these two approaches different? Does it depend on the state of the economy, which one...
-
Caesar's information system can be used to access whether the placement of slot machines affects profitability. Who would use this information?
-
Sally and Martha co-teach 4 th grade elementary students. They are interested in determining whether their counting intervention is more effective when they focus on math exercises versus science...
-
Taxpayers contribute via revenues which help to finance the school via local, state, and federal funding True False
-
Can you please help me? Explain the difference between: Short-runandlong-runaggregate demand Short-runandlong-runaggregate supply Reviewthefollowingwebpageson WhiteNova-ThinkEconomics...
-
The use of analytical procedures Select answer from the options below is required during risk assessment. is prohibited during risk assessment. is optional during risk assessment. is most effective...
-
Rewrite this: Utilization of Resources: Organizations like the AICPA have developed resources for educating students the accounting profession from high school through college. These resources...
-
THIS RECORD IS USED IN THE HELTHCARE ORGANIZATION EACH TO DOCUMENT EACH DOCMENT OF MEDICATION THAT IS GIVEN TO THE PATUUET THEIR HOSPITLATION
-
Alhamra Enterprises would like to start a new product line will cost $30k today. The expected duration of the project is 8 years and discount rate is 15%. Cash inflows will be $20k per year for 8...
-
Give the products of the following reaction, where T is tritium: dioldehydrase Ad- CH CH3C-COH CoIII) coenzyme B12
-
Can you conclude a relationship between the class of vertebrate and whether it is endangered or threatened? Use the 0.05 level of significance. Is there a different result for the 0.01 level of...
-
The table below shows the number of students (in thousands) participating in various programs at both two-year and four-year institutions. At = 0.05, can it be concluded that there is a relationship...
-
To the left of z = 2.11 Find the area under the standard normal distribution curve.
-
Which of the following mechanisms of evolution consistently causes populations to become more adapted to their environments? (a) natural selection (b)mutation pressure (c) genetic drift (d) gene flow
-
Which of the following provides evidence for evolution? (a) changes in the coloration of peppered moth populations over time (b) the presence of vestigial eyes in cave salamanders (c) the fact that...
-
Photosynthesizing plants are (a) heterotrophs. (b) autotrophs. (c) chemoautotrophs. (d) archaeans.
Study smarter with the SolutionInn App