Thursday, November 21, 2019
The Z Notation Math Problem Example | Topics and Well Written Essays - 3250 words
The Z Notation - Math Problem Example COUNTER The precondition increments the value of count by one every time a value is added. The precondition indicates that the limit does not change. The precondition indicates that the number of items added cannot exceed 256, which is the limit. If the item to be added in the sequence already exists, the item should not be added to the list. The schema ALREADYADDED helps to control this. ALREADY ADDED The precondition tests if the item to be added already exists in the given sequence. If the value exists , then the system returns a value (ALREADY_ADDED) If the value is already in the sequence the resulting sequence does not change, this precondition is given by The function INFORM: is given by: Combining the three schemas gives the general expression for pushing the item onto the stack. PUSH_ITEM The item (i) becomes a subset of the ITEM The resulting count + 1 must be less than the limit value The limit value does not change The sign depicts change of state If the sequence has the item identical to one being input then, the system displays 'ALREADY_ADDED' (2)POPPING THE ITEM FROM THE STACK The schema for displaying an item isDISPLAY_ITEM For the item to be displayed it must be contained in the sequence The function takes the name of the requested item and finds it and displays all information about the given ITEM. There is no change in state of the system, this is illustrated by the symbol To prevent displaying an item not in the sequence, the system should return a NOT_FOUND result, the expression is given by; NOT_...Each piece can then be described informally with a commentary. The Z schemes describe the dynamic and static aspects of a system. The static aspect of a system includes the states the system can occupy and the relationship maintained when the system transits from state to state. The dynamic aspects include the operation that are possible, the changes that occur and the input - output relationship. (1) The list of persons name and corresponding salaries (can be used by a company to store data of the employees working in that company and also store the salaries of these people.) the reasons for using this type of data are Several people using one name may earn the same salary, the system can be coded to display number of people earning the same salary, this means that the tests data type can be subjected to various operations. To test for rotation a number (i) and the square of the number (i2) can be used. The test data comprise of different numbers and their squares, these numbers form a sequence. The elements can be arranged so that the top most elements are the first members of the given sequence and the last element is greatest number in that list. On rotating left the greatest number and its square becomes the first element of the set.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.