Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question 3 Not yet answered Marked out of 10.00 Using the state pattern, you have to implement a robot that can; walk, run, and cook

image text in transcribed

Question 3 Not yet answered Marked out of 10.00 Using the state pattern, you have to implement a robot that can; walk, run, and cook based on an action provided by the user. In your design take the following into consideration: 1. The robot is considered ready after the user switched it on. 2. The robot can start cooking based on action from the user. 3. The robot state can go from walk to run without out user action 4. The robot goes off after finishing the task (either walk, run or cook) or the user explicitly switch it off. P Flag question Q1) (2 points) Draw the class diagram that shows all classes and the role of each class? Q2) (2) Write code of the walk state? 23) (6 points) Write the implementation of the Robot class; most important things are the states declaration, the constructor, a function to return robot state

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

Advanced Database Systems For Integration Of Media And User Environments 98

Authors: Yahiko Kambayashi, Akifumi Makinouchi, Shunsuke Uemura, Katsumi Tanaka, Yoshifumi Masunaga

1st Edition

9810234368, 978-9810234362

More Books

Students also viewed these Databases questions