File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Applets and the fly likes applet what retrieves sales data as parameters ..... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Applets
Bookmark "applet what retrieves sales data as parameters ....." Watch "applet what retrieves sales data as parameters ....." New topic

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


Joined: Sep 02, 2001
Posts: 6
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
Manfred Leonhardt
Ranch Hand

Joined: Jan 09, 2001
Posts: 1492
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

[ June 27, 2006: Message edited by: Ernest Friedman-Hill ]
Ian Cockcroft

Joined: Feb 17, 2002
Posts: 29
Cool piece of code, but what if I wanted to label each segment with the names stored in segTitles?

code ?
Ernest Friedman-Hill
author and iconoclast

Joined: Jul 08, 2003
Posts: 24199

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.

[Jess in Action][AskingGoodQuestions]
I agree. Here's the link:
subject: applet what retrieves sales data as parameters .....
jQuery in Action, 3rd edition