Please check this assignment file and I would appreciate whatever help you guys give me.
Attached File(s)
-
A2help.pdf (406.58K)
Number of downloads: 20
This post has been edited by mastdesi: 06 October 2011 - 08:01 AM




Posted 06 October 2011 - 07:55 AM
A2help.pdf (406.58K)
This post has been edited by mastdesi: 06 October 2011 - 08:01 AM
Posted 06 October 2011 - 07:57 AM
This post has been edited by Fuzzyness: 06 October 2011 - 07:57 AM
Posted 06 October 2011 - 08:05 AM
package Package1;
public class Vehicule {
String fuelT;
double consum;
int price;
public Vehicule ()
{
fuelT = "";
consum = 0.0;
price = 0;
}
public Vehicule(String f, double c, int p)
{
this.fuelT = f;
this.consum = c;
this.price = p;
}
}
package Package2;
import Package1.Vehicule;
public class Car extends Vehicule {
private String carBrand;
private String carMake;
private int year;
public Car()
{
carBrand = "";
carMake = "";
year = 0;
}
public Car(String b, String m, int y, String f, double c, int p)
{
this.carBrand = b;
this.carMake = m;
this.year = y;
}
}
Posted 06 October 2011 - 08:15 AM
Posted 06 October 2011 - 08:26 AM
