Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package ngpaketic;
- public class MAIN {
- public static void main(String[] args) {
- // TODO Auto-generated method stub
- // opis,kome ide,da li je spakovan,min uzrast,da li je zasluzen,da li je spreman za isporuku
- NovogodisnjiPaketic p1=new NovogodisnjiPaketic("Autic","Decak",false,5,true,true);
- NovogodisnjiPaketic p2=new NovogodisnjiPaketic("Lutka","Devojcica",false,12,true,false);
- NovogodisnjiPaketic p3=new NovogodisnjiPaketic("Barbika","Devojcica",false,9,true,false);
- NovogodisnjiPaketic p4=new NovogodisnjiPaketic("Lopta","Decak",false,15,true,false);
- System.out.println(p1.getNamenjen());
- System.out.println(p1.isSpakovan());
- System.out.println(p1.isSpreman_isporuka());
- p1.setOpis("Kamion");
- p1.setSpreman_isporuka(false);
- DedaMraz vreca=new DedaMraz();
- System.out.println(vreca);
- p1.spakuj();
- p2.spakuj();
- p3.spakuj();
- p4.spakuj();
- vreca.dodajPaketic(p1);
- vreca.dodajPaketic(p2);
- vreca.dodajPaketic(p3);
- vreca.dodajPaketic(p4);
- vreca.pripremaZAisporuku(p1,"Lopta");
- vreca.pripremaZAisporuku(p2,"Lutka");
- vreca.pripremaZAisporuku(p3,"Lutka");
- vreca.pripremaZAisporuku(p4,"Lopta");
- vreca.dodajPaketic(p1);
- vreca.dodajPaketic(p2);
- vreca.dodajPaketic(p3);
- vreca.dodajPaketic(p4);
- vreca.izbaci("Devojcica");
- vreca.izbaci("Decak");
- System.out.println(vreca);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement