Skip to content

Lab1#10

Open
exhaustedkid wants to merge 4 commits into
Rrenkens:mainfrom
exhaustedkid:lab1
Open

Lab1#10
exhaustedkid wants to merge 4 commits into
Rrenkens:mainfrom
exhaustedkid:lab1

Conversation

@exhaustedkid
Copy link
Copy Markdown

Сделал три такс генератора без группового, не обрабатываю инкорект инпут, это из основного

difficulty_level_ = level;
if (difficulty_level_ == DifficultyLevel.HARD) {
// File file = new File("TextTaskStatementsHard.txt");
File file = new File("D:\\IntelliJ Projects\\Java-BSU-2022\\lab-01\\src\\by\\Savenok\\quizer\\task_generators\\TextTaskStatementsHard.txt");
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Путь до файлов, лучше вынести в аргументы командной строки. Не у всех есть такой путь.


import by.Savenok.quizer.tasks.TextTask;

import java.io.*;
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Тут миллиард импортов, а тебе нужны всего 2.

NIGHTMARE
}

DifficultyLevel difficulty_level_;
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Я бы добавил приватности и в Java camelCase. Этот коммент по всем файлам. И обычно пишут в начале файла все поля, а также enum лучше тоже вначало вынести.

boolean generateMultiplication,
boolean generateDivision
) {
minNumber_ = minNumber;
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Лучше this. и такое же имя

}

}
System.out.println("Choose task mode (Expression / Equation / Text):");
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Вообще не интуитивно понятно, я пока в код не залез ничего не смог запустить((

Пять
Самое большое млекопитающее
Синий кит
Какой балл нужно поставить мне за лабу
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Нет!

@@ -0,0 +1,27 @@
package by.Savenok.quizer.tasks;
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Тут все 3 файла с задачами одинаковые поэтому лучше было бы сделать общий класс с реализацией.

if (answer == 0) {
return "NO";
} else {
return Integer.toString(left_side_number / answer);
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Тут лучше либо не генирть ответы с double, либо уже рабоать с double. Это касается всех типов задач.

boolean multiply,
boolean division) {
char[] enable_operators = new char[4];
enable_operators[0] = '0';
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Как-то очень костыльно. (За это не снимал).

public enum Result {
OK,
WRONG,
INCORRECT_INPUT
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Нигде не юзается.

@Rrenkens
Copy link
Copy Markdown
Owner

Rrenkens commented Nov 25, 2022

Ну пока что такая оценка:

  • -1.5 за group task.
  • -1 за генерацию вопросов с double.
  • -0.5 за Incorrect Input.
  • -0.25 за путь до файлов.
  • -0.25 за не интуитивность.
  • +0.5 за создание собственного набора.

В итоге 7 (за все остальные мелочи не снимал). В остальном хорошая работа.

@Rrenkens Rrenkens added the question Further information is requested label Nov 25, 2022
@exhaustedkid
Copy link
Copy Markdown
Author

понял, спасибо!

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

Labels

question Further information is requested

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants