The Artima Developer Community
Sponsored Link

Java Answers Forum
ARRAY PROBLEM

2 replies on 1 page. Most recent reply: Feb 26, 2003 10:34 AM by dan bromberg

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 2 replies on 1 page
Ernie Douglas

Posts: 18
Nickname: y2j
Registered: Nov, 2002

ARRAY PROBLEM Posted: Feb 21, 2003 7:40 AM
Reply to this message Reply
Advertisement
Can someone explain this to me in more detail please, cause it makes no sense to me at all?

"An estate Agent pays its estate agents basic wages plus commision. the estate agents receive ?1000 per month plus 0.5 percent of their gross sales for that month. for example, an estate agent who has gross income of ?50000 in sales a month receives ?1000 plus 0.5 percent of ?50000, or a total of ?1,250. write a java applet program (using an array of counters) that determines how many of the estate agents earned salaries in each of the following ranges (assume that each estate agent's salary is truncated to an integer amount):

A) ?1000 - ?1499
B) ?1500 - ?1999
C) ?2000 - ?2499
D) ?2500 - ?2999
E) ?3000 - ?3499
F) ?3500 - ?3999
G) ?4000 - ?4499
H) ?4500 - ?4999
I) ?5000 - and over

use a single subscripted array to solve the above problem. the program should also display beside the results, a graph in the form of a histogram


CoDeFrEaK

Posts: 9
Nickname: codefreak
Registered: Feb, 2003

Re: ARRAY PROBLEM Posted: Feb 26, 2003 4:07 AM
Reply to this message Reply
are you serious...?

dan bromberg

Posts: 2
Nickname: bromberg
Registered: Feb, 2003

Re: ARRAY PROBLEM Posted: Feb 26, 2003 10:34 AM
Reply to this message Reply
Seems to me for each salesguy you need to compare his salary to see what range he falls into and then bump up the appropriate counter. When done reading the inputs then plot the counters to form a histogram.

Flat View: This topic has 2 replies on 1 page
Topic: inheritance: what about static methods? Previous Topic   Next Topic Topic: Inserting data from front end to back end using JSP as front end

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use