Base on class Car further extend the functions by adding appropriate variables and methods that can do the following tasks:
- Declare a variable that holds the licence number. Licence number is set as ""& nbsp;by default.
- Assuming producing a car costs $5,000 dollars, declare a variable that computes the total cost of cars produced.
- Create a constructor that allows users to create a new instance of car with (brand, colour, and license number).
- Create a method changeColour(string newColour) that enables user to change car's colour.
- Create an instance MikeCar that is a brand new Toyota Green car with "HEY MAN" as license number.
- Create a method that enables users to retrieve the number of cars produced and the total cost of production.
Answers
Know the answer? Post it. Somebody with the same question will find it here.