Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1 of 5 GoL_2071_Data Structures. Lab Prolet De Marsh 4th.2221 Project: Train Booking System This project will meet a single passenger/ekket lookup ystem using Hash

image text in transcribed
1 of 5 GoL_2071_Data Structures. Lab Prolet De Marsh 4th.2221 Project: Train Booking System This project will meet a single passenger/ekket lookup ystem using Hash Tables in ea. You should create the Hash Table Class from scratch. You will create three classes Passenger.java Booking item.java and Test ja For the Passenger dess you will have the instant variable String passenger_Name, Strine ticket and double ticket price. You will create a constructe, petten for instant variables, watters for instant variables and string that prints the passenger_Name, ticket_10 and ticket price for the Bookingiten den, you can store String passenger_Name, Stringit 10, and double ticket price. The passenger_Name will be the way and the ticket and ticket price will be the value stored. Use Gvadi probing for collision resolving the hashfunction to be used is the following Variable Description Key The index sed to store ticket in the hashine Sum Sum of characten in the Name A constant prime value of 19 Sue Ser of the For the Test can you will be provided with a te file container_Name first and last names sicket_ID and ticket_pricested by a comma. Create an object of clans Bookingstem with 13 and use the best tieto tie the hashtable. Then you have to choose an option from a me You can add new passenger by adding a new Name to and ticket price to the table. You need to check if the ticket is valid by checking if it has number underscore and Two letters. An example of a valid ticket is 120321_W. You can be find Ticket, if the same exist in the table the return ticket otherwise not have a valid ticket. You can update in pour Name in the hashtabit Add your sample output sa comment the end of the Tests A menu of chalon should be displayed as follow Welcome to Train Booking System.Enter: 1. Add a new Passenger 2. Find Ticket . Update Ticket ID 4. Print Passengers table 5. Find the highest ticket price & Qui CE 2074:Data Structures Lab fal 2000 Sample et Passengers.txt file: Ahmed Omw 120221_KW, 50.500 Mona Salem. 230421 KS 62.750 Al Fahd. 150221 EG, 105.500 Zahra Sameer 250521 OT, 77.25 Lama Abdullah 120721 UK. 140.250 Sample of output Welcome to Train Booking System.Enter 1. Add a new Passenger 2. Find Ticket 3. Update Ticket ID 4 Print train booking table 5. Find the highest scket price 6. Quit Enter the passenger name or *** to Stop: Ays oder Enter Ticket_ID

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Focus On Geodatabases In ArcGIS Pro

Authors: David W. Allen

1st Edition

1589484452, 978-1589484450

More Books

Students also viewed these Databases questions

Question

What is a zero-coupon bond?

Answered: 1 week ago