private Porsche newPorsche(String model, String year, String color) { Porsche porsche = new Porsche(); porsche.setMake("Porsche"); porsche.setModel(model); porsche.setYear(year); porsche.setColor(color); return porsche; } }
oldCar.setColor("white"); oldCar.setModel("GT2000"); oldCar.setYear("2000");