Presentation is loading. Please wait.

Presentation is loading. Please wait.

Assignment #3 (Due, March 24, 2003) 1. Write an applet that plots f(x) = sin(x). Let x range from - 2*Math.PI to 2*Math.PI. Scale the plot so it fits within.

Similar presentations


Presentation on theme: "Assignment #3 (Due, March 24, 2003) 1. Write an applet that plots f(x) = sin(x). Let x range from - 2*Math.PI to 2*Math.PI. Scale the plot so it fits within."— Presentation transcript:

1 Assignment #3 (Due, March 24, 2003) 1. Write an applet that plots f(x) = sin(x). Let x range from - 2*Math.PI to 2*Math.PI. Scale the plot so it fits within the available area as the applet is resized. (Please see page 390 in the text book for reference. Call Math.sin(…) to calculate sin(x).) 2. Write a Java program to generate a data structure as shown in the following figure. 1 234...... 8910 Fig. 1

2 Hints: Generate two classes. One is for the tree nodes and the other is for the edges as shown in Fig. 2. 1234 Class_1 Class_2 Fig. 2

3 3. (15) Specify the functionality of all the four Layout managers: Flowlayout, BorderLayout, CardLayout and GridLayout. 4. (20) Write a program that shows a button and a solid circle. When the button is clicked, the circle will move from the upper left corner to the right lower corner across the applet display area. 5. (20) Implement the program (class) named “CardTest” given in the lecture notes ‘Containers’, using Event-1.1 method.


Download ppt "Assignment #3 (Due, March 24, 2003) 1. Write an applet that plots f(x) = sin(x). Let x range from - 2*Math.PI to 2*Math.PI. Scale the plot so it fits within."

Similar presentations


Ads by Google