INSY 4306 Lab 1 Question 1 Write a program that inputs (use JOptionPane.showInputDialog method) four numbers and graphs them as a pie chart. Use class Arc2D.Double and method fill of class Graphics2D...

1 answer below »
Are you able to do this:?


INSY 4306 Lab 1 Question 1 Write a program that inputs (use JOptionPane.showInputDialog method) four numbers and graphs them as a pie chart. Use class Arc2D.Double and method fill of class Graphics2D to perform the drawing. Draw each piece of the pie in a separate color. Question 2 Given program (Lab_1_2_start_Up) is an application that allows the user to select a shape from a JComboBox and draws it 20 times with random locations and dimensions in method paintComponent. The first item in the JComboBox should be the default shape that is displayed the first time paintComponent is called. (Screenshot 1 & 2) Screenshot 1 Screenshot 2 Modify the program with following upgrades: · allow the user to select from four options using JComboBox as seen in Screenshot 3 · allow the user to select the color in which shapes should be drawn from a JColorChooser dialog as seen in Screenshot 4, 5, and 6 · allow the user to close the application by clicking on exit button as seen in Screenshot 7 and 8 Screenshot 3 Screenshot 4 Screenshot 5 Screenshot 6 Screenshot 7 Screenshot 8 Deliverables: 1. Source codes (.java files) – Q1 – 30%, Q2 - 50% 2. Screenshots of the program output – Q1 – 10%, Q2 - 10% Note: Sparingly comment your java source code, save all the files in your_lastname_lab_1 folder, zip it, and upload for grading. Thank you! Note: · if the program runs without any error and correct output. 100% · if the program runs without any error and incorrect output. 90% · if the program crashes due to error: up to 40% if the algorithm is ok end
Answered 1 days AfterFeb 11, 2022

Answer To: INSY 4306 Lab 1 Question 1 Write a program that inputs (use JOptionPane.showInputDialog method) four...

Tanisha answered on Feb 12 2022
116 Votes
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here