I have created a class with Array Lists in Blue J for my assignment and it compiles but I don’t know how to test it.
What do I have to type(parameter?) in method call for a method such as
public void addJob(Job job)
public boolean runJob()
I understand that for int I just have to type numbers such as 2, and String “B”.
Firstly you have to create an instance of your
Jobclass and give it a name, e.g.job1. This can be done by right-clicking on the class and then clicking onnew Job(). The resulting object will be listed in the box at the bottom of the BlueJ window and can be used in your BlueJ project.Now call the method
addJob(Job job)withjob1(just type in the name of the object, without quotes) as the parameter and your test should work.