Tags:
view all tags
---+ 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 ---++ Objectives 1 Refresh programming skills including use of arrays and objects 1 Learn about finite state machines. ---++ Assignment 1 Complete the program that simulates a finite state machine. 1 You are provided with the following. All files are found on the [[http://classroom.github.com][GitHub classroom] a. *Transition.java*. This class defines a single transition. Given a state and an input what is the next state. a. *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. a. *Simple*. This is an example of a data file as follows i. Line 1: the alphabet of the machine (each one is a character) i. Line 2: the number of states in the machine (always integers) i. Line 3: which state is the initial state i. Next set of lines (until -1): one line (old state, new state, character) representing a transition. i. Last: a list of states (terminated with a -1) of final states a. *FSM.java*. The shell for the finite state machine with methods you need to complete. See comments within the code for more instructions a. *Transitions*. The shell for a list of transitions with methods and field variables you need to complete. See comments within the code for more instructions. 1 Be sure to modify the comments as appropriate and maintain good programming techniques ---++ Submission instructions 1 Complete the SDR. Be aware that the form has changed! Include at least one more set of tests for your own machine along with any other tests you think are appropriate. Your testing report should probably not be more than a page and could be less. 1 Combine your SDR and all of your .java and testing files into one zip folder 1 Submit the zip folder on Canvas by the due data specific there. ---++ Restriction: It is very likely that there are programs that can be downloaded that can simulate a FSM. You are not allowed to even look at these. The code provided is what you should use. This assignment is to bring back your programming skills. ---++ Challenges 1 Don't use some/all of the provided code. If this is the case, indicate in an obvious way that you did this in your SDR.
Edit
|
Attach
|
Watch
|
P
rint version
|
H
istory
:
r6
<
r5
<
r4
<
r3
<
r2
|
B
acklinks
|
V
iew topic
|
Raw edit
|
More topic actions...
Topic revision: r3 - 2022-08-18
-
cathybareiss
Home
Site map
Assessment web
BethelAIResources2026 web
CenterForComputing web
ChatGPT web
Intro2AIatBethel web
Main web
Sandbox web
TWiki web
CenterForComputing Web
Create New Topic
Index
Search
Changes
Notifications
RSS Feed
Statistics
Preferences
P
View
Raw View
Print version
Find backlinks
History
More topic actions
Edit
Raw edit
Attach file or image
Edit topic preference settings
Set new parent
More topic actions
Account
Log In
Register User
Edit
Attach
Copyright © 2008-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki?
Send feedback