use Eclipse Jee Oxygen Pie Chart

timer Asked: Dec 17th, 2017
account_balance_wallet $15

Question description

please use Eclipse Jee Oxygen and can you combine all the code to word




Write a program that inputs sales amounts from five regions of a company and displays a pie chart as a percentage of sales.


Write the following classes:

class PieChart

Write a class PieChart that extends JFrame and provides the following:

Five private int variables for holding sales amounts from five regions: North, South, East, West, and Midwest.

A public constructor with five parameters that initializes the sales amounts for the five regions.

The method paint() that overrides the paint method in the parent class. In the paint method, convert the sales amounts into percentages and display them as a pie chart as shown below. Also show a legend at the bottom of the pie chart.

class TestPieChart

Write a class TestPieChart that contains the method main(). In the main method, provide the following:

Prompt the user to input sales amounts for the five regions.

Create a PieChart object and pass it the sales amounts of the five regions.

Set the size of the PieChart object to 500,500.

Set the PieChart object to be visible.


In the class PieChart that extends JFrame, provide the paint method as shown below. In the paint method, use the Graphics object to do the drawing.

public void paint (Graphics g)



Test Data

Use the following test data in millions of dollars:

North: 20

South: 25

East: 15

West: 30

Midwest 10

Tutor Answer

School: Duke University


package Piee;
import java.applet.Applet;
import java.awt.*;
import java.awt.event.*;

public class Pie extends Applet
implements ActionListener
Label inputlabel;
Label label1;
Label label2;
Label label3;
Label label4;
Label label5;
TextField input1, input2, input3,
Button b1;
int number[], degrees[];
int sum, counter;

flag Report DMCA

Goes above and beyond expectations !

Similar Questions
Hot Questions
Related Tags

Brown University

1271 Tutors

California Institute of Technology

2131 Tutors

Carnegie Mellon University

982 Tutors

Columbia University

1256 Tutors

Dartmouth University

2113 Tutors

Emory University

2279 Tutors

Harvard University

599 Tutors

Massachusetts Institute of Technology

2319 Tutors

New York University

1645 Tutors

Notre Dam University

1911 Tutors

Oklahoma University

2122 Tutors

Pennsylvania State University

932 Tutors

Princeton University

1211 Tutors

Stanford University

983 Tutors

University of California

1282 Tutors

Oxford University

123 Tutors

Yale University

2325 Tutors