Code improvement

Report a typo

You are working on an application, which simulates car creation and driving. This app constructs a car from different parts and gives it to a driver. Here's a part of the application in pseudocode:

class Engine is ...
class Wheel is ...

class Car is 
  Engine eng = new Engine()
  Wheel whl = new Wheel()

  constructor Car() is
    this.eng = eng
    this.whl = whl

  method drive() is ...


class Driver is 
  Car car = new Car()
  car.drive()

How can you improve it?

Select one or more options from the list
___

Create a free account to access the full topic