Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

To achieve the top end of marks for Task A, develop the simple RobotMonitor specification from Lab 3 further as detailed below. Add an

 

To achieve the top end of marks for Task A, develop the simple RobotMonitor specification from Lab 3 further as detailed below. Add an extra restriction that the Robot cannot immediately return to a square it has occupied. For example, if a Robot at (1,1) moves RIGHT to (1,2) 2 3 4 3 1 2 6 its next move cannot be a move LEFT back to (1,1). The UML diagram has been adapted to record the last move by making use of an enumerated Move type: RobotMonitor row: Integer col: Integer move: Move MoveRight() MoveLeft() MoveUp() MoveDown() GetRow(): Integer GetCol(): Integer GetMove(): Move Exit() < > Move LEFT RIGHT UP DOWN Initially, the robot at 1,1 will have no move allocated to it. Modify your initial RobotMonitor specification accordingly to include a move attribute, again using VDMTools (or VDMPad) to ensure it is free of syntax and type errors. 5

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Elementary Statistics

Authors: Robert R. Johnson, Patricia J. Kuby

11th Edition

978-053873350, 9781133169321, 538733500, 1133169325, 978-0538733502

More Books

Students also viewed these Programming questions