Skip to content

Conversation

@JKL37
Copy link

@JKL37 JKL37 commented Dec 30, 2018

No description provided.

{
private int passangers;
private int dlina;
private int vodoizmeschenie;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Не ко всему транспорту применимо водоизмещение, тем более что есть класс ship,

private int dlina;
private int vodoizmeschenie;

public Transport()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

А заем пустой конструктор? другие не в даом классе определены - и этот в данном случае не нужен

Vodoizmeschenie = 100;
}

public Ship(int b)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Смените имя переменой - что за b?

Vodoizmeschenie = 100;
}

public Ship(int a, int b, int c)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

То же самое - что за а б и c ? они должны нести нормальную смысловую нагрузку


public Ship(int b)
{
Passangers = 25;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Этот конструктор должен вызывать более общий вид конструктора, пробросив в него параметры

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Простите но не понимаю что здесь требуется сделать

Copy link
Contributor

@jskonst jskonst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Чем Ship от Kater отличаются? - почти ничем, может только info и vid - остальное - в базовый класс, если чем-то еще отличаются - ну ок. Добавьте submarine

using CourseApp;

namespace CourseApp.Test
namespace CourseApp.Tests
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Переименуйте файлы тестов - чтобы было ясно кого ои тестируют

[Fact]
public void Test10()
{
Ship admiral = new Ship();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Имя теста должно отражать то, что тест проверяет

public void Test10()
{
Ship admiral = new Ship();
var passangers = admiral.Passangers;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Уберите эти промежуточные переменные - зачем они вам?

[Fact]
public void Test15()
{
Ship admiral = new Ship();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Что за тест и что проверяет? не массив ли тут хотели?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants