Question: Design the door class which has the property of either open or shut. The door can also be opened and shut. Design another special

Design the door class which has the property of either open or 

Design the door class which has the property of either open or shut. The door can also be opened and shut. Design another special type of door class called lockable door. Lockable door is like a normal door but can be locked or unlocked. A locked door must be a door that is shut and locked. An unlocked door can be either open or shut. Implement your design as an extension of program you wrote from the previous lab. Design and implement a Mob class to represent mobile characters roaming the maze. A mob must have a name and a description. There are two types of mobs: dumb mobs and smart mobs. A dumb mob moves randomly in the maze without knowing how to unlock or open doors. The smart mob moves strategically in the maze to find its destination and knows how to unlock and open doors. 1. Propose a way a smart mob moves which you think might help it find the destination faster. 2. Initialize the maze and set a destination location which is accessible only through a locked door. 3. Instantiate a dumb mob and a smart mob objects. 4. Write a complete program to demonstrate the moves and actions of all the mobs. 5. Prove the effectiveness of your proposed move() strategy of the smart mob by calculating the average move it makes in comparison to the dumb mob.

Step by Step Solution

3.33 Rating (153 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Doorjava public class Door boolean open boolean shut public Door boolean oboolean s openo shuts void ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!