Hello again,


I have created the project but without super() method in instances of 
Sedan and Ford. Without super() it works good.


In MyOwnShop class I have created for example instance Sedan as follow:

        //Create an instance Sedan
Sedan[] sedan1=new Sedan[1];
sedan1[0]=new Sedan(120,1200,"red",5);

 for (int i=0; i<sedan1.length; i++){

      System.out.println("Type: "+ sedan1[i].getClass().getName()+
                         " Sale price = " + sedan1[i].getSalePrice());
        }

This is not so correct because in homework the fields: 
speed,regularPrice and color should be initialized by super().


How to do that.
Please help!

Best regards,
Rafał Laczek

----------------------------------------------------
Spędź magiczny weekend w hotelu SPA&Wellness. Masaże, balneoterapia,
fango, aromaterapia to tylko niektóre propozycje. Sprawdź - Kliknij:
http://klik.wp.pl/?adr=http%3A%2F%2Fhotele.wp.pl%2Fspa.html&sid=659



--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/javaprogrammingwithpassion?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to