-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram.cs
More file actions
318 lines (279 loc) · 13.1 KB
/
Copy pathProgram.cs
File metadata and controls
318 lines (279 loc) · 13.1 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
using System;
using System.Collections.Generic;
using System.Text;
namespace Zoo
{
static class Program
{
static void Main()
{
Cage cagney = new Cage("Rainforest", true);
//int inputAnimal;
//bool loop = true;
//while (loop == true)
//{
// Fish AnglerFish = new Fish("Cocaine", "male", false, "none", "cold water", true, true, 3, 2, "5m x 5m x 5m");
// Fish Blobfish = new Fish("Jack", "female", false, "paracetamol", "cold water", true, true, 1, -5, "5m x 5m x 5m");
// Fish Pufferfish = new Fish("Lol", "Male", true, "none", "warm water", true, true, 0.05, 25, "5m x 10m x 5m");
// Birds Toucan = new Birds("Frog", "male", false, "none", "rainforest", "Black and white", "Large", false, "10ft x 15ft", "squawk");
// Birds Cockatoo = new Birds("Kiril", "female", false, "none", "tropical", "Yellow and white", "Snall", false, "5ft x 10ft", "squawk and talk");
// Birds Macaw = new Birds("xavier", "female", false, "none", "tropical", "Yellow, Red, Blue, and Green", "Medium", false, "10ft x 15ft", "squawk and talk");
// Mammals redPanda = new Mammals("THE WONDERFUL THING ABOUT TIGERS", "Female", false, "None", "cold climates", "FLUFFY", "Squeak", "10pm-5am", 150);
// Mammals PolarBear = new Mammals("mog", "Female", false, "None", "Arctic tundra", "Thick fur", "growl", "7pm-8am", 100);
// Mammals Tiger = new Mammals("Polly", "Female", false, "None", "Asia", "Thin fur", "growl", "9pm-5am", 300);
// Mammals Cheetah = new Mammals("Margaret", "Fe", false, "Pills", "Savannah", "Thin fur", "growl", "9pm-5am", 300);
// Mammals Dolphin = new Mammals("Steven", "Female", false, "None", "Tropical Oceans", "Skin", "Whistles and clicks", "-", 400);
// Mammals Lemur = new Mammals("Gary", "Male", false, "none", "Treetops", "Slightly Fluffy", "Squeal", "10pm-5am", 150);
// Mammals Orca = new Mammals("Dave", "Neuter", true, "nope", "lol", "Skin", "Whale noises", "-", 400);
// Animal[] animals = new Animal[] { redPanda, PolarBear, Tiger, Cheetah, Dolphin, Lemur, Orca, Toucan, Cockatoo, Macaw, AnglerFish, Blobfish, Pufferfish };
// Console.WriteLine("~~~~~~ENTER AN ANIMAL!~~~~~~");
// Console.WriteLine("MAMMALS");
// Console.WriteLine("1 - Red Panda");
// Console.WriteLine("2 - Polar Bear");
// Console.WriteLine("3 - Tiger");
// Console.WriteLine("4 - Cheetah");
// Console.WriteLine("5 - Dolphin");
// Console.WriteLine("6 - Lemur");
// Console.WriteLine("7 - Orca");
// Console.WriteLine("BIRDS");
// Console.WriteLine("8 - Toucan");
// Console.WriteLine("9 - Cockatoo");
// Console.WriteLine("10 - Macaw");
// Console.WriteLine("FISH");
// Console.WriteLine("11 - Angler Fish");
// Console.WriteLine("12 - Blobfish");
// Console.WriteLine("13 - Pufferfish");
// //for (int x = 0; x != animals.Length; x++)
// //{
// // Console.WriteLine(x + 1 + " - " + animals.Name[x]);
// //}
// Console.WriteLine("~~~~~~~~~~~~~~~~~~~~");
// //Console.WriteLine("-1 - Create an animal");
// Console.WriteLine("0 - Exit the Program");
// Console.Write(">>> ");
// inputAnimal = Int32.Parse(Console.ReadLine());
// Console.Clear();
// if (inputAnimal == 0)
// {
// loop = false;
// }
// //else if (inputAnimal == -1)
// //{
// // animalMaker();
// //}
// else
// {
// DisplayStuff(animals[inputAnimal - 1]);
// Console.WriteLine("~~~~~~~~~~~~~~~~~~~");
// Console.WriteLine("Press enter to exit");
// Console.Write(">>> ");
// Console.ReadLine();
// Console.Clear();
// }
//}
}
public static void DisplayStuff(Animal animal)
{
Console.WriteLine("Name: " + animal.Name);
Console.WriteLine("Age: " + animal.Age);
Console.WriteLine("Gender: " + animal.Gender);
Console.WriteLine("Diet: " + animal.Diet);
Console.WriteLine("Weight: " + animal.Weight);
Console.WriteLine(animal.GetIll);
if (animal is Mammals mammal)
{
displayMammals(mammal);
}
else if (animal is Birds birds)
{
displayBirds(birds);
}
else if (animal is Fish fish)
{
displayFish(fish);
}
}
public static void displayMammals(Mammals animal)
{
Console.WriteLine("~~~~~~MAMMAL-SPECIFIC DATA~~~~~~");
Console.WriteLine("Fur Type: " + animal.FurType);
Console.WriteLine("Noise: " + animal.Noise);
Console.WriteLine("Sleep Schedule: " + animal.SleepSchedule);
Console.WriteLine("Daily Exercise needed: " + animal.ExerciseNeeded + "m");
}
public static void displayBirds(Birds animal)
{
Console.WriteLine("~~~~~~BIRD-SPECIFIC DATA~~~~~~");
Console.WriteLine("Beak size: " + animal.BeakSize);
Console.WriteLine("Colour: " + animal.ColourOfFeathers);
Console.WriteLine("Is Depressed? " + animal.Depression);
Console.WriteLine("Optimum Enclosure size: " + animal.Enclosure);
Console.WriteLine("Beak size: " + animal.BeakSize);
Console.WriteLine("Noise: " + animal.Noise);
}
public static void displayFish(Fish animal)
{
Console.WriteLine("~~~~~~FISH-SPECIFIC DATA~~~~~~");
Console.WriteLine("Has Gills? " + animal.Gills);
Console.WriteLine("Has Fins? " + animal.Fins);
Console.WriteLine("Optimum depth: " + animal.Depth);
Console.WriteLine("Optimum Water temperature: " + animal.WaterTemperature + "°C");
Console.WriteLine("Best Tank size: " + animal.TankSize);
}
// public static void animalMaker()
// {
// string tempCatag;
// string newCatag;
// string newSpecies;
// string newName;
// string newGender;
// string newHabitat;
// string tempPoisonous;
// bool newPoisonous;
// string newMedication;
// Console.Clear();
// Console.WriteLine("Enter the CATAGORY of the animal (1 - Mammal, 2 - Bird or 3 - Fish)");
// Console.Write(">>> ");
// tempCatag = Console.ReadLine();
// if (tempCatag == "1")
// {
// newCatag = "Mammal";
// }
// else if (tempCatag == "2")
// {
// newCatag = "Bird";
// }
// else if (tempCatag == "3")
// {
// newCatag = "Fish";
// }
// Console.WriteLine("What SPECIES of animal is it?");
// Console.Write(">>> ");
// newSpecies = Console.ReadLine();
// Console.WriteLine("Enter the NAME of the animal");
// Console.Write(">>> ");
// newName = Console.ReadLine();
// Console.WriteLine("Enter the GENDER of the animal");
// Console.Write(">>> ");
// newGender = Console.ReadLine();
// Console.WriteLine("Enter the animal's HABITAT");
// Console.Write(">>> ");
// newHabitat = Console.ReadLine();
// Console.WriteLine("Is the animal POISONOUS? y/n");
// Console.Write(">>> ");
// tempPoisonous = Console.ReadLine();
// if (tempPoisonous == "y" | tempPoisonous == "Y")
// {
// newPoisonous = true;
// }
// else if (tempPoisonous == "n" | tempPoisonous == "N")
// {
// newPoisonous = false;
// }
// Console.WriteLine("Enter any MEDICATION the animal takes");
// Console.Write(">>> ");
// newMedication = Console.ReadLine();
// if (tempCatag == "1")
// {
// MammalMaker(newCatag, newSpecies, newName, newGender, newHabitat, newPoisonous, newMedication);
// }
// else if (tempCatag == "2")
// {
// BirdMaker(newCatag, newSpecies, newName, newGender, newHabitat, newPoisonous, newMedication);
// }
// else if (tempCatag == "3")
// {
// FishMaker(newCatag, newSpecies, newName, newGender, newHabitat, newPoisonous, newMedication);
// }
// }
// public static void MammalMaker(string Catagory, string Species, string Name, string Gender, string Habitat, bool Poisonous, string Medication)
// {
// string FurType;
// string Noise;
// string Sleep;
// string Exercise;
// Console.WriteLine("Enter the animal's FUR TYPE");
// Console.Write(">>> ");
// FurType = Console.ReadLine();
// Console.WriteLine("Enter the NOISE the animal makes");
// Console.Write(">>> ");
// Noise = Console.ReadLine();
// Console.WriteLine("Enter the animal's SLEEP SCHEDULE");
// Console.Write(">>> ");
// Sleep = Console.ReadLine();
// Console.WriteLine("Enter how much EXERCISE the animal needs per day (in Metres)");
// Console.Write(">>> ");
// Exercise = Console.ReadLine();
// //Mammals Species = new Mammals(Name, Gender, Poisonous, Medication, Habitat, FurType, Noise, Sleep, Exercise);
// }
// public static void BirdMaker(string Catagory, string Species, string Name, string Gender, string Habitat, bool Poisonous, string Medication)
// {
// string colourOfFeathers;
// int beakSize;
// string tempDepression;
// bool Depression;
// int enclosure;
// string noise;
// Console.WriteLine("Enter the COLOUR of the Bird's FEATHERS");
// Console.Write(">>> ");
// colourOfFeathers = Console.ReadLine();
// Console.WriteLine("Enter the SIZE of the Bird's BEAK (cm)");
// Console.Write(">>> ");
// beakSize = int.Parse(Console.ReadLine());
// Console.WriteLine("Is the Bird DEPRESSED? (y/n)");
// Console.Write(">>> ");
// tempDepression = Console.ReadLine();
// if (tempDepression == "y" | tempDepression == "Y")
// {
// Depression = true;
// }
// else if (tempDepression == "n" | tempDepression == "N")
// {
// Depression = false;
// }
// Console.WriteLine("Enter the size of the Bird's ENCLOSURE (in Metres cubed)");
// Console.Write(">>> ");
// enclosure = int.Parse(Console.ReadLine());
// //Birds Species = new Birds(Name, Gender, Poisonous, Medication, Habitat, FurType, Noise, Sleep, Exercise);
// }
// public static void FishMaker(string Catagory, string Species, string Name, string Gender, string Habitat, bool Poisonous, string Medication)
// {
// string tempGills;
// bool gills;
// string tempFins;
// bool fins;
// double waterTemp;
// int waterDepth;
// int tankSize;
// Console.WriteLine("Does the FIsh have GILLS? (y/n)");
// Console.Write(">>> ");
// tempGills = Console.ReadLine();
// if (tempGills == "y" | tempGills == "Y")
// {
// gills = true;
// }
// else if (tempGills == "n" | tempGills == "N")
// {
// gills = false;
// }
// Console.WriteLine("Does the Fish have FINS? (y/n)");
// Console.Write(">>> ");
// tempFins = Console.ReadLine();
// if (tempFins == "y" | tempFins == "Y")
// {
// fins = true;
// }
// else if (tempFins == "n" | tempFins == "N")
// {
// fins = false;
// }
// Console.WriteLine("What is the optimum DEPTH of water for the Fish? (Metres)");
// Console.Write(">>> ");
// waterDepth = int.Parse(Console.ReadLine());
// Console.WriteLine("Enter the size of the Fish's TANK (in Metres cubed)");
// Console.Write(">>> ");
// tankSize = int.Parse(Console.ReadLine());
// //Fish Species = new Fish(Name, Gender, Poisonous, Medication, Habitat, FurType, Noise, Sleep, Exercise);
// }
}
}