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?...
-
Lee Financial Services pays employees monthly. Payroll information is listed below for January 2011, the first month of Lees fiscal year. Assume that none of the employees exceeded any relevant wage...
-
Consider randomly selecting n segments of pipe and determining the corrosion loss (mm) in the wall thickness for each one. Denote these corrosion losses by Y1, ... , Yn. The article "A Probabilistic...
-
Triumph Corporation is preparing its statement of cash flows by the indirect method. Triumph has the following items for you to consider in preparing the statement. Identify each item as an -...
-
Alberton Co. uses a standard costing system to account for its production of toys. Plastic is added at the start of production; labor and overhead are incurred at equal rates throughout the process....
-
Assume a risk-free asset in the U.S. is currently yielding 4.1 percent, a Canadian risk-free asset is yielding 3.7 percent, and the current spot rate is C$1.2633 (Canadian Dollar per U.S. dollar)....
-
In his analysis of Californias Proposition 103 (see Illustration 4.2), Benjamin Zycher notes that one of the most important provisions of this proposition is eliminating the practice by insurance...
-
Cross-fertilizing a red and a white flower produces red flowers 25% of the time. Now we cross-fertilize five pairs of red and white flowers and produce five offspring. Find the probability that there...
-
Enterprise Network Diagram Objective: Learn about types of networks and their secure constructs that may be used in an organization to accomplish the functions of the organization's mission. Propose...
-
Two small, positively charged spheres have a combined charge of 17.0 x 105 C. If each sphere is repelled from the other by an electrostatic force of 0.800 N when the spheres are 1.80 m apart, what is...
-
A disk of radius 2.6 cm has a surface charge density of 5.4 C/m on its upper face. What is the magnitude of the electric field produced by the disk at a point on its central axis at distance z = 15...
-
ritically analyse your chosen organisation's (HEISCO IS A LEADING COMPANY IN THE FIELD OF OIL AND GAS CONSTRUCTION IN THE ARAB GULF REGION) recruitment and retention processes, and discuss how they...
-
Around (1000) words: For legal reasons, you will not actually create business profiles and launch a campaign on different platforms. You will merely write the proposed plan and the expected results...
-
How to get an A in this class? O Actively participate in the class O Study hard throughout the semester Think critically and creatively of the course materials O All of the above
-
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 amplitudes of displacement and acceleration of an unbalanced turbine rotor are found to be \(0.5 \mathrm{~mm}\) and \(0.5 \mathrm{~g}\), respectively. Find the rotational speed of the rotor using...
-
The root mean square (rms) value of a function, \(x(t)\), is defined as the square root of the average of the squared value of \(x(t)\) over a time period \(\tau\) :...
-
Prove that the sine Fourier components \(\left(b_{n} ight)\) are zero for even functions-that is, when \(x(-t)=x(t)\). Also prove that the cosine Fourier components \(\left(a_{0} ight.\) and...
Study smarter with the SolutionInn App