Question: A central computer connected to remote terminals via communication links is used to automate seat reservations for a concert hall. A booking clerk can

A central computer connected to remote terminals via communication links is used to automate seat reservations for a concert 

A central computer connected to remote terminals via communication links is used to automate seat reservations for a concert hall. A booking clerk can display the current state of reservations on the terminal screen. To book a seat, a client chooses a free seat and the clerk enters the number of the chosen seat at the terminal and issues a ticket. A system is required which avoids double bookings of the same seat whilst allowing clients free choice of the available seats.A model given below is designed for the concert hall reservation system. However, the model sometimes double books tickets. Please modify the following model to avoid double booking. Note: Please do not repeat the parts that remain the same. Just write down the modified part. const False = 0 const True = 1 range Bool = False.. True SEAT SEAT [False], SEAT [reserved: Bool] = (when (!reserved) reserve -> SEAT [True] query [reserved] -> SEAT [reserved] when (reserved) reserve -> ERROR range Seats = 1..4 | | SEATS = (seat [Seats]: SEAT). TERMINAL = (choose [s: Seats]-> seat [s].query [reserved: Bool] -> if (!reserved) then (seat [s].reserve -> TERMINAL) else TERMINAL set Terminals = {a,b) || CONCERT = (Terminals: TERMINAL || Terminals::SEATS ). //error of reserved twice

Step by Step Solution

3.42 Rating (158 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

const False 0 const True 1 range Bool False True SEAT SEAT False SEAT reserved Boo... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Accounting Questions!