Question: Lets think that Company XYZ produces t-shirts. Develop a Java application that will input sales revenue and a total number of products sold (both as
Lets think that Company XYZ produces t-shirts. Develop a Java application that will input sales revenue and a total number of products sold (both as integers) for each year. The program should calculate and display the selling price of the product for each year. Additionally, in the end, the program prints total sales revenue, a total number of products sold, and combined selling price. All calculations should produce floating-point results. Use class Scanner and sentinel-controlled iteration to obtain the data from the user.
Sample input: for the first-year sales revenue is 1000, the total number of products sold 10, for the second-year sales revenue is 2000, the total number of products sold 10)
It will print: Selling price for the first year is $100.00 (1000/10) Selling price for the second year is $200.00 (2000/10) Total sales revenue is $3000.00 (1000+2000) Total number of products sold is 20.00 (10+10) Combined selling price is $150.00 (3000/20)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
