Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Car {
- private String model;
- private Engine engine;
- private String weight;
- private String color;
- public Car(String carModel, Engine engine, String weight, String color) {
- this.model = carModel;
- this.engine = engine;
- this.weight = weight;
- this.color = color;
- }
- public String getEngineModel() {
- return this.engine.getModel();
- }
- public String getEnginePower() {
- return this.engine.getPower();
- }
- public String getEngineDisplacement() {
- return this.engine.getDisplacement();
- }
- public String getEngineEfficiency() {
- return this.engine.getEfficiency();
- }
- public String getWeight() {
- return this.weight;
- }
- public String getColor() {
- return this.color;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement