Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question: Write the Java program for the given pseudocode. Using exactly 1 constant integer, 4 double variables, and 1 Scanner variable make sure to fulfill

image text in transcribed

Question: Write the Java program for the given pseudocode. Using exactly 1 constant integer, 4 double variables, and 1 Scanner variable make sure to fulfill the following points: 1. Declare 1 constant integer called MONTHS, and set it to 12. 2. Declare 1 double variable called monthly. 3. Declare 1 double variable called annual. 4. Declare 1 double variable called costPerYear. 5. Declare 1 double variable called saving. 6. Declare 1 Scanner variable that will record keyboard inputs. 7. Prompt the user through the console for entering the prices of annual and monthly subscription and store the user's inputs in the variables annual and monthly (use the same format and wording in the sample figure below). 8. Record the cost per year (costPerYear) with monthly subscription as the result of MONTHS * monthly. 9. Record the saving as the result of costPerYear - annual. 10. Output in the console a blank line followed by the message The cost per year is $ for monthly subscription. If you choose annual subscription, you will save $ per year. where and are the values stored in the corresponding variables. The boxes below illustrate how your program should behave and appear. Enter the prices of annual and monthly subscription? 100015 7 The cost per year is $180.0 for monthly subscription. If you choose annual subscription, you o will save $80.0 per year

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

More Books

Students also viewed these Databases questions