19
Chapter 11 MAPS

Chapter 11 - comsatsseschool.files.wordpress.com · Chapter 11 MAPS. A Robot Monitoring System •Each robot will have a unique name and a mode, which can be WORKING, IDLE or BROKEN

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Chapter 11 - comsatsseschool.files.wordpress.com · Chapter 11 MAPS. A Robot Monitoring System •Each robot will have a unique name and a mode, which can be WORKING, IDLE or BROKEN

Chapter 11

MAPS

Page 2: Chapter 11 - comsatsseschool.files.wordpress.com · Chapter 11 MAPS. A Robot Monitoring System •Each robot will have a unique name and a mode, which can be WORKING, IDLE or BROKEN

A Robot Monitoring System

• Each robot will have a unique name and a mode, which can be WORKING, IDLE or BROKEN. There are two sectors, A and B, in which a robot can be set to work. The following operations are required:

• addRobot: accepts the name of a new robot and records the fact that this robot has been added to the collection. Its mode is set to idle and it is therefore not allocated a sector to work in.

• removeRobot: accepts the name of a robot and records the removal of this robot from the system.

Page 3: Chapter 11 - comsatsseschool.files.wordpress.com · Chapter 11 MAPS. A Robot Monitoring System •Each robot will have a unique name and a mode, which can be WORKING, IDLE or BROKEN

Operations requirements

• setToWork: accepts the name of a robot, that must currently be idle, and records the fact that it has been set to work in a given sector.

• finishWork: accepts the name of a robot, and records the fact that this robot has been removed from the sector and that its mode has been set to idle.

• needsRepair: as above but records its mode as broken.• fixed: accepts the name of a broken robot and records that

that its mode has been set to idle.• inSector: accepts a given sector and returns the names of

those robots in that sector.• numberToRepair: returns the number of broken robots.

Page 4: Chapter 11 - comsatsseschool.files.wordpress.com · Chapter 11 MAPS. A Robot Monitoring System •Each robot will have a unique name and a mode, which can be WORKING, IDLE or BROKEN
Page 5: Chapter 11 - comsatsseschool.files.wordpress.com · Chapter 11 MAPS. A Robot Monitoring System •Each robot will have a unique name and a mode, which can be WORKING, IDLE or BROKEN
Page 6: Chapter 11 - comsatsseschool.files.wordpress.com · Chapter 11 MAPS. A Robot Monitoring System •Each robot will have a unique name and a mode, which can be WORKING, IDLE or BROKEN
Page 7: Chapter 11 - comsatsseschool.files.wordpress.com · Chapter 11 MAPS. A Robot Monitoring System •Each robot will have a unique name and a mode, which can be WORKING, IDLE or BROKEN
Page 8: Chapter 11 - comsatsseschool.files.wordpress.com · Chapter 11 MAPS. A Robot Monitoring System •Each robot will have a unique name and a mode, which can be WORKING, IDLE or BROKEN
Page 9: Chapter 11 - comsatsseschool.files.wordpress.com · Chapter 11 MAPS. A Robot Monitoring System •Each robot will have a unique name and a mode, which can be WORKING, IDLE or BROKEN
Page 10: Chapter 11 - comsatsseschool.files.wordpress.com · Chapter 11 MAPS. A Robot Monitoring System •Each robot will have a unique name and a mode, which can be WORKING, IDLE or BROKEN
Page 11: Chapter 11 - comsatsseschool.files.wordpress.com · Chapter 11 MAPS. A Robot Monitoring System •Each robot will have a unique name and a mode, which can be WORKING, IDLE or BROKEN
Page 12: Chapter 11 - comsatsseschool.files.wordpress.com · Chapter 11 MAPS. A Robot Monitoring System •Each robot will have a unique name and a mode, which can be WORKING, IDLE or BROKEN
Page 13: Chapter 11 - comsatsseschool.files.wordpress.com · Chapter 11 MAPS. A Robot Monitoring System •Each robot will have a unique name and a mode, which can be WORKING, IDLE or BROKEN
Page 14: Chapter 11 - comsatsseschool.files.wordpress.com · Chapter 11 MAPS. A Robot Monitoring System •Each robot will have a unique name and a mode, which can be WORKING, IDLE or BROKEN
Page 15: Chapter 11 - comsatsseschool.files.wordpress.com · Chapter 11 MAPS. A Robot Monitoring System •Each robot will have a unique name and a mode, which can be WORKING, IDLE or BROKEN
Page 16: Chapter 11 - comsatsseschool.files.wordpress.com · Chapter 11 MAPS. A Robot Monitoring System •Each robot will have a unique name and a mode, which can be WORKING, IDLE or BROKEN
Page 17: Chapter 11 - comsatsseschool.files.wordpress.com · Chapter 11 MAPS. A Robot Monitoring System •Each robot will have a unique name and a mode, which can be WORKING, IDLE or BROKEN
Page 18: Chapter 11 - comsatsseschool.files.wordpress.com · Chapter 11 MAPS. A Robot Monitoring System •Each robot will have a unique name and a mode, which can be WORKING, IDLE or BROKEN
Page 19: Chapter 11 - comsatsseschool.files.wordpress.com · Chapter 11 MAPS. A Robot Monitoring System •Each robot will have a unique name and a mode, which can be WORKING, IDLE or BROKEN

Thanks