-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCoffee.cs
More file actions
69 lines (65 loc) · 1.83 KB
/
Coffee.cs
File metadata and controls
69 lines (65 loc) · 1.83 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
using System;
using System.Collections.Generic;
using System.Diagnostics.Eventing.Reader;
using System.Text;
namespace ListBeverages
{
enum Roast
{
Light,
Medium,
Dark
}
enum GrindSize
{
ExtraCourse,
Course,
Medium,
Fine,
ExtraFine
}
internal class Coffee : Beverage
{
private static int counter = 0;
public Coffee(string name, float ounces, bool Ishot, string instructions, string flavor, Roast roast, params string[]ingrediants)
{
this.Name = name;
this.Ounces = ounces;
this.IsHot = Ishot;
this.Instructions = instructions;
this.Flavor = flavor;
this.Roast = roast;
this.Ingrediants = ingrediants;
counter++;
this.Id = counter;
}
public string BeanOrgin { get; set; }
public float grindAmount { get; set; }
public bool ContainsCaffine { get; set; }
public Roast Roast { get; set; }
public GrindSize GrindSize { get; set; }
public int Id { get; set; } = 0;
public string GetBeanData()
{
string s;
s =$"Caffine: {ContainsCaffine}\nRoast: {this.Roast}\nGrind: {GrindSize}\nAmount: {grindAmount} ounces\nOrgin: {BeanOrgin}\n";
return s;
}
public string GetMetrics()
{
string s;
s = $"Ounce: {Ounces}\nHot? : {IsHot}\nTemperature: {Temperature}";
return s;
}
public StringBuilder GetIngrediants()
{
StringBuilder sb = new StringBuilder();
foreach (string item in Ingrediants)
{
sb.Append(item);
sb.Append('\n');
}
return sb;
}
}
}