Зміст курсу
C# Beyond Basics
C# Beyond Basics
Practicing `static` Keyword
In this problem, you need to:
- Create a new private field called
totalCars
of typedouble
which tracks the total number of Car objects created; - Create a getter method called
getTotalCars
which simply returns the number of objects; - Make sure the value of the
totalCars
field is incremented every time a new Car object is created.
index
Все було зрозуміло?