OopsJavaExercise: Core Java & OOP Concepts
Course: Object-Oriented Programming in JAVA Lab (BCA39109) | Program: Bachelor of Computer Applications (BCA) - 3rd Semester, Brainware University
OopsJavaExercise is a comprehensive collection of Java programming exercises designed to build a strong foundation in Object-Oriented Programming (OOP). This repository serves as a practical archive of lab assignments, demonstrating everything from basic Java syntax to advanced concepts like multithreading, custom exception handling, the Java Collections Framework, and modern data structures (Java Records).
This repository contains functional code proving proficiency in the following areas:
- Object-Oriented Design: Classes, Objects, Constructors, and Encapsulation.
- Inheritance: Single, Multilevel, and Hierarchical class structures using the
extendskeyword andsuper()methods. - Polymorphism: Compile-time (Method Overloading) and Runtime (Method Overriding).
- Abstraction: Utilizing
abstractclasses and JavaInterfacesto implement multiple inheritance. - Exception Handling: Using
try-catch-finallyblocks and propagating custom exceptions (e.g.,throw new CustomException). - Concurrency: Creating and managing multithreaded applications using both the
Threadclass and theRunnableinterface. - Data Structures (Collections): Practical implementation of
Vector,HashSet, andHashMapfor dynamic data management. - Modern Java: Utilizing Java 14+
recordtypes for immutable data carriers.
(A quick overview of the major systems built in this repository)
- 📚 Library Management System: Demonstrates deep class interaction, object arrays, and encapsulation.
- 🏢 Personnel / Educational Staff Systems: Showcases multi-level inheritance and dynamic method dispatch for calculating salaries based on employment type.
- 🚗 Vehicle Hierarchy System: Illustrates the use of
protectedaccess modifiers andsuperconstructor chaining. - 🧵 Multithreaded Printers: Proves understanding of CPU context switching using
Thread.sleep()and parallel execution. - 📇 Employee Record Manager: A lightning-fast, map-based database utilizing immutable Java Records.
To compile and run the code in this repository, you will need:
- Java Development Kit (JDK): Version 16 or higher is recommended (required for Java Records).
- A standard terminal, command prompt, or an IDE like IntelliJ IDEA, Eclipse, or VS Code.
Navigate to the directory containing the specific .java file and run standard compilation commands:
- Compile the byte code: