Skip to content

Popkovdmitriy-3 task#30

Open
DmitriyPopkov wants to merge 2 commits intodemologin:mainfrom
DmitriyPopkov:main
Open

Popkovdmitriy-3 task#30
DmitriyPopkov wants to merge 2 commits intodemologin:mainfrom
DmitriyPopkov:main

Conversation

@DmitriyPopkov
Copy link

No description provided.

Copy link

@Khmelov Khmelov left a comment

Choose a reason for hiding this comment

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

Выполнено три команды из четырёх, однако над кодом нужно много работать, видно что есть довольно грубые недостатки и не вычитанные фрагменты. Поставил оценку C

Scanner input = new Scanner(System.in);
Menu inputmenu = new Menu(input);
ConsoleApp application = new ConsoleApp(inputmenu, input);
PathBuilder readFILE = new PathBuilder(application);
Copy link

Choose a reason for hiding this comment

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

Странное имя для переменной



MainController mainController = new MainController(readFILE.inputFilePath, application.shift, inputmenu.inputmenu);
while (mainController.pick_upShift == 1) {
Copy link

Choose a reason for hiding this comment

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

Что такое один

MainController mainController = new MainController(readFILE.inputFilePath, application.shift, inputmenu.inputmenu);
while (mainController.pick_upShift == 1) {

new MainController(readFILE.inputFilePath, MainController.shift, inputmenu.inputmenu);
Copy link

Choose a reason for hiding this comment

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

Рождение объекта и выполнение каких-то действий в нём обычно два разных вызова

return commonWords_buff;
}

public static Set<String> findCommonWords1() {
Copy link

Choose a reason for hiding this comment

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

Очень странное и непонятное название метода

}

public static int bruteforceShift(int shift) {
++shift;
Copy link

Choose a reason for hiding this comment

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

Это можно сделать одной строкой


return encryptInAlphabet(character, RUSSIAN_ALPHABET, shift);
} else
if ( character >='А' && character <='Я'){
Copy link

Choose a reason for hiding this comment

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

Буква Ë находится не между этими двумя

int index = -1;


for (int i = 0; i< alphabet.length ;i++){
Copy link

Choose a reason for hiding this comment

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

Чтобы не было таких циклов лучше использовать карты

public class Exit {
public static void exit(){
System.exit(0);
}
Copy link

Choose a reason for hiding this comment

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

Что-то с форматированием


public class Exit {
public static void exit(){
System.exit(0);
Copy link

Choose a reason for hiding this comment

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

Такой способ выхода никогда не пишут в реальных приложениях


public class ConsoleApp {
public String filename;
private final Scanner scanner;
Copy link

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