Practical List - OOPJ - Sem4 - IT - LDCE
Practical List - OOPJ - Sem4 - IT - LDCE
L. D. COLLEGE OF ENGINEERING
INFORMATIONTECHNOLOGY DEPARTMENT
AHMEDABAD
LABORATORY PLANNING
Dept: Information Technology SEMESTER: BE-IV TERM: 2022-23
SUBJECT: -OBJECT ORIENTED PROGRAMMING - I ( 3140705) Div: A,B,C
No AIM CO
1 I. Write a Program that displays Welcome to Java, Learning CO1(not
Java Now and Programming is fun. considered
II. Write a Java Program to calculate simple interest. in
III. Write a Java Program to check Leap Year.\ evaluation)
IV. Write a Java Program to add two binary numbers.
2 I. Write a Java Program to check if a number is Armstrong CO1(not
from given array. considered
II. Write a Java Program to perform bubble sort on Strings. in
III. Write a Java program to perform different methods of evaluation)
string buffer class.
3 I. Create a class named Product with instance variables MRP CO2(not
and QUANTITY and methods display (), setdata (). In considered
display () method, display the instance variables value (MRP in
and QUANTITY). And in setdata () method set the instance evaluation)
variable values (MRP and QUANTITY)).
II. Create a class named Account with instance variables
Ac_No,Name and Balance and methods display (), setdata
(),deposit(). In display () method, display the instance
variables value (Ac_No,Name and Balance). And in setdata ()
method set the instance variable values (Ac_No,Name and
Balance) and in deposit() method the amount that user wants
to deposit that will be deposited.
III. Create a class named Student with static variable Enrollment
no. and instance variable Name and methods display (),
setdata (). in display () method, display the variables value
(Enrollment no. and Name). And in setdata () method set the
variable values (Enrollment no. and Name).
8 I. Create a Package and put all the classes mentioned above CO4
in package.
II. Create a Package and put all the classes mentioned above
in package.
III. Create a Package and put all the classes mentioned above
in package.
9 I. Create a method named buy () in the main function CO3
performing exception handling.
Example: Banana = 10; Banana_Buy = 12
Here, Banana_Buy > Banana (throw exception).
II. Create a method named Withdraw () in the main function
performing exception handling.
Example: Balance = 1000; Withdraw = 12000
Here, Balance<Withdraw (throw exception)
III. Create a method named searchStudent() in the main ()
Function performing exception handling.
Example: if we search the student name and if it is present in
the list then it will represent the details else it will throw an
exception.
10 I. Save object data in the file using File Writer class, using CO4
parameterized constructor.
II. Save object data in the file using File Writer class, using
parameterized constructor.
III. Save object data in the file using File Writer class, using
parameterized constructor.