A shop owner has 2 outlets namely a High Street Branch and Mall Branch, before Covid19 lockdown the respective shops recorded sales as follows:
High Street Branch
Quarter Sales
Q1 42,000 48,000 50,000
Q2 52,000 58,000 60,000
Q3 46,000 49,000 58,000
Q4 50,000 51,000 61,000
Mall Branch
Quarter Sales
Q1 57,000 63,000 60,000
Q2 70,000 67,000 72,000
Q3 67,000 65,000 62,000
Q4 72,000 69,000 75,000
As a programmer hired by the shops’ owner, write a java program to calculate:
(a) the monthly combine sales figures for both shops;
(b) the respective shops annual sales figures;
(c) the grand annual combine total sales figures.

Recommended Answers

All 3 Replies

What is the question here?

commented: We should write a java program calculating the monthly combine sales, annual sales and the grand annual sales of the information given +0

I see your comment but there is no question yet. Maybe you are asking others to write what looks like homework or an assignment but didn't state that. That's OK, here's the part from the Community Rules about homework:

Do provide evidence of having done some work yourself if posting questions from school or work assignments

Show your work, state where you got stuck and keep what your example small so others can see what the issues are.

commented: Noted. Thank you +0

You just have to create a two-dimensional array shop ID by month. Use IDs 0 and 1 for the 2 shops. Use IDs 0 to 11 for the months.
Assign the correct values to each cell of the array.
Use for loops to sum the elements of the array in 3 different ways depending on which shop or shops or periods you are summing.
Print out the results.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.