Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

applet what retrieves sales data as parameters .....

 
christopson
Greenhorn
Posts: 6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
Could someone help me (ASAP) to get start on this assignment?
Write an applet what retrieves sales data as parameters and display the data on a pie chart.
The format of the parameters is the following:
<param name=categories value="cat1..... catn ">
<param name=cat1 value="amount1 ">
<param name=catn value="amountn ">
The amount for each category is represented as an integer. For example, the following are sample sales data for a software superstore.
<param name=categories value="education utility entertainment reference"
<param name=education value=10000>
<param name=utility value=12000>
<param name=entertainment value=30000>
<param name=reference value=9000>
I should add methods to my pie chart
applet so that it meets the Canonical Form of Public Classes.
Any ideas/anything will be really appreciated! (ASAP)
Please email me at Derekhtran@yahoo.com
 
Manfred Leonhardt
Ranch Hand
Posts: 1492
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Christopson,

The following code should do what you want.

[ EJFH: Code deleted. ]

NOTE: Your name doesn't comply with the JavaRanch naming convention. Please re-register. See the following:
Naming Convention

Regards,
Manfred.
[ June 27, 2006: Message edited by: Ernest Friedman-Hill ]
 
Ian Cockcroft
Greenhorn
Posts: 29
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Cool piece of code, but what if I wanted to label each segment with the names stored in segTitles?

code ?
cheers
Ian
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24204
34
Chrome Eclipse IDE Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm afraid I've come by a bit to late here, but I should point out that at JavaRanch, we want to help people learn. Therefore, we strongly discourage people from doing other folks' homework. Please ask specific questions, show code for criticism, and ask for hints when you're stuck, but we expect Ranchers to neither ask for nor supply complete homework answers.

Also, please don't "reregister." You could have (and should have) simply fixed your display name here.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic