-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram.cs
More file actions
42 lines (35 loc) · 1.19 KB
/
Copy pathProgram.cs
File metadata and controls
42 lines (35 loc) · 1.19 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
41
42
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace _18.SimpleClassExample
{
internal class Program
{
static void Main(string[] args)
{
Console.WriteLine("***** Fun with Class Types *****\n");
// разместим и сконфигурируем объект
Car myCar = new Car("Sammanta");
//myCar.petName = "Porshe 911";
//myCar.currSpeed = 90;
for (int i = 0; i <= 10; i++)
{
myCar.SpeedUp(10);
myCar.PrintState();
}
Motorcycle myMoto = new Motorcycle();
myMoto.PopAWheelly();
Console.WriteLine();
myMoto.setDriverName("Tinny");
Console.WriteLine($"Driver name: {myMoto.name}");
Console.WriteLine();
Motorcycle3 myNewMoto = new Motorcycle3(5);
myNewMoto.setDriverName("Polly");
myNewMoto.PopAWheelly();
Console.WriteLine($"Intensity : {myNewMoto.driverIntensity}, Name : {myNewMoto.driverName}");
Console.ReadLine();
}
}
}