Hello,
Follow the following
1 - create a new set of boxes;
Say in the main method that you put in a class that your name or Applications Main.
Code:
EnsembleCartons al = new EnsembleCartons();
2- INSEE an object in a set of boxes;
You therefore need a method add (Card card) in your class EnsembleCartons.
Code:
Public void add(Cardboard car){
car.add(cardboard);
}
Cardboard is a list of type ArrayList <Carton> object.
3- list the numerous cartons of a set of boxes;
You create a eNews method in class EnsembleCartons:
Here is the code for the same
Code:
Public void printCartons(){
for(Cardboard car: car){
System.out.System.out.println("Cardboard" + Cardboard.id);
}
}
Bookmarks