-
Notifications
You must be signed in to change notification settings - Fork 23
Aleksandr enivatov #44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
} | ||
else | ||
{ | ||
throw new System.Exception(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
в смысле? нельзя пол кроме male установить?
CourseApp/Dog.cs
Outdated
this.age++; | ||
} | ||
|
||
public override string Vote() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Голосовать?
} | ||
else | ||
{ | ||
throw new System.Exception(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
То же самое
CourseApp/Tiger.cs
Outdated
|
||
set | ||
{ | ||
if (value >= 1 && value < 10) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Если у вас оба животных с одинаковым ограничением по возрасту -> надо в базовый класс это выносить, а лучше просто привести с другим возрастом
CourseApp/Tiger.cs
Outdated
|
||
public override string ToString() | ||
{ | ||
return $"Имя:{Name},Возраст:{Age},Пол:{Sex}"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ToString тоже явный кандидат, чтобы или его переопределить и возвращать строки по другому или же вернуть это все в базовый класс
CourseApp/SuperAnimals.cs
Outdated
|
||
public virtual string VirtualView() | ||
{ | ||
return "Virtual Metod"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
?
CourseApp/Dog.cs
Outdated
public Dog(string name, int age, string sex) | ||
: base(name, age, sex) | ||
{ | ||
Name = name; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔪
No description provided.