Skip to content

Implementation of State Pattern in JAVA by simulating a FSM's state

Notifications You must be signed in to change notification settings

ghoshabhi/assignment-5-state-pattern

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Assignment 5

Here, is an example finite state machine that represents a solution to a problem for circuit design. (The problem is to keep track of whether the sum of the inputs is a multiple of 3. The inputs are unsigned 2-bit integers.) Implement this machine in Java.

  • Define a class MultiplesOf3 which supports a function computeY(String input) that returns 1 if the Y output should be 1, 0 if the Y output should be 0.
  • The input parameter can be one of “00”, “01”, “10” or “11” to represent the inputs for X

About

Implementation of State Pattern in JAVA by simulating a FSM's state

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages