package test3;
public class car
{/*定义数组存储3部汽车对象
汽车属性:品牌,价格,颜色
创建三个汽车对象,数据通过键盘录入而来,并把数据存入数组中*/
static String brond;
double price;
String color;
public car() {
}
public car(String brond, double price, String color) {
this.brond = brond;
this.price = price;
this.color = color;
}
public static String getBrond() {
return brond;
}
public void setBrond(String brond) {
this.brond = brond;
}
public double getPrice() {
return price;
}
public void setPrice(double price) {
this.price = price;
}
public String getColor() {
return color;
}
public void setColor(String color) {
this.color = color;
}
}