-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgam.cs
More file actions
40 lines (31 loc) · 1.08 KB
/
Progam.cs
File metadata and controls
40 lines (31 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
using System;
namespace FirstApp
{
class CarToys
{
static void Main(string[] args)
{
// Created object instance of Car called myCar
Car myCar = new Car();
// This sets the value of Spiked to the object
myCar.TypeTire = "Spiked";
myCar.EngageTire(); // The spikes are engaged
// This is a second object instance of Car
Car mySecondCar = new Car();
mySecondCar.TypeTire = "Nubbed";
Console.WriteLine(mySecondCar.TypeTire); // Nubbed
Car myThirdCar = new Car();
// This sets the value of Tinted to the object
myCar.Window = "Tinted";
myCar.ShadeWindow(); // The windows are shaded
Car myFourthCar = new Car();
myCar.Door = "Four Doors";
myCar.ClosedDoor();
Car myFifthCar = new Car();
myCar.Gas = "on empty";
myCar.Octane();
new Car();
myCar.TypeOfCar();
}
}
}