File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed
src/main/java/seedu/duke/flashcard/command Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change 3
3
7 | Hello | Duke | 5
4
4
9 | id | checker | 5
5
5
10 | id increases | correctly | 5
6
+ 11 | f | dfdf | 5
Original file line number Diff line number Diff line change @@ -23,6 +23,15 @@ public class CreateFlashcardCommand extends FlashcardCommand {
23
23
public void execute (Scanner scanner , FlashcardList flashcardList ) {
24
24
System .out .print (" Enter the front page text: " );
25
25
String frontPageText = scanner .nextLine ();
26
+
27
+ while (frontPageText .strip ().equals ("" )) {
28
+ System .out .println (" Invalid input! The front text must " +
29
+ "contain at least one letter or digit!" );
30
+
31
+ System .out .print (" Enter the front page text: " );
32
+ frontPageText = scanner .nextLine ();
33
+ }
34
+
26
35
System .out .print (" Enter the back page text: " );
27
36
String backPageText = scanner .nextLine ();
28
37
You can’t perform that action at this time.
0 commit comments