











Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
A java-based project for a baggage tracking system. It outlines user stories, acceptance criteria, and implementation details for a menu-driven application. The project involves using java 17 features, including records, lambda expressions, and streams api, along with postgresql for database management. The document also includes instructions for creating and executing the project, testing using junit 5, and evaluation metrics.
Typology: Lecture notes
1 / 19
This page cannot be seen from the preview
Don't miss anything!












โ Title of the Project - Baggage Tracking System โ Complexity - Medium โ Target Band - Band x / Band 1 / Band 2 โ Downloadable Starter Code link:BaggageTrackingSystem โ Skills: Java, JUnit Mockito, PostgreSQL. โ Time taken to complete: 3 Hours โ IDE: IntelliJ, Eclipse Technology Topics Java OOPs, JDBC, Abstract Class and Interfaces, Exception Handling, Collections And Generics, Streams API, Lambda Expression, JUnit5 And Mockito, PostgreSQL.
US03 As a user, I want to get the status and location of my checked-in baggage so that I can track its progress. โ Given that I have checked-in my baggage, when I provide the claim tag ID, then the system should return the current status and location of my baggage. โ If I provide an invalid claim tag ID, the system should inform me that the baggage does not exist. US04 As an admin, I want to view all checked-in baggage so that I can monitor the overall baggage handling process. โ When I access the system, it should provide me with a list of all checked-in baggage.
US05 As an admin, I want to update the status and location of any baggage so that I can correct any errors or update any changes โ Given a claim tag ID, when I provide a new status and location, the system should update the corresponding baggage record. โ If I provide an invalid claim tag ID, the system should inform me that the baggage does not exist. โ If I provide an invalid status, the system should inform me that the status is not recognized. US06 As an admin, I want to search for a specific baggage using the claim tag ID so that I can quickly find information about a particular baggage. โ If I provide an invalid claim tag ID, the system should inform me that the baggage does not exist. โ Given a claim tag ID, the system should return the corresponding baggage record. US07 As an admin, I want to view a summary of baggage statuses so that I can get an overview of the baggage handling process. โ The system should provide a summary of how many baggage are in each status (Checked In, In Transit, Arrived, Ready for Pickup, Claimed). US08 As an admin, I want to remove a baggage record from the system once it has been claimed so that the system stays up-to-date. โ Given a claim tag ID, when I request to remove a baggage record, the system should delete the corresponding record. โ If I provide an invalid claim tag ID, the system should inform me that the baggage does not exist.
firstName This field represents the first name of the user. VARCHAR(255)^ NOT NULL lastName This field represents the last name of the user. VARCHAR(255)^ NOT NULL email This field represents the email address of the user. VARCHAR(255)^ Unique NOT NULL Primary Key - userID 4.Implementation Class / Method Description This is a standalone Java application where a menu-driven interface needs to be developed to execute the following functionalities. Note:- The above UserStories are converted into equivalent methods and the descriptions of the service methods provided below need to be implemented. Entity Class Service Methods Description User(userId,firstName,lastName,e mail) Given User a class in the starter code convert it into Java 17 Records to store the User details. UserService registerNewUser(User user) This method is used to register a new user.It takes a User object as input and saves it to the user table. checkInBaggage(Baggage baggage) This method is used to check in a baggage. It takes a Baggage object as input, sets its status to "Checked In" and its location to "Check-in Area", and
adds it to the baggage table. getBaggageInfo(String claimTagId). This method is used to retrieve the status and location of a checked-in baggage. It accepts the claim tag ID of the baggage as an input parameter. If the baggage is found, it returns the corresponding Baggage object. If the baggage is not found, it raises a BaggageNotFoundEx ception. Baggage(claimId,location,status,u serId) BaggageService getBaggageStatus(String claimTagId) This method is used to get the status of a baggage. It takes the claim tag ID as input and returns the status of the corresponding baggage.If the baggage is not found, it raises a BaggageNotFoundEx ception. updateBaggageStatus(String claimTagId, String status) This method is used to update the status of baggage. It accepts the claim tag ID and the new status as input, then updates the status of
claimBaggage(String claimTagId) This method is used to claim a baggage. It takes the claim tag ID as input and removes the corresponding baggage from the database else should raise exception. getAllCheckedInBaggage() Use Consumer Functional Interface and Lambda Expression to print the list of checkedInBaggages. The getAllCheckedInBag gage method returns a list of all Baggage objects that have a status of "Checked In". else it should raise exception Output Screens
ii)If a user enters valid details the user is successfully stored in the database.
โ Handle and display errors gracefully to the user in case of invalid inputs or other issues. Evaluation Metrics Sl. No. Assessing Parameter Marks (^1) User Stories 8* 4 marks 32 marks (^2) Usage of Lambdas and Records 5 marks (^3) Testing Module 5 (^4) Exception Handling and following best practices 8 Total Marks 50 Marks