@@ -36,7 +36,7 @@ public class Ui {
3636 public static final String LIST_FLASHCARDS_LINE =
3737 "You are now viewing deck: " ;
3838 public static final String DELETE_FLASHCARD_LINE =
39- "Do you want to delete the following flash card? " ;
39+ "Do you want to delete the following flash card? [y/n] " ;
4040 public static final String FLASHCARD_DELETED_LINE =
4141 "The following flash card has been deleted:\n '" ;
4242 public static final String NEW_DECK_CREATED_LINE =
@@ -48,7 +48,7 @@ public class Ui {
4848 public static final String DELETED_DECK_LINE =
4949 "%1$s has been deleted." ;
5050 public static final String PPTX_DECK_QUESTION_LINE =
51- "Do you want to print %1$s deck to PowerPoint? [y/n]\n > " ;
51+ "Do you want to print %1$s deck to PowerPoint? [y/n] " ;
5252 public static final String PPTX_DECK_LINE =
5353 "%1$s has been created as PowerPoint." ;
5454 public static final String INVALID_YN_RESPONSE_LINE =
@@ -58,7 +58,7 @@ public class Ui {
5858 private static final String NEW_TAGS_LINE =
5959 "The deck %1$s has been tagged as: %2$s" ;
6060 private static final String REMOVED_TAGS_QUESTION_LINE =
61- "Do you want to remove the tag(s) %1$s from %2$s? [y/n]" ;
61+ "Do you want to remove the tag(s) %1$s from %2$s? [y/n] " ;
6262 private static final String REMOVED_TAGS_LINE =
6363 "The tag(s) %1$s have been removed from the deck %2$s." ;
6464 private static final String NEW_QUESTION_LINE =
@@ -74,7 +74,7 @@ public class Ui {
7474 private static final String NO_UPDATE_LINE =
7575 "Original question and answer retained" ;
7676 private static final String INCLUDE_EXCLUDE_LINE =
77- "Do you want to re-attempt this question later? " ;
77+ "Do you want to re-attempt this question later? [y/n] " ;
7878 private static final String ATTEMPT_FEEDBACK_LINE =
7979 "The score for your answer is:" ;
8080 private static final String ENTER_ATTEMPT_LINE =
@@ -278,8 +278,7 @@ public static void printDeck(Deck deck, boolean isQuestionOnly) {
278278 * @param question The question of the FlashCard to delete
279279 */
280280 public static void printDeleteFlashCardLine (String question ) {
281- System .out .print (DELETE_FLASHCARD_LINE + YN_LINE + "?\n '" + question + "`\n " );
282- printPrompt ();
281+ System .out .print (DELETE_FLASHCARD_LINE + "?\n '" + question + "' " );
283282 }
284283
285284 /**
@@ -416,14 +415,19 @@ public static void printVersionNumber() {
416415 }
417416
418417 public static void printIncludeExcludeLine () {
419- System .out .print (INCLUDE_EXCLUDE_LINE + YN_LINE + "\n " );
420- printPrompt ();
418+ System .out .print (INCLUDE_EXCLUDE_LINE );
421419 }
422420
423421 public static void printAttemptFeedback (double matchPercentage ) {
424422 System .out .println (String .format ("%s %.2f" , ATTEMPT_FEEDBACK_LINE , matchPercentage ));
425423 }
426424
425+ public static boolean getInclExclConfirmation () {
426+ logger .log (Level .INFO , "Logging method getInclExclConfirmation() in Ui." );
427+ Ui .printIncludeExcludeLine ();
428+ return checkYorNResponse ();
429+ }
430+
427431 public static void printGameQuestion (String question ) {
428432 System .out .println ("Q: " + question );
429433 System .out .println (ENTER_ATTEMPT_LINE );
@@ -469,7 +473,7 @@ public static void printInvalidTagsLine() {
469473 */
470474 public static void printRemovedTagsQuestion (String deckName , String [] tags ) {
471475 String removedTags = formStringOfTags (tags );
472- System .out .println (String .format (REMOVED_TAGS_QUESTION_LINE , removedTags , deckName ));
476+ System .out .print (String .format (REMOVED_TAGS_QUESTION_LINE , removedTags , deckName ));
473477 }
474478
475479 /**
0 commit comments