This commit is contained in:
Oleksii Aleshchenko 2023-06-01 16:06:50 +03:00
parent 9c691d2c72
commit 1412505d33
4 changed files with 40 additions and 0 deletions

View File

@ -1,5 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project version="4"> <project version="4">
<component name="JavadocGenerationManager">
<option name="OUTPUT_DIRECTORY" value="$PROJECT_DIR$/JavaDoc" />
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_18" default="true" project-jdk-name="openjdk-18" project-jdk-type="JavaSDK"> <component name="ProjectRootManager" version="2" languageLevel="JDK_18" default="true" project-jdk-name="openjdk-18" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" /> <output url="file://$PROJECT_DIR$/out" />
</component> </component>

9
src/lab5/Letter.java Normal file
View File

@ -0,0 +1,9 @@
package lab5;
public class Letter {
private char symbol;
public Letter(char symbol) {
this.symbol = symbol;
}
}

10
src/lab5/Main.java Normal file
View File

@ -0,0 +1,10 @@
package lab5;
public class Main {
public static void main(String[] args) {
System.out.println("Done!");
}
}

18
src/lab5/Word.java Normal file
View File

@ -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]);
}
}
}