Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Finite State Machine pattern #203

Open
stephen-lazarionok opened this issue Aug 12, 2015 · 34 comments
Open

Finite State Machine pattern #203

stephen-lazarionok opened this issue Aug 12, 2015 · 34 comments

Comments

@stephen-lazarionok
Copy link

stephen-lazarionok commented Aug 12, 2015

Description:
The Finite State Machine (FSM) design pattern is a behavioral design pattern used to model the behavior of a system that can be in one of a finite number of states. The system transitions from one state to another in response to external events or internal actions. This pattern is useful in scenarios where an object’s behavior is dependent on its state, and the state can change in response to events.

Main elements of Finite State Machine pattern:

  1. States: Define the possible states the system can be in.
  2. Transitions: Define the rules or conditions that trigger a change from one state to another.
  3. Events: Actions or occurrences that cause state transitions.
  4. Context: Maintains the current state of the system and facilitates state transitions.
  5. State Interface: Defines the behavior associated with each state. Each state implements this interface to define its specific behavior.

References:

Acceptance Criteria:

  1. Implement the FSM pattern with at least three distinct states and the transitions between them.
  2. Create a context class that maintains the current state and handles state transitions based on events.
  3. Provide example scenarios demonstrating the FSM pattern, including state definitions, transitions, and event handling.
@iluwatar
Copy link
Owner

Hi there @stephen-lazarionok ,

I am aware of the State pattern but unfamiliar with the FSM. Can you point the source of the pattern, web link or some book maybe?

@iluwatar
Copy link
Owner

Thank you for the links. Especially the first explains the pattern well. We'll accept the pattern once you make the pull request.

@stephen-lazarionok
Copy link
Author

Initial pull request is ready - Finite state machine #222. I will add the documentation later as well as include this module to the parent pom.xml later.

@amit2103
Copy link
Contributor

@iluwatar Can I work on this?

@iluwatar
Copy link
Owner

@amit2103 Yes, I will change the labels

@iluwatar
Copy link
Owner

iluwatar commented May 1, 2016

@amit2103 any updates?

@amit2103
Copy link
Contributor

amit2103 commented May 1, 2016

@iluwatar COmpleted..Writing Junits

@iluwatar
Copy link
Owner

@amit2103 are you still working on this?

@iluwatar
Copy link
Owner

No answer, so this issue is free for taking once again.

@npczwh
Copy link
Contributor

npczwh commented May 13, 2020

@iluwatar I'd like to take this

@iluwatar
Copy link
Owner

This issue is free for taking again.

@JMZ-kk
Copy link

JMZ-kk commented Apr 2, 2022

I want to take this, could you assign it to me?

@JMZ-kk JMZ-kk mentioned this issue Apr 19, 2022
@iluwatar
Copy link
Owner

iluwatar commented Jul 1, 2022

Ok @JMZ-kk

@iluwatar
Copy link
Owner

@JMZ-kk are you working on this?

@JMZ-kk
Copy link

JMZ-kk commented Sep 22, 2022 via email

@JanFidor
Copy link
Contributor

@iluwatar could I pick up this magnificent pattern?

@ohbus
Copy link
Contributor

ohbus commented Oct 28, 2022

⭐ Sure thing! Thanks for your interest in our project 😃

✔️ Please mention a 📆 timeline 🕙 for when can we expect 🤔 a Pull Request against this issue.

🤝 Looking forward to your contribution.
📖 Be sure to check out our Wiki section

@JanFidor
Copy link
Contributor

@ohbus Hi, as for 📆 timeline I should be able to make a PR in ~2-3 days, but to eer on the side of caution, it will definitely be finished within a week.

@stale
Copy link

stale bot commented Nov 29, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the status: stale issues and pull requests that have not had recent interaction label Nov 29, 2022
@stale stale bot removed the status: stale issues and pull requests that have not had recent interaction label Dec 3, 2022
pratigya0 pushed a commit to pratigya0/java-design-patterns that referenced this issue Aug 3, 2023
* Added explanation and example of public IP address

* Removed the IP and ISP bit
@iluwatar
Copy link
Owner

Updated task description

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment