DeliveryForYou is a prototype for the "Shipping for You" company implemented in Java. The system manages deliveries, including regular deliveries, express deliveries, and business deliveries. The system comprises members, each with their details, residential area (north, center, or south), and an array of deliveries of various types.
The main system consists of an array of managers, each responsible for subscribers in a specific region (north, center, or south). The system administrator has a username and password stored in variables within the administrator class.
-
Add Subscription:
- Allows the addition of subscription details to the manager's system.
- Provides functionality to delete a subscription using a subscription code.
- Includes a button to save subscribers who ordered short deliveries along with delivery details in a text file.
-
Add VICE Manager:
- Enables the addition of a vice manager to the system.
-
Retrieve Deliveries by Customer Code:
- Retrieves all regular and short deliveries of a customer using their code.
-
Add New Shipment:
- Adds a new shipment to an existing customer's array in the manager's system.
- Displays all regular shipments in the manager's responsible area in a JTable.
- Includes a short shipment deletion form.
-
Add New Manager:
- Adds a new manager to the system.
-
Submenu:
- Contains a MenuItem for:
- Displaying all short deliveries within a JTable.
- Displaying details of all subscribers who ordered short delivery within a TextArea.
- Listing all cities to which a short shipment was sent in the last 30 days.
- Contains a MenuItem for:
-
Retrieve Short Deliveries by Date:
- Retrieves all short deliveries on a specified date.
-
Presentation of Members with More Than 3 Short Deliveries:
- Presents information on all members with more than 3 short deliveries.
-
Short Shipment Deletion Form:
- Provides a form for deleting short shipments.
-
Form for Adding Short Shipment:
- Allows the addition of a short shipment.
- Finishing Button:
- Finishes and exits the system.
The Database class is a service class containing static values and includes:
countTree- Integer value.systemAdministrators- ArrayList of system administrators.ourLastDeliveries- TreeMap of recent shipments ordered by subscribers.- Key: Name of the subscriber.
- Value: The corresponding delivery.
ourMembersAndDeliveries1- TreeMap containing the current value ofcountTreewith customer names.ourMembersAndDeliveries2- TreeMap containing the current value ofcountTreewith shipments of the same customer.
To run the code, follow these steps:
-
Download the Code:
- Clone or download the project ZIP file from the repository.
-
Extract the ZIP:
- Extract the contents of the ZIP file to your preferred location.
-
Open in Eclipse:
- Open Eclipse IDE.
-
Import Project:
- Go to
File>Import. - Select
General>Existing Projects into Workspace. - Choose the extracted project folder as the root directory.
- Click
Finish.
- Go to
-
Build and Run:
- Once the project is imported, right-click on the project in the
Project Explorer. - Select
Build Projectto compile the code. - After building, right-click on the main class file.
- Choose
Run As>Java Application.
- Once the project is imported, right-click on the project in the
-
GUI Display:
- The GUI for "DeliveryForYou" should now be displayed.
Note: Ensure you have Eclipse IDE and Java Development Kit (JDK) installed on your system.


