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 |
1 | Aim: 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. |
2 | Aim: 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. |
3 | Aim: 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 |
4 | Aim: 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. |
5 | Aim: Introduce concepts of method overloading, constructor overloading, and overriding. Program: Write a java program demonstrating Method overloading and Constructor overloading. |
6 | Aim: 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. |
10 | Aim: 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. |
11 | Aim: 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 |
12 | Aim: 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.