| |
| META TOPICPARENT |
name="CSC122SylF2022" |
Finite State Machine |
|
< < | A finite state machine is a simple machine that will either accept or reject an input. The [[https://en.wikipedia.org/wiki/Finite-state_machine][Wikipedia article] can give you an overview and so can many other resources on the Internet. To write a program for a finite state machine can be a complex task. However, to simulate one is MUCH easier. This program is to simulate a FSM |
> > | A finite state machine is a simple machine that will either accept or reject an input. The Wikipedia article can give you an overview and so can many other resources on the Internet. To write a program for a finite state machine can be a complex task. However, to simulate one is MUCH easier. This program is to simulate a FSM |
| | Objectives
- Refresh programming skills including use of arrays and objects
- Learn about finite state machines.
Assignment
- Complete the program that simulates a finite state machine.
|
|
< < |
- You are provided with the following. All files are found on the [[http://classroom.github.com][GitHub classroom]
|
> > |
- You are provided with the following. All files are found on the GitHub classroom
|
| |
-
- Transition.java. This class defines a single transition. Given a state and an input what is the next state.
- FSMDriver.java. This class contains a very simple driver. It instantiates a finite state machine from a file and then tests one string for acceptance.
- Simple. This is an example of a data file as follows
|