Question: For this exercise, we will be modeling a real-world system using a Finite State Machine (FSM). Examples of FSM appear in our last couple of

For this exercise, we will be modeling a real-world system using a Finite State Machine (FSM). Examples of FSM appear in our last couple of PPs found on Canvas and the reference materials. After constructing the FSM using either the formal definition or a diagram version of the modelled system, you will write the Java program that reads a sequence of input actions from the console and reports whether the entered sequence of actions are accepted or rejected by the FSM you defined. System to be Modelled The system that will be modelled is the use of a Bird scooter via interaction with the Bird app. If you are unfamiliar with these scooters, they appear around campus and can be used by the public to get to a location. Before starting a trip, the user activates the Bird app and supplies electronic payment information. Next, the user scans the QR code on the scooter and can then start the trip. When finished with the scooter, the user must take a photo of the parked scooter to end the ride. The price of the trip based on the ride is immediately withdrawn from the user's credit card. If the user leaves the scooter outside the allowed operating area of the scooter, they will be charged an additional fee. You will use this information to create your corresponding Bird system FSM. Keep in mind that you may use either the formal definition or the diagram method to document it. Expected Functionality of the Java Code We have already reviewed a coding approach to implementation when starting with an FSM (see Tuesdays PP and Java code). For the user of our software to supply console input to the FSM, our corresponding program should start with a display of the expected input actions to our program. Using our coded problem from Tuesdays PP as an example, I would expect to see the following displayed on the console: Allowed actions for our Door-Lock system are: try_door and use_key When implementing the Bird system FSM, you will need to display the actions that you have defined for the Bird. Additionally, supply a sentinel word for the user to signal that they are ending their input action sequence. Please use the input, stop, to end input Near the end of execution, your Bird implementation is expected to display one of the following messages: Your action sequence is accepted or Your action sequence is rejected where accepted corresponds to a sequence of actions that ends in a final state.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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 Databases Questions!