304311 Java Lab 

Lab 2

Objective

To be able to write simple java applets

Classwork:

  1. Write an applet that draws a line using asterisks ( * ) as follows: Text Box: *
*
*
*
*
*
*
*
 

     

     

     

     

      

  2. Write an applet that asks the user to enter two floating-point numbers, obtains the numbers from the user and displays the larger number followed by the word �is larger� as a string on the applet. If numbers are equal, print the message �These numbers are equal�.

  3. Write an applet that reads five integers and determines and prints the largest and the smallest integer in the group.

  4. Write an applet that allows the user to input the four arguments required by methods drawrect and drawOval, then draw the rectangle and the oval using the four input values.

Lab 1
Lab 2
Lab 3
Lab 4
Lab 5
Lab 6
Lab 7
Lab 8
Lab 9

 � All Copyright Reserved By Fatma & Tahany,Email : [email protected]

Hosted by www.Geocities.ws

1