views:

426

answers:

2

Hi. I found this case of study here about a game. I am studying a software engineering course, and we learned about the functional and non-functional requirements but what could be possible requirements? Any ideas ?

the document is here Video Games and Software Engineering: A Case Study.

+2  A: 

Functional requirements are requirements that can be identified with some specific stimulus and its associated response. So, in a game, the requirement that your POV in a first-person shooter turn right when the right cursor arrow is pressed is a functional requirement.

Non-functional requirements are requirements that don't apply to a specific stimulus and response, but to the system overall. So a non-functional requirement would be that your game needs to support 10 players simultaneously, or that it needs to support a list of different graphics cards.


Hre are some more examples:

Functional

  • Player chooses a weapon from the weapons they are carrying.
  • Combat opponent hits player's character; character loses hit points
  • Player hits opponent; compute hit probability
  • Player fires current weapon; compute impact point
  • if response from server ≥ 2 second, post a "waiting..." notice in display
  • if password entered doesn't meet 3-4 rule, don't accept, make user retry

Nonfunctional

  • Game start up ≤ 30 seconds
  • Game should respond to key inputs in ≤ 100 msec
  • Server should respond to update location in ≤ 500 msec
  • Redraw frame rate ≤ 15 fps
  • All passwords must follow a "3 out of 4" rule (ie, must contain characters from at least three of [a-z][A-Z][0-9] and symbols).

Notice the last pair: there's a nonfunctional requirement about password strength; that translates to a functional requirement about what passwords are acceptable. It's useful and important to state both; one specifies how some chunk of software should be built; the other says no part of the software dealing with passwords should violate the rule. So in a sense, the functional requirement is a liveness property: you say what good thing must happen. The nonfunctional requirement is a safety property: you're saying that a particular bad thing must not happen.

Charlie Martin
oh, so I can state al the actions and reactions of the game as a functional reqirments and the remaining constraints and conditions as non- functional ? can you give me more examples on the functional requirments
A: 

There are a lot of places in the document where it mentions functional requirements: e.g. on page 1, it's clear that part of the functionality required is to be able to generate drum-like noises via keyboard input.

The first place which mentioned some non-functional requirements was at the bottom of the left-hand column on page 2, where it says, "With the project time and cost well established from the beginning, the quality etc.": I think that "project time" and "cost" are some examples of non-functional requirements.

ChrisW
cool and what about the activity diagram is it as the same as the state diagram , sorry I'm asking a lot but i love this subject
'Activity' and 'State' diagrams are conventionally (i.e. using UML conventions) *two* kinds of diagram, not one (so, they're not "the same") ... but I don't know how to explain to you how "an activity" isn't the same kind of thing as "a state".
ChrisW

related questions