Skip to content

Commit

Permalink
Merge pull request #28 from nkotaa/add-ui
Browse files Browse the repository at this point in the history
Add Skeleton UI
  • Loading branch information
nkotaa authored Mar 13, 2024
2 parents 8224a7e + 7e6d5e1 commit ab50b47
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions src/main/java/seedu/binbash/ui/Ui.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
package seedu.binbash.ui;

import java.util.Scanner;

public class Ui {
private static final String WELCOME_MESSAGE = "Welcome to BinBash!";
private static final String GOODBYE_MESSAGE = "Bye!";
private static final String LINE_DIVIDER = "-------------------------------------------------------------";

private Scanner in;
private boolean isUserActive;

public Ui() {
in = new Scanner(System.in);
isUserActive = true;
}

public boolean isUserActive() {
return isUserActive;
}

public void greet() {
talk(WELCOME_MESSAGE);
}

public void farewell() {
talk(GOODBYE_MESSAGE);
}

public void talk(String line) {
System.out.println(LINE_DIVIDER + "\n" + line + "\n" + LINE_DIVIDER);
}
}

0 comments on commit ab50b47

Please sign in to comment.