Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

IN Java Quarterly Sales Statistics Write a program that lets the user enter four quarterly sales figures for six divisions of a company. The figures

IN Java Quarterly Sales Statistics Write a program that lets the user enter four quarterly sales figures for six divisions of a company. The figures should be stored in a two-dimensional array. Once the figures are entered, the program should display the following data for each quarter: - A list of the sales figures by division - Each division's increase or decrease from the previous quarter (this will not be dis- played for the first quarter) - The total sales for the quarter - The company's increase or decrease from the previous quarter (this will not be dis- played for the first quarter) - The average sales for all divisions that quarter - The division with the highest sales for that quarter Input Validation: Do not accept negative numbers for sales figures. OUTPUT SHOULD BE LIKE THIS:

Enterdivision1'ssalesfigureforquarter1:432 Enterdivision1'ssalesfigureforquarter2:443 Enterdivision1'ssalesfigureforquarter3:654 Enterdivision1'ssalesfigureforquarter4:865 Enterdivision2'ssalesfigureforquarter1:234 Enterdivision2'ssalesfigureforquarter2:986 Enterdivision2'ssalesfigureforquarter3:458 Enterdivision2'ssalesfigureforquarter4:764 Enterdivision3'ssalesfigureforquarter1:889 Enterdivision3'ssalesfigureforquarter2:234 Enterdivision3'ssalesfigureforquarter3:564 Enterdivision3'ssalesfigureforquarter4:974 Enterdivision4'ssalesfigureforquarter1:643 Enterdivision4'ssalesfigureforquarter2:653 Enterdivision4'ssalesfigureforquarter3:434 Enterdivision4'ssalesfigureforquarter4:835 Enterdivision5'ssalesfigureforquarter1:953 Enterdivision5'ssalesfigureforquarter2:423 Enterdivision5'ssalesfigureforquarter3:754 Enterdivision5'ssalesfigureforquarter4:893 Enterdivision6'ssalesfigureforquarter1:678 Enterdivision6'ssalesfigureforquarter2:652 Enterdivision6'ssalesfigureforquarter3:946 Enterdivision6'ssalesfigureforquarter4:835 ===QuarterlySalesFigures=== ----------- LISTING ----------- Division:1 ----------- Quarter1:432 Quarter2:443(+11) Quarter3:654(+211) Quarter4:865(+211) Division:2 ----------- Quarter1:234 Quarter2:986(+752) Quarter3:458(-528) Quarter4:764(+306) Division:3 ----------- Quarter1:889 Quarter2:234(-655) Quarter3:564(+330) Quarter4:974(+410) Division:4 ----------- Quarter1:643 Quarter2:653(+10) Quarter3:434(-219) Quarter4:835(+401) Division:5 ----------- Quarter1:953 Quarter2:423(-530) Quarter3:754(+331) Quarter4:893(+139) Division:6 ----------- Quarter1:678 Quarter2:652(-26) Quarter3:946(+294) Quarter4:835(-111) ----------- STATS ----------- Quarter1 Total:3829 Average:638.17 Highestsales:division5(953) Quarter2 Total:3391(-438) Average:565.17 Highestsales:division2(986) Quarter3 Total:3810(+419) Average:635.00 Highestsales:division6(946) Quarter4 Total:5166(+1356) Average:861.00 Highestsales:division3(974)

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

Database Systems For Advanced Applications 17th International Conference Dasfaa 2012 Busan South Korea April 2012 Proceedings Part 1 Lncs 7238

Authors: Sang-goo Lee ,Zhiyong Peng ,Xiaofang Zhou ,Yang-Sae Moon ,Rainer Unland ,Jaesoo Yoo

2012 Edition

364229037X, 978-3642290374

More Books

Students also viewed these Databases questions

Question

Why We Form Relationships Managing Relationship Dynamics?

Answered: 1 week ago