Right so i have got this class called PlaneSeat,
the constructor in another class called PlaneSeat is
public PlaneSeat (int seat_id){
this.seatId = seat_id;
}
1) I wish to create 12 instances of this class with each PlaneSeat having a seatID of 1-12
Should i do this: (I dont know what this does)
private int PlaneSeat;
PlaneSeat [] seats = new PlaneSeat[12];
or (I dont know what this does either)
private int PlaneSeat[] = { 1,2,3,4,5,6,7,8,9,10,11,12};
Which one is better and what does what?
2) Also, if i have another class where the main is found and i wish to access the seat ID of each seat on the plane, how should i do it?
jet1.getSeatID // doesnt work where jet1 is a instance of a plane