I have a task to reimplement this net (library system) into a 'finite' net, which ends after 5 'readings'. I have totally no clue how to achieve this, it was our first lesson.

Is there someone that could help me?

enter image description here

  • 3
    $\begingroup$ What have you tried? Where did you get stuck? We do not want to just do your (home-)work for you; we want you to gain understanding. However, as it is we do not know what your underlying problem is, so we can not begin to help. See here for a relevant discussion. If you are uncertain how to improve your question, why not ask around in Computer Science Chat? You may also want to check out our reference questions. $\endgroup$ – Raphael Apr 10 '16 at 12:45
  • 1
    $\begingroup$ Hint: Imagine the net as a while-loop. How do you limit a loop to five iterations? $\endgroup$ – Raphael Apr 10 '16 at 12:46

In order to prevent a loop from running forever you need to either

  • keep track of how many times you've performed the loop using a loop counter
  • change the conditions of your state machine inside the loop so that you ensure it will stop at some point.
| cite | improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.