diff --git a/Lab5/Lab5.Exercises.Register/Animals.csv b/Lab5/Lab5.Exercises.Register/Animals.csv index 3992d20..bec0dcc 100644 --- a/Lab5/Lab5.Exercises.Register/Animals.csv +++ b/Lab5/Lab5.Exercises.Register/Animals.csv @@ -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 \ No newline at end of file +CAT;987;Garfildas;Princas;2008-04-10;Male +GUINEA_PIG;989;Micius;Princese;2008-04-10;Female diff --git a/Lab5/Lab5.Exercises.Register/GuineaPig.cs b/Lab5/Lab5.Exercises.Register/GuineaPig.cs new file mode 100644 index 0000000..84d7a27 --- /dev/null +++ b/Lab5/Lab5.Exercises.Register/GuineaPig.cs @@ -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) + { + } + } +} diff --git a/Lab5/Lab5.Exercises.Register/InOutUtils.cs b/Lab5/Lab5.Exercises.Register/InOutUtils.cs index 199ed8f..674202b 100644 --- a/Lab5/Lab5.Exercises.Register/InOutUtils.cs +++ b/Lab5/Lab5.Exercises.Register/InOutUtils.cs @@ -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 }