You are on page 1of 3

SCHOOL OF ENGINEERING & TECHNOLOGY

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING

COURSE COURSE TITLE L T P C


CODE OBJECT ORIENTED PROGRAMMING
0 0 2 2
CSP 243 IN JAVA LAB.

CO1: Define Object oriented programming concepts by identifying classes, objects, members of a

class and relationships among them needed for a specific problem.


CO2: Illustrate different features of java.
CO3: Develop Java programs to solve problems of applications using OOP principles
such as abstraction ,polymorphism and inheritance.
CO4: Categorize runtime errors thrown in the application software or generated
runtime by applying the methods of exception handling and File I/O
CO5: Explain the concept of multi threading.
CO6: Design real life application using Java.
LIST OF EXPERIMENTS
COURSE
S.NO. EXPERIMENT NAME
OUTCOME
Write a Java program to print 'Hello' on screen and then
1 CO1
print your name on a separate line
Write a Java program to print the sum(addition), multiply,
2 CO1
subtract, divide and remainder of two numbers.
Write a Java program to accept a number and check the
3 number is even or not. Prints 1 if the number is even or 0 if CO1
the number is odd.
Write a Java program that accepts three integers from the
user and return true if the second number is greater than
4 first number and third number is greater than second CO1
number. If "abc" is true second number does not need to be
greater than first number.
Write a Java program to find the maximum occurring
5 CO1
character in a string
Write a Java program to find first non repeating character in
6 CO2
a string.
7 Write a program in java to demonstrate method overloading CO2
Write a program in java to demonstrate multi level
8 CO3
inheritance in java.
9 Write a java program to create an abstract class named CO3
Shape that contains two integers and an empty method
named print Area (). Provide three classes named Rectangle,
Triangle and Circle such that each one of the classes extends
the class Shape. Each one of the classes contains only the
method print Area () that prints the area of the given shape
Write a program that creates a user interface to perform
integer division. The user enters two numbers in the text fields,
Num1 and Num2. The division of Num1 and Num2 is
displayed in the Result field when the Divide button is
10 clicked. If Num1 and Num2 were not integers, the program CO4
would throw a NumberFormatException. If Num2 were zero,
the program would throw an ArithmeticException Display the
exception in a message dialog box.
Write a java program that implements a multi-thread
application that has three threads. First thread generates
random integer every1 second and if the value is even,
11 CO5
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

VALUE ADDED EXPERIMENTS


COURSE
S.NO. EXPERIMENT NAME
OUTCOME
A Write a Java program that creates a class hierarchy for CO6
employees of a company. The base class should be Employee,
with subclasses Manager, Developer, and Programmer. Each
subclass should have properties such as name, address, salary,
and job title. Implement methods for calculating bonuses,
generating performance reports, and managing projects.

B Problem Statement: Chat application (socket on both sides) CO6


using socket programming in java.
Problem Description: Client connects, sends messages to the
server and the server shows them using a socket connection.

C Problem Statement: A Family is going for a holiday. They CO6


booked their tickets but they want to book a hotel to stay.
a. Hotel room rates must be visible to family based on
following parameters
b. Family member can book their rooms according to
view(like mountain view and pool view)
c. Room rates should be visible with view.
d. Every room should have restriction that maximum number
of people allow in one room including children. For children
their must be an age restriction (above age 12 years.)
e. Location of hotel

Module for Input


1. Name of Hotel
2. Location of hotel (Based on city Like Mumbai, Shimla)
3. Types of rooms
4. View from rooms
5. Number of Person can stay in one room including children
6. Cost of room (if extra person stays then any increase in
cost)

At Customer End
1. Location should be loaded first as output
2. Customer can check name of hotel

3. Customer can enter their family number count including or


excluding children.
4. Based on input rooms rate must be visible with view.
Would you like to change your location: Yes then start again
with new location.(Two location must be input for testing)

D Write a program in Java to implement Dynamic Method CO3


Dispatch.
E Write a program that reads in from the user an integer (num) CO2
between 1000 and 9999. Then it prompts the user to enter an
integer (d) between 0 and 9 and a character (ch). Your
program should replace the second and the last digit in num
with d and it should display the character that precedes (ch)
followed by the number after the change and then the
character that comes after (ch). Use the division and modulus
operators to extract the digits from num.

Sign. of Course Coordinator Sign. of Lab. Coordinator Sign. of HOD


Prof. (Dr.) Sanjeev Kumar
Name of Course Coordinator Name of Lab. Coordinator Pippal

You might also like