Добавил:
Только когда поступишь в технический вуз поймешь на сколько ты гуманитарий Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Скачиваний:
4
Добавлен:
15.02.2025
Размер:
859 б
Скачать
package bikeproject;

public class Bike implements BikeManufacturer {

	private String handleBars, frame, tyres, seatType;
	private int NumGears;

	public Bike() {
		this.handleBars = "default";
		this.frame = "default";
		this.tyres = "default";
		this.seatType = "default";
		this.NumGears = 1;
	}
	
	public Bike(String handleBars, String frame, String tyres, String seatType, int numGears) {
		this.handleBars = handleBars;
		this.frame = frame;
		this.tyres = tyres;
		this.seatType = seatType;
		this.NumGears = numGears;
	}
	@Override
	public void printDescription() {
		System.out.println("\n" + Make + "\n"
				+ "This bike has " + this.handleBars + " handlebars on a "
				+ this.frame + " frame with " + this.NumGears + " gears."
				+ "\nIt has a " + this.seatType + " seat with " + this.tyres + " tyres.");
	}
}
	

Соседние файлы в папке ПР-6