Context for question 2
A prototype for a game is being developed using Object-Oriented Programming (OOP).
The game has a set of characters that have data stored about their characteristics, for example if the character can fly or not fly. A user has to select their requirements, for example a character that can fly, and the program will output the characters that meet the user's requirements.
The class Character stores the data about the characters. The attributes are public.
| CharacterName : String | stores the character's name |
|---|---|
| Colour : String | stores the colour of the character, for example "Green" |
| SuperStrength : String | stores whether the character has super strength ("Yes") or not ("No") |
| Fly : String | stores whether the character can fly ("Yes") or not ("No") |
| Invisible : String | stores whether the character can become invisible ("Yes") or not ("No") |
| Constructor() | initialises the attributes to its parameter values |
| GetCharacterName() | returns CharacterName |
| GetColour() | returns Colour |
| GetSuperStrength() | returns SuperStrength |
| GetFly() | returns Fly |
| GetInvisible() | returns Invisible |