Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Beginning ASP.NET 2.0 And Databases

Authors: John Kauffman, Bradley Millington

1st Edition

0471781347, 978-0471781349

More Books

Students also viewed these Databases questions

Question

Provide examples of Dimensional Tables.

Answered: 1 week ago