1
0

feat: add guinea pigs

This commit is contained in:
Rokas Puzonas 2021-12-08 22:23:21 +02:00
parent 23d0ccc9eb
commit b18dea67de
3 changed files with 19 additions and 2 deletions

View File

@ -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

1 DOG;123;Reksas;Buldogas;2014-01-01;Male;true
6 DOG;415;Pifas;Taksas;2014-07-07;Male;true
7 DOG;420;Markas;Dalmantinas;2013-02-28;Female;false
8 DOG;123;Reksas;Buldogas;2014-01-01;Male;true
9 CAT;987;Garfildas;Princas;2008-04-10;Male
10 GUINEA_PIG;989;Micius;Princese;2008-04-10;Female

View 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)
{
}
}
}

View File

@ -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
}