Class Program2
- java.lang.Object
-
- Program2
-
public class Program2 extends Object
Question 2. Design a class [15 marks] Suppose you are writing a program to simulate a production line where many boxes are moving on a conveyor belt from right to left. Complete the Box class to specify Box objects that are used by the simulation below.
-
-
Constructor Summary
Constructors Constructor Description Program2()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static void
main(String[] args)
void
runSimulation()
Runs a simulation of a box moving from right to left on a conveyor belt.void
setupGUI()
-
-
-
Method Detail
-
runSimulation
public void runSimulation()
Runs a simulation of a box moving from right to left on a conveyor belt. You do not need to fully understand this method. DO NOT MODIFY THIS METHOD.
-
setupGUI
public void setupGUI()
-
main
public static void main(String[] args)
-
-