Skip to content

Dev#1

Open
hrsweetlana wants to merge 15 commits into
mainfrom
dev
Open

Dev#1
hrsweetlana wants to merge 15 commits into
mainfrom
dev

Conversation

@hrsweetlana

Copy link
Copy Markdown
Owner

No description provided.

@Anderwerty

Copy link
Copy Markdown

Please add description to your pull request


public class BruteForceDecription {
CaesarCipher caesarCipher;
Map letterFrequency;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Sorry, but why do we use raw-type for generic type Map?

public class BruteForceDecription {
CaesarCipher caesarCipher;
Map letterFrequency;
List<Character> alphabet;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Why not make it final and private?

import java.util.List;

public class CaesarCipher {
public List<Character> getAlphabet() {

@Anderwerty Anderwerty Feb 27, 2024

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The getter should be after the constructor. But do we really need this getter? Functionality of this class should cover all you need to get from alphabet

private static String filePath = "";
private static String option = "";
private static String key = "";
private static FileCrypter fileCrypter;

@Anderwerty Anderwerty Feb 27, 2024

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Why do we need these static fields? We can use local variables instead of these static fields.

'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'g', 'k', 'l', 'm', 'n', 'o', 'p',
'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '.', ',', '«', '»', '"', '\'', ':', '!', '?', ' '};

// public static final Character[] ENGLISH_ALPHABET = new Character[]{

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Do we need a commented code? If we need it please uncomment it, if no - remove it.

Comment thread src/main/java/ua/javarush/io/FileCrypter.java
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