Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The aim of this assignment is to develop a TCP based program that allows to book an airline seat when purchasing flight tickets . Assume

The aim of this assignment is to develop a TCP based program that allows to book an airline seat when purchasing flight tickets. Assume we have a client and a server.

The client first requests a TCP connection with the server. Once the server accepts the TCP connection, the client sends the flight number and number of seats to be booked.

The server will have a matrix of many rows and two columns. The rows represent the flights. The first column represents the flight capacity. The second column represents the available number of seats.

Once the server accepts the TCP connection, it looks in the flight in the matrix. If available, it checks if it can book the requested number of seats. If the booking is successful, the server decreases the number of available seats and sends a message to the server regarding the booking status.

  1. Explain the design of your solution through a flowchart
  2. Implement your design and copy your java code.-
  3. Evaluate your solution for many cases: successful booking, flight did not exist, unable to book -

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

Database Design And Implementation

Authors: Shouhong Wang, Hai Wang

1st Edition

1612330150, 978-1612330150

More Books

Students also viewed these Databases questions

Question

What would the rationale for a PMS be?

Answered: 1 week ago

Question

Ty e2y Evaluate the integral dy

Answered: 1 week ago

Question

1. Write down two or three of your greatest strengths.

Answered: 1 week ago