Write a schema for the operation of ending a game, Basic Computer Science

Assignment Help:

QUESTION 1

We need to write Z specifications to record the information about passengers on board an aircraft. Here you are required to produce the specifications using appropriate schemas. Do not consider seat numbers, passengers are allowed on board on a first-come-first-serve basis. Take only a set as the basic type and the condition that at any time there cannot be more passengers than the maximum limit.
(a) Write the schema to represent the current system state.

(b) Write a valid initial state for the system that is at the time when the aircraft is still empty.

(c) Write an operation to allow a passenger to board the aircraft.

(d) Write an operation for the disembarkation of a passenger.

(e) Write a schema to count the number of passengers on board the aircraft.

(f) Write a schema to verify if a passenger called ‘Peter' is on board the aircraft.

QUESTION 2

The University Badminton Club

Here we need to refine the specification for the badminton club given below to describe the activities in the hall which contains one badminton court, where members of the club come to play.
Members in the hall are either playing a game on the court, or effectively in a queue, waiting to play. Here the queue will be modelled as an injective sequence called waiting and we represent those playing a game by onCourt.

The schema to describe the current system state is currently the following:-

[STUDENT] - basic type→maxPlayers: Ν ∩_______________ →maxPlayers = 20 ∪_ClubState__________________________________ →badminton: Π STUDENT →hall: Π STUDENT ∩_______________ →hall ζ badminton →# hall ? maxPlayers ∠_______________________________________

(a)Rewrite the current state schema to describe the activities inside the hall. You may call the new schema for the current system state ClubState2.

(b)Write a schema for the operation of beginning a new game.

(c)Write a schema for the operation of ending a game.

(d)Write a schema for the operation of removing a person from the hall.

(e)Write a schema to specify an operation for a person to enter the hall and join the back of the waiting queue.

QUESTION 3:

A system records the booking of hotel (Le Coco Beach) rooms on one night. Here you are given the following basic types:

• [ROOM] set of all rooms in the hotel
• [PERSON] set of all possible persons

(a) Write a schema to represent the current system state. You must indicate clearly the type of relation you have identified for this system.

(b) Write a valid schema to represent the initial system state.

(c) Write the schema to represent the successful booking of a room by a person called Anthony.

(d) Write the schema to represent the cancellation of a room by a person called Jimmy.

(e)Write the schema to know if a person has already booked the room 007.


Related Discussions:- Write a schema for the operation of ending a game

Explain the architecture of wap, Question 1 Discuss the benefits and goals...

Question 1 Discuss the benefits and goals of e-commerce Question 2 List and explain the features of portal Question 3 Elaborate the TCP/IP model Question 4 Explain the archi

Transaction-based model, Transaction-based model: Here,  the pricing i...

Transaction-based model: Here,  the pricing is based on providing a committed business service, for ex, processing payroll for a global company as part of HR offering and this

Algorithm implementation, Implementing the -Crochemore-Perrin algorithm Th...

Implementing the -Crochemore-Perrin algorithm The software must be functional, code must be clear and including comments and it must have a nice and decent user interface

Properties of Dictionary Keys, Dictionary values encompass no limitations. ...

Dictionary values encompass no limitations. They can be any random Python object, moreover standard objects or user-defined objects. Though, same is not true for the keys. There ar

Merchant problem, Pebble Merchant Problem Description There is a pebble mer...

Pebble Merchant Problem Description There is a pebble merchant. He sells the pebbles, that are used for shining the floor. His main duty is to take the length of the room’s sides.

Sma* search - artificial intelligence, SMA* Search-Artificial intelligence ...

SMA* Search-Artificial intelligence IDA* search is good from a memory point of view. actually it may  be criticised for not using enough memory - utilizing  more memory may inc

How to crack a password, how can i crack the password of vmware virtual mac...

how can i crack the password of vmware virtual machine

Function, write a function named "location_of_largest"that takes as its arg...

write a function named "location_of_largest"that takes as its arguments the following:(1) an array of integer values

Central processing unit, The Central Processing Unit : Central Processing U...

The Central Processing Unit : Central Processing Unit (CPU) is the brain of the computer. The intricate electronic circuitry of the CPU performs the computer's tasks of handling d

Simplified expression, what is the logic diagram for the Boolean expression...

what is the logic diagram for the Boolean expression x''y + xy'' + xz

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd