
Добавил:
nechitay03
Только когда поступишь в технический вуз поймешь на сколько ты гуманитарий
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз:
Предмет:
Файл:JAVA ДЛЯ ПОТОКОВ ИВБО / ПР-5 / Vehicles
.java package vehicles;
import java.util.Scanner;
public abstract class Vehicles {
private String model;
private int license;
private String color;
private int year;
private String ownerName;
private int insuranceNumber;
protected String engineType;
public Vehicles(String model, String color, String ownerName, String engineType, int license, int year, int insuranceNumber) {
this.model = model;
this.license = license;
this.color = color;
this.year = year;
this.ownerName = ownerName;
this.insuranceNumber = insuranceNumber;
this.engineType = engineType;
}
public void setModel(String model) {
this.model = model;
}
public String getModel() {
System.out.println(model);
return model;
}
public void setColor(String color) {
this.color = color;
}
public String getColor() {
System.out.println(color);
return color;
}
public void setName(String ownerName) {
this.ownerName = ownerName;
}
public String getName() {
System.out.println(ownerName);
return ownerName;
}
public void setEngine(String engineType) {
this.engineType = engineType;
}
public String getEngine() {
System.out.println(engineType);
return engineType;
}
public void setLicense(int license) {
this.license = license;
}
public int getLicense() {
System.out.println(license);
return license;
}
public void setYear(int year) {
this.year = year;
}
public int getYear() {
System.out.println(year);
return year;
}
public void setNumber(int insuranceNumber) {
this.insuranceNumber = insuranceNumber;
}
public int getNumber() {
System.out.println(insuranceNumber);
return insuranceNumber;
}
public abstract String vehicleType();
}
import java.util.Scanner;
public abstract class Vehicles {
private String model;
private int license;
private String color;
private int year;
private String ownerName;
private int insuranceNumber;
protected String engineType;
public Vehicles(String model, String color, String ownerName, String engineType, int license, int year, int insuranceNumber) {
this.model = model;
this.license = license;
this.color = color;
this.year = year;
this.ownerName = ownerName;
this.insuranceNumber = insuranceNumber;
this.engineType = engineType;
}
public void setModel(String model) {
this.model = model;
}
public String getModel() {
System.out.println(model);
return model;
}
public void setColor(String color) {
this.color = color;
}
public String getColor() {
System.out.println(color);
return color;
}
public void setName(String ownerName) {
this.ownerName = ownerName;
}
public String getName() {
System.out.println(ownerName);
return ownerName;
}
public void setEngine(String engineType) {
this.engineType = engineType;
}
public String getEngine() {
System.out.println(engineType);
return engineType;
}
public void setLicense(int license) {
this.license = license;
}
public int getLicense() {
System.out.println(license);
return license;
}
public void setYear(int year) {
this.year = year;
}
public int getYear() {
System.out.println(year);
return year;
}
public void setNumber(int insuranceNumber) {
this.insuranceNumber = insuranceNumber;
}
public int getNumber() {
System.out.println(insuranceNumber);
return insuranceNumber;
}
public abstract String vehicleType();
}
Соседние файлы в папке ПР-5