A central computer connected to remote terminals via communication links is used to automate seat reservations...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
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 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
Expert Answer:
Answer rating: 100% (QA)
const False 0 const True 1 range Bool False True SEAT SEAT False SEAT reserved Boo... View the full answer
Related Book For
Introduction to Statistical Quality Control
ISBN: 978-1118146811
7th edition
Authors: Douglas C Montgomery
Posted Date:
Students also viewed these accounting questions
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
Managing Scope Changes Case Study Scope changes on a project can occur regardless of how well the project is planned or executed. Scope changes can be the result of something that was omitted during...
-
Case Study: Quick Fix Dental Practice Technology requirements Application must be built using Visual Studio 2019 or Visual Studio 2017, professional or enterprise. The community edition is not...
-
In early 2015, the employment-population ratio was increasing while the labor force participation rate remained largely unchanged. Shouldn't both of these data series move in the same direction?...
-
Which federal law or laws apply to each of the situations described below?
-
Assume a firm is operating under perfect competition with the following total cost and demand curves: TC =100 + 0.50 Q2 P = 50 a. Find equilibrium price and quantity. b. Is the firm making a profit...
-
In addition to the quantitative variable pesticide concentration, the researchers also report whether or not the pesticide was detected in the urine (at standard detection levels). Before the...
-
The Transcontinental Trucking Company wishes to route a shipment from Buffalo to Duluth over major highways. Because time and distance are closely related, the company dispatcher would like to find...
-
Catena's Marketing Company has the following adjusted trial balance at the end of the current year. Cash dividends of $685 were declared at the end of the year, and 500 additional shares of common...
-
Chia Chia Company has a projected sales volume of RM9,650 for the second year of a proposed expansion project. Costs normally run 60 percent of sales, or about RM990 in this case. The depreciation...
-
Problem 4: Solve the optimization problem, using the graphical method as demonstrated in class. Graph the following constraints on the digital graph paper worksheet. Show all algebra work, to...
-
List the food preparation for three cheese pasta bake that you will need for this recipe. How will you ensure that it is clean, well maintained and ready for use ?
-
1 2 3 For the following problems, consider the code below: for (i = 0; i < 5; i++) { for (j=0; j < 5; j++) A[i+1][j+1] = A[i+1][j1] + A[i][j-1]; 4 } (a) Draw the iteration space graph for the...
-
For the following problems, consider the code below: 1 X = 4; 2 Y = 5; 3 X = X + Y; 4 Z = 10; 5 6 A Y Z 2 * Y; B = x/2 + Y; 7 if (BZ) goto 12 8 P = Z-1; 9 Z Z P; 10 C = Y - Z * Y; 11 goto 7; 12 X = X...
-
Structure of a Preliminary Essay. 1. One sentence thesis statement with three points. 2. Three body paragraphs - each with a topic sentence and specific details or your own ideas and evidence to...
-
On January 1, 2018, Richard Saunders a sole trader, had cash in hand amounting to $550,000 and a credit balance at the bank of $4,500,000. Write up the following transactions in his three (3) column...
-
Use the method of Example 4.29 to compute the indicated power of the matrix. 1 0 1
-
Components used in a cellular telephone are manufactured with nominal dimension of 0.3 mm and lower and upper specification limits of 0.295 mm and 0.305 mm respectively. The x and R control charts...
-
Consider the first two process variables in Table 11.5. Calculate an estimate of the sample covariance matrix using both estimators S1 and S2 discussed in section 11.3.2. TABLE 11.5 Cascade Process...
-
Consider the Minitab output below. (a) Fill in the missing values. Can the null hypothesis be rejected at the 0.05 level? Why? (b) Is this a one-sided or two-sided test? (c) How many degrees of...
-
The following figures relate to the production of product X: If the years production is 20,000 units and this product uses 25 per cent of total factory production, the unit cost for product X in...
-
A company buys and sells units of product P as follows: Under a FIFO method, the gross profit on the sold item is: A. :20. B. :24. C. :25. D. :30. 1 January buy 2 at 30 1 February 1 March buy 3 at 40...
-
If the company in 10b uses the weighted average method, the gross profit is: A. :20. B. :24. C. :25. D. :30.
Study smarter with the SolutionInn App