CCSU Spring, 2000 Project 3 Posting Date: May 5, 2000 Due Date: May 18, 2000 Corrections Posted: May 11, 2000 Corrections to part a: insert the word static in public double area(double r) so it reads public static double area(double r) Do the following: a. Write a Java screen based application which calculates and displays the area of three circles, one of radius 1, one of radius 1.5, and one of radius 2. Your program should display appropriate text for each circle, for instance radius = 1 area = ... USE A METHOD to calculate the area. Your method should be appropriately parametrized. Your method header will look something like this: public double area(double r) Since you are going to calculate the area of three different circles, you will declare your method only once but call it three times. Use Math.PI for the value of PI. b. Turn your sum of integers program from project 2 (program 2b) into a Java Applet. Your Applet Panel should have a label to display the title, a second label to prompt the user for the value of N, a text field where the user will enter the value of N, and a button labeled "Go" to initiate the computation. Also, USE A METHOD to compute the sum of integers. See the QuickDemos Applet SumSquaresApplet.java for inspiration. c. Write a Java Applet which will simulate tossing a pair of dice 1000 times, and will record the number of occurrences of each outcome in a Frequency Array indexed from 0 to 12. As there are no outcomes of 0 or 1 (the smallest score you can roll is two dots (snake eyes) or 2), you will only use boxes 2 through 12 of the frequency array to store the distribution of outcomes. You can easily modify the coin tossing demo, Demo 16. Of course you are, by now, experts at simulating tossing six sided dice, so use what you know from project 2 and the QuickDemos page. In particular, ignore the way Demo 16 uses the (clumsy) Java Random class, and use the much simpler Math.random() instead. For each of the above, hand in the printed copies of the text of all three classes, as well as a 3.5" floppy disk with the .java and .class files for your classes, as described in project 1. GOOD NEWS: NO FLOWCHARTS, NO PSEUDO CODE REQUIRED!!! Notes: (1) Your files MUST be named CircleArea.java, SumIntApplet.java and DiceRollApplet.java, so I can easily find them. (2) You must hand in your files on a CLEAN disk. No files from other projects, no files from programs done in class, just the files for THIS PROJECT. (3) Each of your programs must begin with a remark box, as described in project 1. (4) You must use a folder with POCKETS, as described in project 1. Due Thursday, May 18, 2000 AT THE BEGINNING OF THE EXAM.