lorraine chan

lorraine chan

  • NA
  • 3
  • 7.9k

C# O-O Style

Nov 21 2012 6:19 PM

Base on class Car further extend the functions by adding appropriate variables and methods that can do the following tasks:

  1. Declare a variable that holds the licence number.  Licence number is set as ""& nbsp;by default.
  2. Assuming producing a car costs $5,000 dollars, declare a variable that computes the total cost of cars produced.
  3. Create a constructor that allows users to create a new instance of car with (brand, colour, and license number).
  4. Create a method changeColour(string newColour) that enables user to change car's colour.
  5. Create an instance MikeCar that is a brand new Toyota Green car with "HEY MAN" as license number.
  6. Create a method that enables users to retrieve the number of cars produced and the total cost of production.