-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAnimalManagement.cs
More file actions
31 lines (27 loc) · 1.38 KB
/
AnimalManagement.cs
File metadata and controls
31 lines (27 loc) · 1.38 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
namespace petsData
{
public static class AnimalManagement
{
public static void InitializeAnimals(List<Animal> ourPets, int maxPets)
{
ourPets.Add(CreateAnimal("d1", "dog", 2, "lola", "medium sized cream colored female golden retriever weighing about 65 pounds. housebroken.", "loves to have her belly rubbed and likes to chase her tail. gives lots of kisses."));
ourPets.Add(CreateAnimal("d2", "dog", 9, "loki", "large reddish-brown male golden retriever weighing about 85 pounds. housebroken.", "loves to have his ears rubbed when he greets you at the door, or at any time! loves to lean-in and give doggy hugs."));
ourPets.Add(CreateAnimal("c3", "cat", 1, "Puss", "small white female weighing about 8 pounds. litter box trained.", "friendly"));
ourPets.Add(CreateAnimal("c4","cat", 0, "", "", ""));
// Ensure the list has the desired capacity
ourPets.Capacity = maxPets;
}
public static Animal CreateAnimal(string id, string species, int age, string nickname, string appearance, string personality)
{
return new Animal
{
ID = id,
Species = species,
Age = age,
Nickname = nickname,
Appearance = appearance,
Personality = personality
};
}
}
}