-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram.cs
More file actions
36 lines (31 loc) · 1.18 KB
/
Program.cs
File metadata and controls
36 lines (31 loc) · 1.18 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
using System;
namespace SmallStore
{
class Program
{
static void Main(string[] args)
{
//Create new Simple Store and InventoryRetailStore
IStore galleryDePate = new SimpleStore();
InventoryRetailStore invStore = new InventoryRetailStore();
// Creation of Products
Product x1 = new Product(1, "Painting Picasso. Guernica", 100, 1000);
Product x2 = new Product(2, "Painting Tsarouxis. Naftis A", 200, 2000);
Product x3 = new Product(3, "Chair. Luis XV", 100, 1000);
Product x4 = new Product(4, "Vase. Cubic", 500, 5000);
//Samples transactions of SimpleStore
galleryDePate.Buy(x1);
galleryDePate.Buy(x3);
galleryDePate.Sell(x1);
Console.WriteLine(galleryDePate.GetRevenue());
//Samples transactions of InvStore
invStore.Buy(x1);
invStore.Buy(x3);
invStore.Sell(x1);
Console.WriteLine(invStore.GetRevenue());
invStore.Sell(x2);
invStore.GetInventory();
Console.WriteLine(invStore.GetRevenue());
}
}
}