1. Program to assign two integer values to X and Y. Using the ‘if’ statement the output of the program should display a message whether X is greater than Y.
2.Program to list the factorial of the numbers 1 to 10. To calculate the factorial value, use while loop. (Hint Fact of 4 = 4*3*2*1)
3. Program to add two integers and two float numbers. When no arguments are supplied, give a default value to calculate the sum. Use function overloading.
4. Program to perform mathematical operations. Create a class called AddSub with methods to add and subtract. Create another class called MulDiv that extends from AddSub class to use the member data of the super class. MulDiv should have methods to multiply and divide A main function should access the methods and perform the mathematical operations.
5. Program with class variable that is available for all instances of a class. Use static variable declaration. Observe the changes that occur in the object’s member variable values.
6. Program to find the area and circumference of the circle by accepting the radius from the user.
7. Program to accept a number and find whether the number is Prime or not
8. Program to create a student class with following attributes; Enrollment No: Name, Mark of sub1, Mark of sub2, mark of sub3, Total Marks. Total of the three marks must be calculated only when the student passes in all three subjects. The pass mark for each subject is 50. If a candidate fails in any one of the subjects his total mark must be declared as zero. Using this condition write a constructor for this class. Write separate functions for accepting and displaying student details. In the main method create an array of three student objects and display the details.
9. Define a class called first year with above attributes and define a suitable constructor. Also write a method called best Student () which process a first year object and return the student with the highest total mark. In the main method define a first-year object and find the best student of this class
10. Program to define a class called employee with the name and date of appointment. Create ten employee objects as an array and sort them as per their date of appointment. ie, print them as per their seniority.
11. Program to catch Negative Array Size Exception. This exception is caused when the array is initialized to negative values.
12. Program to handle Null Pointer Exception and use the “finally” method to display a message to the user.
13. Program which create and displays a message on the window
14. Program to draw several shapes in the created window
15. Program to create an applet and draw grid lines
16. Program which creates a frame with two buttons father and mother. When we click the father button the name of the father, his age and designation must appear. When we click mother similar details of mother also appear.
17. Create a frame which displays your personal details with respect to a button click.
18. Program to create a window when we press M or m the window displays Good Morning, A or a the window displays Good After Noon E ore the window displays Good Evening, N or n the window displays Good Night
19. Demonstrate the various mouse handling events using suitable example.
20. Program to create menu bar and pull-down menus.