Baggage Tracking System: Java Hands-On Assessment, Lecture notes of Computer Science

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

2023/2024

Uploaded on 11/04/2024

codetrickster
codetrickster ๐Ÿ‡ฎ๐Ÿ‡ณ

1 document

1 / 19

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Java HandsOn Assessment
Baggage Tracking System
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13

Partial preview of the text

Download Baggage Tracking System: Java Hands-On Assessment and more Lecture notes Computer Science in PDF only on Docsity!

Java HandsOn Assessment

Baggage Tracking System

โ— 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.

GITLAB GENERAL INSTRUCTIONS

  1. Connect to VPN to access GlobalLogic GITLAB
  2. Open the URL in the browser - https://gitlab-in.globallogic.com/users/sign_in
  3. Login using GlobalLogic credentials.
  4. Find a project to fork: Navigate to the project that you want to fork on GitLab. You can find projects by browsing the public repositories or by searching for a specific project.
  5. Fork the project: Once you have found the project you want to fork, click the "Fork" button in the top right corner of the project page. This will create a copy of the project in your GitLab account.
  6. Clone the forked project: Once you have forked the project, clone the project to your local machine using Git. To do this, open a terminal window and navigate to the directory where you want to clone the project. Then, run the following command: git clone [URL of the forked project]
  7. Make changes to the project: Once you have cloned the project to your local machine, make any necessary changes to the project files using your preferred code editor.
  8. Commit your changes: Once you have made changes to the project files, stage the changes and commit them to your local repository using the following commands: git add. git commit -m "Your commit message here"
  1. Push your changes to GitLab: Once you have committed your changes to your local repository, push the changes to GitLab using the following command: git push origin [name of your branch]
  2. The forked project will have the Private Access so explicitly add the users in the project members. Click on Invite Members Provide access to the Educators: Username: Ex: [email protected] and [email protected] Role: Owner

SYSTEM REQUIREMENTS

  1. Eclipse/STS/IntelliJ IDEA
  2. PostgreSQL
  3. Java 17 or above

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

  1. Register User i) If user enter invalid details while registration the application is giving appropriate message to the user

ii)If a user enters valid details the user is successfully stored in the database.

  1. Check In Baggage
  2. Get Baggage Info
  1. Update Baggage Status
  2. Claim Baggage
  1. Get Baggage Location
  2. Exiting from application

โ–  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