diff --git a/.idea/misc.xml b/.idea/misc.xml index d15472f..a67b4ae 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,5 +1,8 @@ + + diff --git a/src/lab5/Letter.java b/src/lab5/Letter.java new file mode 100644 index 0000000..f4c7a9f --- /dev/null +++ b/src/lab5/Letter.java @@ -0,0 +1,9 @@ +package lab5; + +public class Letter { + private char symbol; + + public Letter(char symbol) { + this.symbol = symbol; + } +} diff --git a/src/lab5/Main.java b/src/lab5/Main.java new file mode 100644 index 0000000..54bb4cc --- /dev/null +++ b/src/lab5/Main.java @@ -0,0 +1,10 @@ +package lab5; + +public class Main { + public static void main(String[] args) { + + + + System.out.println("Done!"); + } +} diff --git a/src/lab5/Word.java b/src/lab5/Word.java new file mode 100644 index 0000000..504f806 --- /dev/null +++ b/src/lab5/Word.java @@ -0,0 +1,18 @@ +package lab5; + +public class Word { + private Letter[] letters; + + public Word(Letter[] letters) { + this.letters = letters; + } + + public Word(String wordString) { + letters = new Letter[wordString.length()]; + + final char[] chars = wordString.toCharArray(); + for (int i = 0; i < chars.length; i++) { + letters[i] = new Letter(chars[i]); + } + } +}