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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started