Question
hi i need help doing this assignment The management of a certain chain of supermarkets would like to know on a comparative basis the performance
hi i need help doing this assignment
The management of a certain chain of supermarkets would like to know on a comparativebasis the performance of its supermarkets in each city. The data in the followingtableshowsthe amount of profit for all of the supermarkets in each city.
City Profit
Miami$10,200,000.00
Sunrise$14,600,000.00
Hollywood$17,000,000.00
Tallahassee$6,000,000.00
Jacksonville$21,600,000.00
Orlando$9,100,000.00
Gainesville$8,000,000.00
Pensacola$12,500,000.00
Ocala$2,000,000.00
Sebring$4,500,000.00
The information required must be presented in the following order:
1.Make a backup copy of the original arrays.
2.Display the original data set, as shown in the table.
3.The average profit for the supermarket chain.
4.The city with the highest profit.
5.A list of all the cities with profit at, or above the average.
6.The citiesand their profitlisted in descending order of the profits.
7.Make a horizontal graph showing the performance of each supermarketTo carryout this exercise:
(a)Design a class called
Supermarketsthat accepts two arrays
- one containing the names ofthe cities, and the other containing the profits. Write separate methods for each of the
six (6) activitiesstated in the list of requirements.
(b)Design a test class calledTestSupermarketthat creates aSupermarketobject using thearrays as arguments to its constructor. Call the respective methods to carry outtherequirements.
Note create the arrays in the test class by declaration and assignment.
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