2025-26 II-I VR23-OBJECT-ORIENTED PROGRAMMING THROUGH JAVA LAB

2025-26 II-I VR23-OBJECT-ORIENTED PROGRAMMING THROUGH JAVA LAB

Netaji_VR23 - OOPS JAVA LAB

Course Objectives:

  • Practice object-oriented programming in the Java programming language.
  • Implement Classes, Objects, Methods, Inheritance, Exception Handling, and Runtime Polymorphism.
  • Illustrate JDBC connectivity and user-defined exception mechanisms.
  • Construct Threads, Event Handling, and JavaFX GUI interfaces.

Topics Covered:

  • OOP Fundamentals - data types, control structures
  • Classes, Methods, Objects, Inheritance, Polymorphism
  • Exception Handling, Threads, Packages, Interfaces
  • File Handling, I/O Streams, JavaFX GUI

Sample Lab Exercises:

Exercise 1:

  1. Display default values of all primitive data types in Java.
  2. Program to find the roots of a quadratic equation and describe the nature of roots based on discriminant.

Exercise 2:

  1. Binary search implementation in Java.
  2. Bubble sort implementation.
  3. StringBuffer operations - delete and remove characters.

Exercise 3:

  1. Implementing a class with methods and invoking them in main.
  2. Method Overloading.
  3. Constructors and Constructor Overloading.

Exercise 4:

  1. Single Inheritance.
  2. Multilevel Inheritance.
  3. Abstract class to find areas of different shapes.

Exercise 5:

  1. Example of “super” keyword.
  2. Interface implementation and its inheritance capabilities.
  3. Runtime Polymorphism.

Exercise 6:

  1. Exception Handling mechanism.
  2. Multiple catch clauses.
  3. Java Built-in Exceptions.
  4. User Defined Exceptions.

Exercise 7:

  1. Create threads using both Thread class and Runnable interface to display messages at different intervals.
  2. Illustrating isAlive() and join() methods.
  3. Daemon Threads.
  4. Producer-Consumer problem.

Exercise 8:

  1. Importing and using user-defined packages.
  2. Creating a JavaFX GUI with text and image (ImageView).
  3. Tip Calculator using JavaFX components.

Prepared by: G. Netaji

📄 Download Full PDF

netaji gandi Sunday, June 29, 2025

Mr. G. Netaji: VR23 C LAB SOLUTIONS ...