Question
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.
- Explain the design of your solution through a flowchart
- Implement your design and copy your java code.-
- 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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started