-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dog.cs
36 lines (32 loc) · 1.04 KB
/
Dog.cs
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
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Lab_6___OOP_Arv
{
public class Dog : Animal
{
// Unik egenskap
public string dogRace { get; set; } = "Unknown";
//Ctor + bas
public Dog(string name = "Unknown", int age = 0, string color = "Unknown", string birthplace = "Unknown", double weight = 0.0, string dogRace = "Unknown")
: base(name, age, color, birthplace, weight)
{
this.name = name;
this.age = age;
this.color = color;
this.birthplace = birthplace;
this.weight = weight;
this.dogRace = dogRace;
}
public override void makeSound()
{
Console.WriteLine("Hunden skäller: Woof woof ");
}
public override void ShowInfo()
{
Console.WriteLine($"Name: {name} + Age: {age} Color: {color} Birthplace: {birthplace} Weight {weight} Dograce: {dogRace}");
}
}
}