Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Make an airplane ticketing system in C language using sockets. The clients will make a request to buy a ticket from the system. The system

Make an airplane ticketing system in C language using sockets.

The clients will make a request to buy a ticket from the system. The system - server will inform them whether there are enough tickets available or not and, if there are enough available, it will proceed to complete the order and withhold the seat. Define the number of available tickets at 100.

At the end of the program print the amount of tickets that have been bought and the amount of orders that were not completed.

For the orders passed from the clients to buy a ticket use sockets (Clients will write to the socket and the Server will read).

To inform the client about the ticket availability use sockets (Clients will read from the socket and the Server will write).

To check the program create 10 different clients. Each one of them will send 2 different orders to buy a ticket. Between orders add a 1 second wait using the system call sleep().

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

Current Trends In Database Technology Edbt 2004 Workshops Edbt 2004 Workshops Phd Datax Pim P2panddb And Clustweb Heraklion Crete Greece March 2004 Revised Selected Papers Lncs 3268

Authors: Wolfgang Lindner ,Marco Mesiti ,Can Turker ,Yannis Tzitzikas ,Athena Vakali

2005th Edition

3540233059, 978-3540233053

More Books

Students also viewed these Databases questions

Question

What is the slope of the CML? What does it measure?

Answered: 1 week ago

Question

8. Explain the relationship between communication and context.

Answered: 1 week ago