Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class RentalThing{
- public RentalThing(){
- Renter rn = new Renter();
- ar.add(rn);
- }
- }
- class Renter{
- ArrayList containers = new ArrayList()<>
- public Renter(){
- generateContainters();
- }
- public ArrayList<Containers> generateContainters(){
- for(int i =0; i<3; i++){
- Containers c = new Containers(i);
- containers.add(c);
- }
- }
- pubilic Containers getContainerWParameters(int param){
- return getContainterNumber(param);
- }
- pubilic Containers getContainterNumber(int containerNumber){
- for(Containers co : containers){
- if(co.number == containerNumber){
- return co;
- }
- }
- }
- }
- class Containers{
- public int number;
- public Containers(int number){
- this.number = number;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement