0% found this document useful (0 votes)
32 views1 page

Travel Report Using JSP/JDBC

The document describes a program that generates a travel report retrieving records from a database table based on input of a destination. It retrieves booking details of passengers traveling from different sources to the given destination, following business rules to check the destination name contains only alphabets and spaces. It provides a sample report output for input "Bangalore" from the TravelBooking table and test cases to validate the program.

Uploaded by

Manjunath Arya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
32 views1 page

Travel Report Using JSP/JDBC

The document describes a program that generates a travel report retrieving records from a database table based on input of a destination. It retrieves booking details of passengers traveling from different sources to the given destination, following business rules to check the destination name contains only alphabets and spaces. It provides a sample report output for input "Bangalore" from the TravelBooking table and test cases to validate the program.

Uploaded by

Manjunath Arya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

Travel Report using JSP/JDBC

Write a program that uses database connectivity to generate the travel report, which
provides details on passengers travelling from different sources to a particular destination.
Your code should be able to retrieve records from database if business rules are satisfied,
otherwise return Null.
Sample Input: Bangalore
Sample Report:
BookingID

Source

---------------------------------------5001

Mysore

5002

Hyderabad

-------------------------------------Check for the following business rules given below


The destination name should only contain alphabets (lower case or upper case) and spaces.
The destination name should not contain only spaces
Complete the method provided in the TravelService class, by retrieving data from the
database table TravelBooking
Test Case

Input

Output
Map{<5001,Mysore>,

UTC3_01

Bangalore

UTC3_02

Hyderabad

Map{<5003,Vijayawada>}

UTC3_03

Delhi

Null

<5002,Hyderabad}

Refer the following data from the TravelBooking table which is provided in table script file:
BookingId

Source

Destination

VehicleType

PhoneNo

5001

Mysore

Bangalore

9740000000

5002

Hyderabad

Bangalore

9985000000

5003

Vijayawada

Hyderabad

9886000000

You might also like