Question: In this assignment, you will practice developing UML. State Machines to specify system behavior, and will practice writing code that conforms to the State Machine
In this assignment, you will practice developing UML. State Machines to specify system behavior, and will practice writing code that conforms to the State Machine model. You can draw UM L State Machine model by hand, or by using any software tool of your choosing. Lunar Rover Back in July 30th 1971, the crew of Apollo 15 reached the moon surface. The first American astronaut reached the moon along with his team. But they needed a mean of transportation. Their solution: A lunar buggy called "Lunar Rover" that could travel speeds up to 12 km/h. This was an awesome opportunity for astronauts to travel long distances outside Earth, but there were some technological constraints 45 years ago. The Lunar Roving Vehicle could had only two pedals and two buttons to control Figure 1: Lanar Rover on the surface of the the vehicle's systems 0 0 Movement Control: Engineers had to be creative in order to add all the functionality need for a lunar cruise, so they came up with the following ideas: o When the right pedal was pressed once it accelerates the buggy forward. o If accelerating forward and you press right pedal twice it deaccelerates. o To achieve constant forward speed press the right pedal for more than 5 seconds. o If the buggy is at rest and the left pedal is pressed for more than 5 seconds, it will accelerate backwards Design a state machine to model the Movement Control as described above (5 points). Provide an implementation for the state machine in Java (5 points) Every state should implement an entry action that prints on the console the current state. 1. 2. o search In this assignment, you will practice developing UML. State Machines to specify system behavior, and will practice writing code that conforms to the State Machine model. You can draw UM L State Machine model by hand, or by using any software tool of your choosing. Lunar Rover Back in July 30th 1971, the crew of Apollo 15 reached the moon surface. The first American astronaut reached the moon along with his team. But they needed a mean of transportation. Their solution: A lunar buggy called "Lunar Rover" that could travel speeds up to 12 km/h. This was an awesome opportunity for astronauts to travel long distances outside Earth, but there were some technological constraints 45 years ago. The Lunar Roving Vehicle could had only two pedals and two buttons to control Figure 1: Lanar Rover on the surface of the the vehicle's systems 0 0 Movement Control: Engineers had to be creative in order to add all the functionality need for a lunar cruise, so they came up with the following ideas: o When the right pedal was pressed once it accelerates the buggy forward. o If accelerating forward and you press right pedal twice it deaccelerates. o To achieve constant forward speed press the right pedal for more than 5 seconds. o If the buggy is at rest and the left pedal is pressed for more than 5 seconds, it will accelerate backwards Design a state machine to model the Movement Control as described above (5 points). Provide an implementation for the state machine in Java (5 points) Every state should implement an entry action that prints on the console the current state. 1. 2. o search
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
