Question: 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

 Question: Write the Java program for the given pseudocode. Using exactly

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

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 Databases Questions!