It is necessary to create a visual algorithm of the program (Flowchart), but since the output is carried out by pressing the button, the user exits or in case of error (Almost at any point of the algorithm), I cannot depict it, are there any ways to depict it, and if not , where to denote this rule. It is natural to move on to this after every action - not an option.
- Using a flowchart is unlikely, but UML diagrams may help - Grundy
- Unfortunately, my task is to create an algorithm in the form of a flowchart - Alexander
- Congratulations, you were given an impossible task :) - Grundy
- You just need to find or come up with a block diagram for the event element. - vp_arth 2:01 pm
- @vp_arth. Is there such an element? :) - Grundy
1 answer
Yes. Now I understand. You need a block diagram. Then at the very beginning of the block diagram, you can insert two While statements. In the first condition "While there are no errors" in the second "Until the Exit button is pressed", the program body is executed, otherwise the end of programs.
In addition to the variant with two conditional while statements, before the beginning of the main program body, there is a variant with a parallel process. GOST 19.701-90. symbol 3.2.2.5. Parallel actions. Those. Initially, the program is divided into three parallel processes: the first is waiting for an error, otherwise the exit, the second is waiting for a button to press, otherwise the exit, the third is the body of your program.
Although the parallel process is still a new thread, but perhaps this option will be logical to display what you want.
- Please do not create 2 answers to 1 question, use the "edit" button for the main answer, and delete the second one. - user218976 2:55 pm
- I personally like the idea of a parallel process. Still, the user is an external factor. Making it into the algorithm of the program cycle operation is not a very beautiful solution. Whether business, to show that it can influence the main flow. - George Chebotaryov
- In the form of a loop, the algorithm will be incorrect, since this will suggest the possibility of completion only after the execution of the whole body and the transition to the condition. I did, as you say, three parallel processes: The "Exit" button is pressed -> Pressing || Handling basic processes | | Exception-> Exception handling. Exceptions of course do not go in a separate thread, but here is the processing of clicks - on the contrary, it is in a separate thread, since this is javafx. - Alexander