Skip to content

Commit 8b125bf

Browse files
Update README.md
1 parent 4bc4013 commit 8b125bf

File tree

1 file changed

+43
-41
lines changed

1 file changed

+43
-41
lines changed

README.md

Lines changed: 43 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
11
# Java OOP Interfaces, Abstraction & Class Relationships
22

3+
🚀 **Master OOP with Real‑World Java Implementations**
4+
35
![Java Build](https://github.com/TheComputationalCore/java-oop-interfaces-abstraction/actions/workflows/java-build.yml/badge.svg)
46
![Language](https://img.shields.io/badge/Language-Java-orange?style=flat-square)
57
![OOP](https://img.shields.io/badge/Concepts-OOP-blue?style=flat-square)
68
![License](https://img.shields.io/badge/License-MIT-yellow?style=flat-square)
79

8-
This repository contains Java programs demonstrating essential Object-Oriented Programming (OOP) concepts such as **encapsulation, abstraction, interfaces, and class relationships**. The project is organized into **two major tasks**:
10+
This repository demonstrates essential **Object‑Oriented Programming (OOP)** concepts including
11+
**encapsulation**, **abstraction**, **interfaces**, and **class relationships** through two real-world tasks:
912

10-
1. **Library Management System**
11-
2. **Taxable Interface Implementation**
13+
1. **Library Management System**
14+
2. **Taxable Interface: Employee & Product Tax Calculation**
1215

1316
---
1417

@@ -38,91 +41,90 @@ java-oop-interfaces-abstraction/
3841
3942
├── LICENSE
4043
└── README.md
41-
4244
```
4345

44-
### File Overview
45-
- **Book.java** – Defines the `Book` class with attributes `bookID`, `title`, `author`, and `isAvailable`.
46-
- **Library.java** – Manages an array of `Book` objects; methods to add, remove, search, and display books.
47-
- **Taxable.java** – Interface defining constants `salesTax`, `incomeTax`, and abstract method `calcTax()`.
48-
- **Employee.java** – Implements `Taxable` to compute income tax.
49-
- **Product.java** – Implements `Taxable` to compute sales tax.
50-
- **Main.java** – Driver for tax calculations.
51-
5246
---
5347

5448
# 📘 Task 1 — Library Management System
5549

56-
### Book Class
50+
### **Book Class**
5751
Represents:
5852
- `bookID`
5953
- `title`
6054
- `author`
6155
- `isAvailable`
6256

63-
### Library Class
64-
Supports:
65-
✔ Add books
66-
✔ Remove books
67-
✔ Search by ID
68-
✔ Display all books
57+
### **Library Class**
58+
Provides:
59+
- ➕ Add books
60+
- ➖ Remove books
61+
- 🔍 Search by ID
62+
- 📋 Display all books
63+
64+
### 📸 Screenshots (Task 1)
65+
| 1.a | 1.b |
66+
|-----|-----|
67+
| ![](screenshots/1.a.png) | ![](screenshots/1.b.png) |
6968

70-
### 📸 Screenshots
71-
![screenshots](1.a.png)
72-
![screenshots](1.b.png)
73-
![screenshots](1.c.png)
74-
![screenshots](1.d.png)
69+
| 1.c | 1.d |
70+
|-----|-----|
71+
| ![](screenshots/1.c.png) | ![](screenshots/1.d.png) |
7572

7673
---
7774

7875
# 🧮 Task 2 — Taxable Interface Implementation
7976

80-
### Taxable Interface
77+
### **Taxable Interface**
8178
Defines:
8279
- `salesTax = 0.07`
8380
- `incomeTax = 0.105`
84-
- Abstract method `calcTax()`
81+
- Method: `calcTax()`
8582

86-
### Employee Class
87-
Computes **income tax** based on salary.
83+
### **Employee Class**
84+
✔ Calculates **income tax** from salary.
8885

89-
### Product Class
90-
Computes **sales tax** based on price.
86+
### **Product Class**
87+
✔ Calculates **sales tax** from price.
9188

92-
### 📸 Screenshot
93-
![screenshots](2.png)
89+
### 📸 Screenshot (Task 2)
90+
![](screenshots/2.png)
9491

9592
---
9693

97-
# ▶️ Running the Programs
94+
# ▶️ How to Run
9895

99-
### Clone
96+
### **Clone Repository**
10097
```bash
10198
git clone https://github.com/TheComputationalCore/java-oop-interfaces-abstraction.git
10299
```
103100

104-
### Compile
101+
### **Navigate**
102+
```bash
103+
cd java-oop-interfaces-abstraction/src
104+
```
105+
106+
### **Compile**
105107
```bash
106108
javac *.java
107109
```
108110

109-
### Run Task 1
111+
### **Run Task 1**
110112
```bash
111113
java Library
112114
```
113115

114-
### Run Task 2
116+
### **Run Task 2**
115117
```bash
116118
java Main
117119
```
118120

119121
---
120122

121-
# Requirements
122-
- Java JDK 8+
123-
- Terminal or IDE
123+
# 🛠 Requirements
124+
- Java **JDK 8+**
125+
- Terminal / Command Prompt / IDE (IntelliJ, VS Code, Eclipse)
124126

125127
---
126128

127129
# 📝 License
128-
This project is licensed under the **MIT License**.
130+
Licensed under the **MIT License**.

0 commit comments

Comments
 (0)