تفاصيل العمل

**Project Title:**

Vendor Payment Management System Using Java (OOP)

**Project Description:**

I developed a Java program that demonstrates the use of **Object-Oriented Programming (OOP)** concepts to manage vendor contracts and calculate monthly payments based on different vendor types.

The system is structured using a **base class and subclasses** to represent different vendor categories.

**Vendor (Base Class – Superclass)**

This class represents a general vendor and contains the following private attributes:

* **vendorId**

* **vendorName**

* **baseContractAmount**

Validation rules are implemented in the setter methods:

* **vendorId** must start with `"VEND"`

* **vendorName** must contain at least **4 characters**

* **baseContractAmount** must be **greater than or equal to 10,000**

The class also includes a method:

* **calculateMonthlyPayment()** which returns the base contract amount as the default implementation.

**LocalVendor (Subclass)**

This class inherits from **Vendor** and overrides the **calculateMonthlyPayment()** method to:

* Add **12% tax** to the base contract amount

* Add a **fixed compliance fee of 500**

**InternationalVendor (Subclass)**

This class also inherits from **Vendor** and introduces an additional private attribute:

* **exchangeRate**

Validation rule:

* **exchangeRate** must be **greater than 0**

The **calculateMonthlyPayment()** method is overridden to:

* Convert the base amount using the **exchange rate**

* Add **18% customs duty**

* Add an **international handling fee of 2000**

**Main Class Functionality:**

The main class demonstrates **polymorphism** by using a **Vendor reference** to create objects from both **LocalVendor** and **InternationalVendor** classes, then calling the **calculateMonthlyPayment()** method for each vendor type.

**Concepts Used in the Project:**

* Inheritance

* Encapsulation

* Method Overriding

* Polymorphism

* Input validation in setters

* Object creation and method invocation in the main class

**Project Goal:**

The goal of this project is to practice and demonstrate key **OOP principles in Java** by building a simple system that calculates vendor payments based on different business rules for local and international vendors.

ملفات مرفقة

بطاقة العمل

اسم المستقل
عدد الإعجابات
0
عدد المشاهدات
2
تاريخ الإضافة