UE23CS352B: OBJECT ORIENTED ANALYSIS AND DESIGN
Problem Statement – Smart Package Delivery Tracking System
The application should be a web-based Smart Package Delivery Tracking System that performs
basic CRUD operations using:
· Spring Boot (MVC Architecture)
· Hibernate (JPA)
· Relational Database (MySQL / H2)
This system allows a logistics company to register and track package deliveries.
1️. Home Page (Main Screen)
When the application runs ([Link] the browser should display:
Package Registration Form
The page must contain:
· Tracking ID (Text field)
· Sender Name (Text field)
· Receiver Name (Text field)
· Destination City (Text field)
· Delivery Status (Dropdown – Dispatched / In Transit / Delivered)
· Submit button
Functionality:
When user enters details and clicks Submit:
→ Package details must be stored in the database
→ Page must refresh
→ Newly added package must appear in list below
Package Tracking Table
Below the form, the page must display:
ID
Tracking ID
Sender Name
Receiver Name
Destination City
Delivery Status
Created Time
Requirements
· ID must be auto-generated
· Tracking ID must be unique
· Delivery Status is mandatory
· Created Time must be auto-generated
· Data must persist in database
· MVC structure must be properly followed
Implementation Details
1. Model
PES University, Department of Computer Science and Engineering
UE23CS352B: OBJECT ORIENTED ANALYSIS AND DESIGN
Class: Package
Represents a package delivery record with the following attributes:
· id (Auto-generated unique identifier)
· trackingId
· senderName
· receiverName
· destinationCity
· deliveryStatus
· createdTime
CRUD Operations
Create: Add new package record
Read:
· Retrieve all packages
· Retrieve package by trackingId
2. View
Create web page to:
· Submit new package registration
· View all package records in table format
3. Controller
The PackageController handles HTTP requests and interacts with PackageService.
Endpoints:
· GET / → Display home page
· POST /save → Save package record
Responsibilities:
· Validate input
· Call service layer
· Persist data using JPA
4. Service Layer Responsibilities
PackageService must:
· Contain business logic
· Prevent duplicate tracking ID
· Ensure required fields are not empty
· Auto-generate created time
Expected Functional Behavior
✔ Package can be registered
✔ Package list can be viewed
✔ Duplicate tracking ID not allowed
✔ Delivery status required
✔ Data persists
✔ MVC structure properly followed
PES University, Department of Computer Science and Engineering