0% found this document useful (0 votes)
2 views4 pages

Oops Lab Syllabus

The document outlines the course objectives and outcomes for an Object Oriented Programming Lab using Java, focusing on key concepts such as inheritance, polymorphism, multithreading, and exception handling. It includes a detailed list of experiments for each week, guiding students through practical programming tasks that reinforce their understanding of Java fundamentals and OOP principles. The course aims to equip students with the skills to develop event-driven applications and utilize generics and collections.

Uploaded by

burleudaya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views4 pages

Oops Lab Syllabus

The document outlines the course objectives and outcomes for an Object Oriented Programming Lab using Java, focusing on key concepts such as inheritance, polymorphism, multithreading, and exception handling. It includes a detailed list of experiments for each week, guiding students through practical programming tasks that reinforce their understanding of Java fundamentals and OOP principles. The course aims to equip students with the skills to develop event-driven applications and utilize generics and collections.

Uploaded by

burleudaya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

(R-20)

CS/IT253 Object Oriented Programming Lab L P C

0 3 1.5
Course Objectives:

The main objectives of this course are to:

1. To introduce java compiler, interpreter


2. To make the students learn an object oriented way of solving problems using java
3. To make the students write programs using multithreading concepts and
exceptionhandling
4. To make the students understand the usage of Event handling, generics, collections

Course Outcomes:

After successful completion of the course, students will be able to:

1. Write simple java programs using java fundamentals and basic OOP concepts.
2. Design programs using inheritance and polymorphism.
3. Demonstrate inter process communication using multithreading.
4. Demonstrate the user defined exceptions by exception handling keywords ( try,
catch, throw, throws and finally).
5. Develop Event driven applications and Generic programs

List of Experiments:

WEEK 1:
Write a program by creating an 'Employee' class having the following methods and print the final
salary.
1 - 'getInfo()' which takes the input as name , id , salary, number of hours of work per day of employee.
2 - 'AddSal()' which adds $10 to salary of the employee if it is less than $500.
3 - 'AddWork()' which adds $5 to salary of employee if the number of hours of work per day is more
than 6 hours.

WEEK 2:
(i) Write a java program to demonstrate static key word.
(ii) Write a java program to demonstrate this key word.
(iii) Write a java program to demonstrate variable length arguments.
(iv) Write a java program to demonstrate command line arguments.

WEEK 3:
(i) Write a program for the following: an inner class named Inner is defined within the scope
of class Outer. Therefore, any code in class Inner can directly access the variable outer_x.
An instance method named display( ) is defined inside Inner. This method displays outer_x

B.Tech/CSE/2020-2021 Page 61
(R-20)

on the standard output stream. The main( ) method of InnerClassDemo creates an instance
of class Outer and invokes its test( ) method. That method creates an instance of class
Inner and the display( ) method is called.
(ii) Write a Java program to display the volume of box using constructor Overloading.

WEEK 4:
(i) Write a java program for the following: Create a class employee which takes input as name,
id and designation and create another class salary which takes input as Basic pay (BP),
House Rent Allowance (HRA), Dearness Allowance(DA) and Provident Found (PF) and
inherits the members of class employee. Print the Net Pay of each employee using the
reademp() in employee class and readsalary() , calculatesalary() and displayemp() methods
in salary class. (np = bp + hra + da – pf)
(ii) Write a java program for the following: Assume that the test results of a batch of students
are stored in three different classes. Class student stores the name, roll-number and class
test stores the marks obtained in six subjects and class result contains the total marks
obtained in the test. The class result can inherit the details of the marks obtained in the
test and the name, roll number of students through Multi level inheritance.
(iii) Write a java program for the following: employee is the parent class which is common for
all the sub or child classes both the permanent_employee class and temporary_employee
class. Use the read_emp() method in employee class which reads the name, id and salary.
And use the print_emp() method in both permanent_employee class and
temporary_employee class which prints the details of name ,id and incremented salary
details.(if employee is temporary then increment the salary 3.5% of the given salary and
if employee is permanent then increment the salary 5% of the given salary).

WEEK 5:
(i) Write a Java Program to compute the area of “room”, using method overloading. (Area of
room=length X Breadth) (Considermethod with no parameters,method with single
parameter and method with twoparameters).
(ii) Write a program to create a superclass called Figure that stores the dimensions of a two-
dimensional object. It also defines a method called area( ) that computes the area of an
object. The program derives two subclasses from Figure. The first is Rectangle and the
second is Triangle. Each of these subclasses overrides area( ) so that it returns the area of
a rectangle and a triangle.
(iii) Write a Java Program to demonstrate a final keyword.

B.Tech/CSE/2020-2021 Page 62
(R-20)

Week 6:
Abstract classes, interfaces, Dynamic method dispatch.
i. Write a java program to create an abstract class named Shape that contains two integers /
doubles and an empty method named printArea(). Provide three classes named Rectangle,
Triangle and Circle such that each one of the classes extends the class Shape. Each one of
the classes contain only the method printArea( ) that prints the area of the given shape.
ii. In the following example, we have two interfaces: Motorbike and Cycle. The motorbike
interface consists of the attribute speed and its value is 50. The method is totalDistance().
The cycle interface consists of the attribute distance and its value is 150.The method is
speed().Both these interfaces are implemented by the class TwoWheeler.
Find the total distance (totalDistance=speed*distance) and average speed
( AvgSpeed=totalDistance/speed ) in the class TwoWheeler.
iii. Write a java program on Dynamic method dispatch.

Week 7
Write a java program to implement access protection in Packages.

Week 8
Write a java program to implement the methods of String and String Buffer Class.

Week 9
User Defined Exceptions or Custom Exceptions : Let’s take an example program
where we will evaluate candidate’s age to vote. If the candidate’s age is less than 18 years,
the program will throw a custom exception “InvalidAgeException”.

Week 10
Write a java program that implements a multi-thread application that has three threads.
First thread generates random integer every 1 second and if the value is even, second
thread computes the square of the number and prints. If the value is odd, the third thread
will print the value of cube of the number.

Week 11
Write a java program for passing parameters to Applets.

Week 12
Write a java program to implement Graphics class and color class.

Week 13
i. Write a java program for handling mouse events .
B.Tech/CSE/2020-2021 Page 63
(R-20)

ii. Write a java program for handling key events .

Week 14
Write a java program to develop AWT components.

Week 15
Write a java program to develop Swings components.

B.Tech/CSE/2020-2021 Page 64

You might also like