/
Mest.cs
42 lines (35 loc) · 897 Bytes
/
Mest.cs
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;
namespace FoodManagerApp.Foods
{
public enum MeatTypes
{
Biff,
Pork,
Chicken,
Deer,
Other
}
public class Meat : Food
{
//Constructor
public Meat()
{
}
/// <summary>
/// Determine if a certain eater type can eat this type of food
/// </summary>
/// <param name="eater">An EaterType enumeration element</param>
/// <returns>True if this eater type can eat this food item, false otherwise</returns>
public override bool IsGoodFor(EaterType eater)
{
return (eater == EaterType.Carnivora) || (eater == EaterType.Omnivorous);
}
public override string ToString()
{
return base.ToString();
}
}
}