Baeramshina - 2 tasks complete#33
Open
AnastasiaBaeramshina wants to merge 25 commits intodemologin:mainfrom
Open
Baeramshina - 2 tasks complete#33AnastasiaBaeramshina wants to merge 25 commits intodemologin:mainfrom
AnastasiaBaeramshina wants to merge 25 commits intodemologin:mainfrom
Conversation
added 25 commits
August 24, 2025 21:20
Khmelov
approved these changes
Oct 23, 2025
Khmelov
left a comment
There was a problem hiding this comment.
Приложение не разбито на пакеты есть замечания к реализации. Из четырёх ожидаемых функций реализованы две. Поставил оценку C
|
|
||
| import java.util.Scanner; | ||
|
|
||
| public class ConsoleReader extends InputReader { |
|
|
||
|
|
||
| public class ConsoleRunner { | ||
| private static String originalText = null; |
There was a problem hiding this comment.
А вот это неправильно. Во-первых поля и так пустые, а во-вторых статически их делают очень редко
|
|
||
|
|
||
| private static void handleReadFile(Scanner console) { | ||
| InputReader readFile = new ReadFile("text/dict.txt"); |
There was a problem hiding this comment.
Тут плохо то что путь к файлу указан жёстко
|
|
||
| private static void handleEncrypt() { | ||
|
|
||
| Map<Character, Character> caesarCipher = LogicEncrypted.createCaesarCipher(5); |
| public static String decryptText(String text, Map<Character, Character> cipherMap) { | ||
| StringBuilder result = new StringBuilder(); | ||
| for (char c : text.toCharArray()) { | ||
| if (cipherMap.containsKey(c)) { |
There was a problem hiding this comment.
Насколько я вижу метод шифрования от метода дешифрования почти не отличается, в таких случаях их лучше объединить в какой-либо абстракции
| import java.util.HashMap; | ||
| import java.util.Map; | ||
|
|
||
| public class LogicDecrypted { |
|
|
||
| public enum MenuOption { | ||
| READ_CONSOLE("Прочитать с консоли"), | ||
| READ_FILE("Прочитать файл"), |
There was a problem hiding this comment.
Тут видим четыре отдельных команды что в целом неплохо
| String line; | ||
| while((line =reader.readLine())!=null) | ||
|
|
||
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.