Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

new to java, need help with array program

807601Apr 12 2008 — edited Apr 17 2008
hey guys, i'm very new to java and i was given this assignment to do. Now we have been learning about arrays but i'm confused as well on how to connect them and such. So any help will be wonderful. =) This is the assignment listed above all help will be great thanks =)

Problem

The management of a certain chain of supermarkets would like to know on a comparative basis the performance its supermarkets in each city. The data in the following table shows the amount of profit for all of the supermarkets in each city periodically.

City Profit
Miami $10,200,000
Sunrise $14,600,000
Hollywood $17,000,000
Tallahassee $6,700,000
Jacksonville $3,600,000
Orlando $9,100,000

The information required must be presented in the following order:

? The original data set as shown in the table.
? A horizontal bar graph showing the performance for each city, to the nearest million dollars.
? The average profit for the supermarket chain
? The city with the lowest profit.
? The city with the highest profit
? List all those cities with profit at or above the mean.
? The standard deviation of profits.
? List in descending order of profit, the cities and their respective profit.

To carryout this exercise, convince yourself of the following classes:

? GetData ? used to acquire the data values.
? Statistics ? find statistical measures such as: mean, standard deviation, graph, find the largest and smallest profit, and to sort the arrays
? TestStats ? utilizes the other classes in order to generate the report.

Note:
(1) You need two arrays: one for the name of the cities, and the other for the dollar amount.
(2) It is a good practice to preserve the original array, so make a copy of the original data set.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 15 2008
Added on Apr 12 2008
17 comments
384 views