I was just wondering, my teacher assigned a project for me and told me to "create one cat in SandBox and put all the methods (for example method_1) you need for the excercises in KittyKitty and call then (one at a time) from SandBox" and to turn in only one sandbox and one kittykitty, how if there are 6 assignments??? I dont understand!!!
I dont understand this!!
Collapse
X
-
It sounds like your teacher wants you to create one class 'SandBox' that instantiates another class 'Cat,' and call the methods from there.Originally posted by ryann18I was just wondering, my teacher assigned a project for me and told me to "create one cat in SandBox and put all the methods (for example method_1) you need for the excercises in KittyKitty and call then (one at a time) from SandBox" and to turn in only one sandbox and one kittykitty, how if there are 6 assignments??? I dont understand!!!
Or you could put the method results in variables if they returned something, and manipulate them from there. Does that seem to fit with what your teacher was saying?Code:public class Cat { // method_1 -> method_6 here } public class SandBox { Cat KittyKitty = new Cat(); System.out.println(KittyKitty.method_1()); } -
Yeah that fits but how would I put only one sandbox on there if I have 6 exercises to plug in??Originally posted by sicarieIt sounds like your teacher wants you to create one class 'SandBox' that instantiates another class 'Cat,' and call the methods from there.
Or you could put the method results in variables if they returned something, and manipulate them from there. Does that seem to fit with what your teacher was saying?Code:public class Cat { // method_1 -> method_6 here } public class SandBox { Cat KittyKitty = new Cat(); System.out.println(KittyKitty.method_1()); }Comment
Comment