*USING JAVA*  Now, follow the instructions below to create a new program named AriannasAppliances that will ask the user to enter the quarterly sales revenues for each of five appliance types sold by AriannasAppliances. It will then compute the annual sales revenues for each appliance type, total annual sales revenues for the company, and the percentage of the total sales revenues for each appliance type.   Open Eclipse. Create a New  -> Java project.  Name it Chap4-AriannasAppliances  and click Finish and OK. Next, create a New -> Class.  Name it AriannasAppliances and be sure to check the first checkbox under "Which method stubs would you like to create?" and click Finish. Delete the green comment text in the file "AriannasAppliances.java" Add a comment at the top // (your name) Add another comment at the top // Project 4 Add code to the file "AriannasAppliances.java" to create a program that will do the following: use a for-loop to ask the user to enter the quarterly revenues for each appliance type write this information to a file named "AriannasAppliances2022Revenues.txt" as shown below (5 values per line) close the file, this will cause Java to save this file in your project folder Use a while-loop to read back the data from the file "AriannasAppliances2022Revenues.txt" and tally the revenues generated by each appliance type, use while ( inputFile.hasNext() ) Tally the total revenues for the year Report the revenues and the percentage of the total revenues for each appliance type, and the total revenues for the year as shown below                        *Requirement 1:  Use the printf statement to format your monetary values to 2 decimal places. (see Chapter 3 for help as needed)                        *Requirement 2: Test your program to be sure it runs properly and produces all of the output shown below Be sure to check your code against the code submission checklist before submitting to Blackboard.  Write the data to the file using the following format: (quarter1)  dishwasherSales  washerSales  dryerSales  refridgeratorSales  ovenSales (quarter2)  dishwasherSales  washerSales  dryerSales  refridgeratorSales  ovenSales (quarter3)  dishwasherSales  washerSales  dryerSales  refridgeratorSales  ovenSales (quarter4)  dishwasherSales  washerSales  dryerSales  refridgeratorSales  ovenSales After writing to the file, it should look like this (no text or commas, just the 5 values per line):   Your program should produce the following output: ****** Welcome to Ariannas Appliances ****** This program will determine the annual sales revenues for Ariannas Appliances. It will report the sales revenues for each appliance, percentage of total revenues generated by each appliance, and the total sales revenues for 2022.   Enter the revenue sales for 2022 Quarter 1 Dishwashers: 15000 Washers: 16000 Dryers: 17000 Refridgerators: 18000 Ovens: 19000   Enter the revenue sales for 2022 Quarter 2 Dishwashers: 10000 Washers: 11000 Dryers: 12000 Refridgerators: 13000 Ovens: 14000   Enter the revenue sales for 2022 Quarter 3 Dishwashers: 20000 Washers: 21000 Dryers: 22000 Refridgerators: 23000 Ovens: 24000   Enter the revenue sales for 2022 Quarter 4 Dishwashers: 18000 Washers: 19000 Dryers: 20000 Refridgerators: 21000 Ovens: 22000   ***** Ariannas Appliances 2022 ***** Dishwasher Revenues: $63,000.00 (17.75%) Washer Revenues: $67,000.00 (18.87%) Dryer Revenues: $71,000.00 (20.00%) Refridgerator Revenues: $75,000.00 (21.13%) Oven Revenues: $79,000.00 (22.25%) Ariannas Appliances Total Sales Revenues for 2022: $355,000.00

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

*USING JAVA* 

Now, follow the instructions below to create a new program named AriannasAppliances that will ask the user to enter the quarterly sales revenues for each of five appliance types sold by AriannasAppliances. It will then compute the annual sales revenues for each appliance type, total annual sales revenues for the company, and the percentage of the total sales revenues for each appliance type.  

      1. Open Eclipse.
      2. Create a New  -> Java project.  Name it Chap4-AriannasAppliances  and click Finish and OK.
      3. Next, create a New -> Class.  Name it AriannasAppliances and be sure to check the first checkbox under "Which method stubs would you like to create?" and click Finish.
      4. Delete the green comment text in the file "AriannasAppliances.java"
      5. Add a comment at the top // (your name)
      6. Add another comment at the top // Project 4
      7. Add code to the file "AriannasAppliances.java" to create a program that will do the following:
        • use a for-loop to ask the user to enter the quarterly revenues for each appliance type
        • write this information to a file named "AriannasAppliances2022Revenues.txt" as shown below (5 values per line)
        • close the file, this will cause Java to save this file in your project folder
        • Use a while-loop to read back the data from the file "AriannasAppliances2022Revenues.txt" and tally the revenues generated by each appliance type, use while ( inputFile.hasNext() )
        • Tally the total revenues for the year
        • Report the revenues and the percentage of the total revenues for each appliance type, and the total revenues for the year as shown below

                       *Requirement 1:  Use the printf statement to format your monetary values to 2 decimal places. (see Chapter 3 for help as needed)
                       *Requirement 2: Test your program to be sure it runs properly and produces all of the output shown below

Be sure to check your code against the code submission checklist before submitting to Blackboard. 

Write the data to the file using the following format:

(quarter1)  dishwasherSales  washerSales  dryerSales  refridgeratorSales  ovenSales

(quarter2)  dishwasherSales  washerSales  dryerSales  refridgeratorSales  ovenSales

(quarter3)  dishwasherSales  washerSales  dryerSales  refridgeratorSales  ovenSales

(quarter4)  dishwasherSales  washerSales  dryerSales  refridgeratorSales  ovenSales

After writing to the file, it should look like this (no text or commas, just the 5 values per line):


 
Your program should produce the following output:

****** Welcome to Ariannas Appliances ******

This program will determine the annual sales revenues for Ariannas Appliances.

It will report the sales revenues for each appliance, percentage of total revenues generated by each appliance,

and the total sales revenues for 2022.

 

Enter the revenue sales for 2022 Quarter 1

Dishwashers: 15000

Washers: 16000

Dryers: 17000

Refridgerators: 18000

Ovens: 19000

 

Enter the revenue sales for 2022 Quarter 2

Dishwashers: 10000

Washers: 11000

Dryers: 12000

Refridgerators: 13000

Ovens: 14000

 

Enter the revenue sales for 2022 Quarter 3

Dishwashers: 20000

Washers: 21000

Dryers: 22000

Refridgerators: 23000

Ovens: 24000

 

Enter the revenue sales for 2022 Quarter 4

Dishwashers: 18000

Washers: 19000

Dryers: 20000

Refridgerators: 21000

Ovens: 22000

 

***** Ariannas Appliances 2022 *****

Dishwasher Revenues: $63,000.00 (17.75%)

Washer Revenues: $67,000.00 (18.87%)

Dryer Revenues: $71,000.00 (20.00%)

Refridgerator Revenues: $75,000.00 (21.13%)

Oven Revenues: $79,000.00 (22.25%)

Ariannas Appliances Total Sales Revenues for 2022: $355,000.00

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Concept of memory addresses in pointers
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education