Description: e5_2: About inheritance and overloading:
Write a Java application, to design a vehicle class Transport, including members of the attributes are: speed (pace), load (load) Automotive Transport Vehicle is a subclass, which contains the attributes: the number of wheels (wheels) and weight (weight) Aircraft Transport Airplane class is a subclass, which contains attributes: type (enginetype) and the number of engine (engines), each class has a data output method. Such as the Transport category, there getload () and getpace () method to obtain the object s speed and load, a show () method of the object on the screen output speed and load, a constructor (with parameters) to the initial The object of a vehicle speed and load. Define auto and aircraft constructor classes and get methods, then a main class main () are defined three classes of objects, setting its properties, and output the corresponding property value.
To Search:
File list (Check if you may need any files):
e5_3\Ball.class
....\e5_3.class
....\e5_3.java
....\e5_3.jcd
....\e5_3.jcp
....\e5_3.jcu
....\e5_3.jcw
....\Square.class
....\Volume.class
e5_3