Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 15 additions & 7 deletions src/main/java/Contacts0.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,13 @@

public class Contacts0 {

public static final int MAX_ENTITIES = 100;
public static final String SEPARATOR = "===================================================";

public static void main(String[] args) {
final Scanner SCANNER = new Scanner(System.in);
System.out.println("|| ===================================================");
System.out.println("|| ===================================================");
System.out.println("|| Contacts - Version 0.0");
System.out.println("|| Welcome to Contacts!");
System.out.println("|| ===================================================");
String[][] list = new String[100][3];
printWelcomeScreen();
String[][] list = new String[MAX_ENTITIES][3];
int count = 0;
while (true) {
System.out.print("|| " + "Enter command: ");
Expand All @@ -19,6 +18,7 @@ public static void main(String[] args) {
inputLine = SCANNER.nextLine();
}
String userCommand = inputLine;

System.out.println("|| [Command entered:" + userCommand + "]");
String feedback;
final String[] split = userCommand.trim().split("\\s+", 2);
Expand Down Expand Up @@ -140,10 +140,18 @@ public static void main(String[] args) {
+ String.format("\tExample: %1$s", "help")));
break;
}
for (String m : new String[]{feedback, "==================================================="}) {
for (String m : new String[]{feedback, SEPARATOR}) {
System.out.println("|| " + m);
}
}
}

private static void printWelcomeScreen() {
System.out.println("|| ===================================================");
System.out.println("|| ===================================================");
System.out.println("|| Contacts - Version 0.0");
System.out.println("|| Welcome to Contacts!");
System.out.println("|| ===================================================");
}

}
2 changes: 1 addition & 1 deletion textui-test/EXPECTED.TXT
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
|| ===================================================
|| ===================================================
|| Contacts - Version 0.0
|| Contacts - Version 1.0
|| Welcome to Contacts!
|| ===================================================
|| Enter command: || [Command entered:help]
Expand Down