Skip to content

Marija popova#37

Merged
jskonst merged 15 commits into
ISUCT:Marija_Popovafrom
ivinoiz:Marija_Popova
Dec 16, 2019
Merged

Marija popova#37
jskonst merged 15 commits into
ISUCT:Marija_Popovafrom
ivinoiz:Marija_Popova

Conversation

@ivinoiz
Copy link
Copy Markdown

@ivinoiz ivinoiz commented Nov 29, 2019

Task A, B + tests

Copy link
Copy Markdown
Collaborator

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

🔧

Comment thread CourseApp.Tests/DemoTest.cs Outdated
Assert.True(true);
double[] e = new double[0];
var res = Program.TaskB(2.0, e);
Assert.Equal(res, new double[0]);
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Нет тестов самой функции

Comment thread CourseApp/Program.cs Outdated
public static double[] TaskA(double a, double xn, double xk, double dx)
{
int j = 0;
var y = new double[5];
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

а почему от 5? задачу надо решать в общем виде

Comment thread CourseApp/Program.cs Outdated
for (var i = xn; i < xk; i += dx)
{
y[j] = Math.Pow(Math.Log10(a + i), 2) / Math.Pow(a + i, 2);
j++;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Зачем вам нужен j?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

а как иначе сделать счетчик?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

А а зачем он вам тут?

Comment thread CourseApp/Program.cs Outdated
{
public class Program
{
public static double[] TaskA(double a, double xn, double xk, double dx)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Используйте коллекции

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Есть foreach для коллекций

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

🔧

Copy link
Copy Markdown
Collaborator

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

🔧

[Fact]
public void TaskAWork()
{
double a = 2.0;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Дополнительные тесты

var item = new Mouse();
item.Age = -5;
Assert.Equal(0, item.Age);
}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

А тут не должен exception выброситься?

Comment thread CourseApp/Mouse.cs Outdated
}
else
{
Console.WriteLine("Age should be > 0 and < than 3");
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

нужно выбрасывать exception

Comment thread CourseApp/README.md Outdated
@@ -0,0 +1,2 @@
# Tprogramming_147_2019
Попова Мария Вячеславовна
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

А тут зачем этот файл?

@jskonst jskonst merged commit 0885677 into ISUCT:Marija_Popova Dec 16, 2019
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