AOOP Index b3
AOOP Index b3
6 Write a program in Java which has a class Student having two instance 02/01
variables enrollment No and name. Create 3 objects of Student class in main
method and display student’s name.
7 Write a program in Java which has a class Rectangle having two instance 02/01
variables height and weight. Initialize the class using constructor.
8
Write a program in Java demonstrate the use of “this” keyword. 06/01
9
Write a program in Java to demonstrate the use of “static” keyword. 09/01
Write a program in Java which has a class Shape having 2 overloaded methods 16/01
11 area(float radius) and area(float length, float width). Display the area of circle
and rectangle using overloaded methods.
18 Write a program in Java which has a class Car having two instance variables 03/02
topSpeed and name. Override toString() method in Car class. Create 5 instances
of Car class and print the instances.
20 Write a program in Java which has an abstract class Shape having three 06/02
subclasses: Triangle, Rectangle, and Circle. Define method area() in the abstract 07/02
class Shape and override area() method to calculate the area.
21 Write a program in Java to demonstrate use of final class. 20/02
23 Write a program in Java to develop user defined exception for 'Divide by 21/02
Zero' error.
24 Write a program in Java to develop Banking Application in which user deposits 24/02
the amount Rs 25000 and then start withdrawing of Rs 20000, Rs 4000 and it
throws exception "Not Sufficient Fund" when user withdraws Rs. 2000
thereafter.
25 Write a program that executes two threads. One thread displays “Thread1” 10/03
every 1000 milliseconds, and the other displays “Thread2” every 2000
milliseconds. Create the threads by extending the Thread class
26 Write a program that executes two threads. One thread will print the even 17/03
numbers and another thread will print odd numbers from 1 to 200.
27 19/03
Write a program in Java to perform read and write operations on a Text file.
Write a program in Java to demonstrate use of List. 20/03
28
1) Create Array List and add weekdays (in string form)
2) Create Linked List and add months (in string form) Display both List. 24/03
29 Write a program in Java to create a new HashSet, add colors(in string form)
and iterate through all elements using for-each loop to display the collection.
30 Write a Java program to create a new HashMap, add 5 students’ data (enrolment 03/04
no and name). retrieve and display the student’s name from HashMap using
enrolment no.