Question: Write a Java Program Lets think that Company XYZ produces t-shirts. Develop a Java application that will input sales revenue and total number products sold

Write a Java Program

Lets think that Company XYZ produces t-shirts. Develop a Java application that will input sales revenue and total number products sold (both as integers) for each year. The program should calculate, and display selling price of product for each year and print the combined selling price of product (total sales revenue for all years/total number of products sold for all years) for all years up to this point. All calculations should produce floating-point results. Use class Scanner and sentinel-controlled iteration to obtain the data from user.

Sample input: For the first-year sales revenue is 1000, total number of products sold 10, for the second-year sales revenue is 2000, total number of products sold 20)

Sample output: Selling price of one product for this year is $100

Combined selling price is $10

Selling price of one product for this year is $200

Combined selling price is $30

Please provide the screenshot of the code snippet and also the output.

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!