-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathProgram.cs
More file actions
53 lines (43 loc) · 1.33 KB
/
Copy pathProgram.cs
File metadata and controls
53 lines (43 loc) · 1.33 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
43
44
45
46
47
48
49
50
51
52
53
using CombinedExample.Bussiness.Abstract;
using CombinedExample.Bussiness.Concrete;
using CombinedExample.Bussiness.Interface;
using CombinedExample.Model.Abstract;
using CombinedExample.Model.Concrete;
using CombinedExample.Model.Interface;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CombinedExample
{
class Program
{
static void Main(string[] args)
{
CarHandler sedanHandler = new SedanHandler();
CarHandler suvHandler = new SuvHandler();
CarHandler hbackHandler = new HbackHandler();
sedanHandler.SetSuccessor(suvHandler);
suvHandler.SetSuccessor(hbackHandler);
List<CarBase> carBases = new List<CarBase>()
{
new CarBase
{
Brand = "Togg",
Model = "Xpr-sedan",
Price = 500,
Produce=true,
}};
foreach (CarBase item in carBases)
{
sedanHandler.HandleCar(item);
}
ICar car = new SedanHandler();
CreateCar.CreateCars(car);
CarBase carBase = new CarBase();
carBase.AddObserver(new SedanObserver());
Console.ReadKey();
}
}
}