Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Using the state pattern, you have to implement an application that help track the item ordered from online shop. The client orders an item from
Using the state pattern, you have to implement an application that help track the item ordered from online shop. The client orders an item from online shop, then item can go to post office, then it will be delivered to the user home. Or the item after being ordered it goes to the post office, then the user will pick it up from the post office. In both cases; either take the item from the post office or has it delivered to the client's home represents the end of the process. Q1) (2 points) Draw the state diagram that shows all possible states and transitions? Q2) (2) Write code of the Ordered state? Q3) (6 points) Write the implementation of the ShopOrder 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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started