feat: add guinea pigs
This commit is contained in:
parent
23d0ccc9eb
commit
b18dea67de
@ -6,4 +6,5 @@ DOG;123;Reksas;Buldogas;2014-01-01;Male;true
|
||||
DOG;415;Pifas;Taksas;2014-07-07;Male;true
|
||||
DOG;420;Markas;Dalmantinas;2013-02-28;Female;false
|
||||
DOG;123;Reksas;Buldogas;2014-01-01;Male;true
|
||||
CAT;987;Garfildas;Princas;2008-04-10;Male
|
||||
CAT;987;Garfildas;Princas;2008-04-10;Male
|
||||
GUINEA_PIG;989;Micius;Princese;2008-04-10;Female
|
||||
|
|
12
Lab5/Lab5.Exercises.Register/GuineaPig.cs
Normal file
12
Lab5/Lab5.Exercises.Register/GuineaPig.cs
Normal file
@ -0,0 +1,12 @@
|
||||
|
||||
using System;
|
||||
|
||||
namespace Lab5.Exercises.Register
|
||||
{
|
||||
class GuineaPig : Animal
|
||||
{
|
||||
public GuineaPig(int id, string name, string breed, DateTime birthDate, Gender gender) : base(id, name, breed, birthDate, gender)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
@ -47,6 +47,10 @@ namespace Lab5.Exercises.Register
|
||||
Cat cat = new Cat(id, name, breed, birthDate, gender);
|
||||
animals.Add(cat);
|
||||
break;
|
||||
case "GUINEA_PIG":
|
||||
GuineaPig guineaPig = new GuineaPig(id, name, breed, birthDate, gender);
|
||||
animals.Add(guineaPig);
|
||||
break;
|
||||
default:
|
||||
break;//unknown type
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user