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:
- Display default values of all primitive data types in Java.
- Program to find the roots of a quadratic equation and describe the nature of roots based on discriminant.
Exercise 2:
- Binary search implementation in Java.
- Bubble sort implementation.
- StringBuffer operations - delete and remove characters.
Exercise 3:
- Implementing a class with methods and invoking them in main.
- Method Overloading.
- Constructors and Constructor Overloading.
Exercise 4:
- Single Inheritance.
- Multilevel Inheritance.
- Abstract class to find areas of different shapes.
Exercise 5:
- Example of “super” keyword.
- Interface implementation and its inheritance capabilities.
- Runtime Polymorphism.
Exercise 6:
- Exception Handling mechanism.
- Multiple catch clauses.
- Java Built-in Exceptions.
- User Defined Exceptions.
Exercise 7:
- Create threads using both Thread class and Runnable interface to display messages at different intervals.
- Illustrating isAlive() and join() methods.
- Daemon Threads.
- Producer-Consumer problem.
Exercise 8:
- Importing and using user-defined packages.
- Creating a JavaFX GUI with text and image (ImageView).
- Tip Calculator using JavaFX components.
Prepared by: G. Netaji
📄 Download Full PDF