VTU Java Lab Manual 21CSL35 Object-Oriented Programming with JAVA Laboratory Solutions

VTU 3rd sem Java Lab Manual Answers for 21CSL35 Object-Oriented Programming with JAVA Laboratory program solutions or answers available down.

21CSL35 Object-Oriented Programming with JAVA Laboratory Solutions

Sl no.21CSL35 Object-Oriented Programming with JAVA Laboratory Solutions
Part – A
1Aim: Introduce the java fundamentals, data types, and operators in java.

Program: Write a java program that prints all real solutions to the quadratic equation
ax2+bx+c=0. Read in a, b, c and use the quadratic formula.
2Aim: Demonstrating creation of java classes, objects, constructors, declaration, and initialization of variables.

Program: Create a Java class called Student with the following details as variables within it.
USN
Name
Branch
Phone
Write a Java program to create n Student objects and print the USN, Name, Branch, and
Phone of these objects with suitable headings
.
3Aim: Discuss the various Decision-making statements, loop constructs in java.

Program:
A) Write a program to check prime numbers.
B) Write a program for an Arithmetic calculator using the switch case menu
4Aim: Demonstrate the core object-oriented concept of Inheritance, polymorphism

Program: Design a superclass called Staff with details as StaffId, Name, Phone, Salary. Extend this class by writing three subclasses namely Teaching (domain, publications), Technical (skills), and Contract (period). Write a Java program to read and display at least 3 staff objects of all three categories.
5Aim: Introduce concepts of method overloading, constructor overloading, and overriding.

Program: Write a java program demonstrating Method overloading and Constructor overloading.
6Aim: Introduce the concept of Abstraction, and packages.

Program: Develop a java application to implement a currency converter (Dollar to INR, EURO to INR, Yen to INR and vice versa), distance converter (meter to KM, miles to KM and vice versa), time converter (hours to minutes, seconds and vice versa) using packages.
7Aim: Introduction to abstract classes, abstract methods, and Interface in java

Program: Write a program to generate the resume. Create 2 Java classes Teacher (data: personal information, qualification, experience, achievements) and Student (data: personal information, result, discipline) which implement the java interface Resume with the method biodata().
8Aim: Demonstrate creation of threads using Thread class and Runnable interface, multithreaded programming.

Program: Write a Java program that implements a multi-thread application that has three threads. The first thread generates a random integer for every 1 second; the second thread computes the square of the number and prints; the third thread will print the value of the cube of the number.
9Aim: Introduce Java Collections.

Program: Write a program to perform string operations using ArrayList. Write functions for the following a. Append – add at end b. Insert – add at particular index c. Search d. List all string starts with given letter.
10Aim: Exception handling in java, introduction to the throwable class, throw, throws, and finally.

Program: Write a Java program to read two integers a and b. Compute a/b and print, when b is not zero. Raise an exception when b is equal to zero.
11Aim: Introduce File operations in java.

Program:
Write a java program that reads a file name from the user, displays information about whether the file exists, whether the file is readable, or writable, the type of file and the length of the file in bytes
12Aim: Introduce java Applet, awt, and swings.

Programs:
a. Develop an applet that displays a simple message in the center of the screen.
b. Develop a simple calculator using Swings.

you can Follow us on our Telegram Channel and Join our Telegram Group for more updates also on our official Youtube Channel and Share this post with your friends.

Leave a Reply

Your email address will not be published. Required fields are marked *