Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- encapsulation
- inheritence
- polymorphism
- aggregation
- q 4-7
- inheritence: allows you to derive a new class from an existing one where the new class automatically inherits the dats members and the member function of the existing class
- polymorphism: a member function that will produce different results depending on the type of object which
- abstract data type: a description of the visible behaviour of a data type, hiding the details of how its implemented
- question 9: most convenient way of representing tic tac toe in terms of data structure -
- 10: what one of a list of data structures is mot likely to be a static data structure
- 11: identify the type of queue: (double ended queue)
- 12: identify this: a stack
- 13: identify this: double linked
- 14: identify a type of sort of an illustration (bubble and merge) (lecture 5)
- 15: same as question 14
- 16: identify this (array)
- 17: identify this (tree)
- 18: two fundamental operations of a stack - push and pop
- 19: question about sorting algorithm efficiency (bubble least efficient)
- 20: ??
- 21: a game can have a number of chars/players who have certain demographics such as name, sex, age and height. in the game the character may carry one or more inventory items which are classified into weapons, health and magical items. the game has a number of enemies in it which are of particular types and can be either: a vampire, gargoyle, or werewolf with different food sources
- 9 marks awarded for class identification
- 2 marks for inheritence identification
- 2 marks are awarded for correct cardinality
- 5 marks for the attributes, appropriate types and scope
- 2 marks for one correct set of accessor and mutator functions
- obfuscation/subterfuge
- 22: identification of two correct type of inheritence
- weapons( super class)
- inventory(sub class)
- magic(sub class)
- weapons(sub class)
- 23: identifying cardinality (2 marks)
- character(*..*)_____(1..*) inventory item
- an inventory item can only have one character, but one character can have many inventory items
- 24: identifying attribute types and scope
- -name: String
- -sex: char
- -age: integer
- -height: float
- 25: identifying a correct set of mutator and accessor functions:
- +setName(newName: String): void
- +getName(): String
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement