Pseudocode and Flowchart:
Program that stops production whenever there is a run of four consecutive pills that have a content of Ibuprofen above, or four consecutive pills with a level below 129.
Also use these two modules in your code:
Please make sure to use the following additional instructions:
Pseudocode for a machine that stops production whenever there is a run of four consecutive pills that have a content of Ibuprofen above, or four consecutive pills with a level below 129.
Declaration
number pills_Ibuprofen ;
number pills_above_129;
number pills_below_129;
Start
// Initialize pills_above_129 and pills_below_129 to 0
at the start of the program
pills_above_129 = 0;
pills_below_129 = 0;
pills_Ibuprofen = getIbuprofen(); // call and get the
current Ibuprofen for the pill produced
// the loop continues till we get the last pill
or
// Ibuprofen of number of pills produced consecutively
is greater than 129 or
// Ibuprofen of number of pills produced consecutively
is less than 129
while(pills_Ibuprofen != 0 and pills_above_129 < 4
and pills_below_129 < 4)
do
// check if Ibuprofen of the pill
is less than 129, greater than 129 or equal to 129 and set
pills_above_129 and pills_below_129 accordingly
if(pills_Ibuprofen > 129)
then
pills_above_129
= pills_above_129 + 1;
pills_below_129
= 0;
else if(pills_Ibuprofen < 129)
then
pills_above_129
= 0;
pills_below_129
= pills_below_129 + 1;
else
pills_above_129
= 0;
pills_below_129
= 0;
end if;
pills_Ibuprofen = getIbuprofen(); //call and get the current Ibuprofen for the pill produced
end while;
machineOFF(); // if the program comes out of the loop
then switch off the machine.
End
//end of pseudocode
Flowchart:


Pseudocode and Flowchart: Program that stops production whenever there is a run of four consecutive pills...
need help to complete this java program // add appropriate import statements here. // These imports you can leave as is. import javafx.application.Application; import javafx.scene.Group; import javafx.scene.Scene; import javafx.scene.canvas.Canvas; import javafx.scene.canvas.GraphicsContext; import javafx.scene.paint.Color; import javafx.stage.Stage; /** @author yourAccountNameHere */ public class ConnectTheDots extends Application { /* * Do not add code to main(). Add it below in connectTheDots instead. */ public static void main(String[] args) { launch(args); } /*...