Students are required to develop the following type of programs in Java language with internal
documentation:
1. Write a Class Date that takes day, month, and year while creating an object of this class. Find a new date
when the number of days is given.
2. Write a program to implement Boolean AND, OR, XOR, and NOT operations.
3. Write a program to Add, Subtract, Multiply two matrices using switch statement. The program must also
validate the sizes of two matrices before performing any operation and should raise exception in case the
operation cannot be performed.
4. Write a program to store and then prints sorted names of students according to their length of name using
arrays with variable sized rows.
5. Write a program to find the area of all types of triangles using the principle of constructor overloading and
Inheritance depending on the number of dimensions given in the input parameter list using super to call the
super class constructor.
6. Write a program to find the area of rectangle using an abstract super class figure and also override method
use to compute the area of the rectangle.
7. Write a program to implement grow able and shrinkable Stack that can support operations like– push, pop, and
view the top item with concept of dynamic allocation using finalize() method. The program should also
incorporate the concepts of private and public access methods to avoid accidental manipulations of stack.
8. Write a program to demonstrate static variables, methods and blocks.
9. Write a program to swap two items belonging to an object using returning of object by a function.
10. Write a program to count the frequency of each vowel in a given string.
11. Demonstrate the use of static and non static nested classes.
12. Create a package containing a class to print your (name, roll no, marks) and use this package in another
program using import statement.
Leave a Reply