Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Exercise 1:
- Structure Exercise:
- eg:
- Example 1:
- You are making an automatic shopping robot with 3 main classes:
- CPickup - picks up the item
- CMove - moves the robot around
- CCamera - tells what the item is
- Task:
- Move around the shop and scan items
- Take inventory of how many there are of each item. The robot will be updating the warehouse module.
- Tell the robot to get items from a shoplist, this shopping list can contain an item more than once:
- eg: 1 carrot, 6 oranges, 3 apples etc
- If an item is missing, the robot will update the warehouse
- The robot can pick up to 2 items up at once
- The camera is very accurate and can tell what each item is in the store
- After finishing a list, the robot will go to the checkout area and then back to the charging station (that is also where it starts)
- a: Describe how these classes work together
- b: How many instances of each class will there be? Where will the instances be found?
- c. Explain how threads could be implemented
- d: Make CRC Class Cards
- e. Make a UML Diagram
- f. Write up pseudo code
- Exercise 2:
- Finish a Hierarchy:
- 3 Legged Humanoid
- 2 Wheeled Plane bot
- 2 Wheeled Humanoid
- 1 Wheeled Turtle bot
- 2 Legged Spider Bot
- 1 Legged Humanoid
- 3 Piston Drone
- 3 Wheeled Turtle bot
- 1 Legged Drone
- 2 Piston Humanoid
- 1 Piston Plane bot
- Exercise 3:
- Write a non bias c++ program to deal 5 cards to x amount (<4 players) of players.
- Standard decks consist of 52 cards.
- There must be a player and dealer class.
- It is expected that the player class can be made to allow multiple instances
- There are diamonds, hearts, spades and clubs (dont worry about 2,3,4,5,6.....).
- (someone tests c++ ability, and polymorthism [early stuff] and vectors)
- Exercise 4:
- Write something which uses virtual and pointers
- These two are def in the exam.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement