Make Result View#12
Conversation
|
I modified the code to verify that the program runs correctly. |
ljseop1030
left a comment
There was a problem hiding this comment.
Looks good to me! It’s great to see the overall operation of our logic. 👍
AyeongKwon
left a comment
There was a problem hiding this comment.
LGTM😎!
Colorful UI is cuteeeeeeeee!
| String input = scanner.nextLine().trim(); | ||
|
|
||
| // Perform basic validation and return | ||
| return input.toLowerCase(); |
There was a problem hiding this comment.
Nice work! The code looks very clean. 🤩
By the way, I have just one small thought on performance:
This function currently returns any string the user types (e.g., "nexxt" or "edit!").
The external controller should not be burdened with handling typos. Please use a simple 'while' loop in this method to ensure the returned command is STRICTLY either "next" or "edit." This improves overall code safety.
There was a problem hiding this comment.
Thanks for the feedback! I totally agree. I've updated the method to use a while loop so that it only returns valid commands ('next' or 'edit').
This PR completes the implementation of the Result View UI. It focuses on displaying generated timetables efficiently and handling user navigation.
✨ Key Changes
Batch Display
Displays the total number of generated timetables and renders them in batches of 5 for better readability.
Empty State Handling
Automatically redirects the user to 'Edit' mode if no valid timetables are found.
Navigation Logic
Provides Next (load next batch) and Edit (modify inputs) options after displaying each batch.