An introduction to software engineering Exercise IV

Source: Internet
Author: User

1.

Take a simple Tetris game system specification as an example, described in natural language as follows:
Each state of the game corresponds to a game interface, the start state, but the variable cd_start=1 is entered into the normal game state, cd_start=2 when entering the game state, cd_start=3
After the storage is finished, return to the normal game state, in the normal game state, if the variable game_res=0, then the game ends, enter the game
is to go to the score list interface to view. In the score table interface Press any key to return to the start screen, in the Reading game interface, when the game data read completed into the normal game state, the normal game state, the same
Press the left and right button to enter the storage game interface, the number
The description with poor status is as follows:
End screen. It can be seen that the system specification is written in natural language, wordy and complicated, and there may be contradictions, ambiguity, vagueness, incompleteness and confusion of the level of abstraction.
State machine j:{Start, normal game (play in progress), score list, read game, save game, end of Game}
Input set k:{key up, press down, key left, key right, register variable cd_start, register variable Game_res}
Conversion function T: if
Initial state s:{Start}
End state set f:{game over}

It can be seen that the descriptive language is more concise and clear, without ambiguity.

PS Digression: The installation process of Tomcat is a bit of a problem, in addition to view and learn a few simple Web page source code.

An introduction to software engineering Exercise IV

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.