Bug 406

Summary: Stuck after the program display message
Product: Group37 Reporter: feiwu25-c
Component: calculation operationAssignee: feiwu25-c
Status: RESOLVED FIXED    
Severity: major CC: danielsuendaniel, tommyhonym
Priority: ---    
Version: unspecified   
Hardware: PC   
OS: Windows   

Description feiwu25-c 2020-11-15 12:42:06 HKT
Overview:
After pressing enter in the "Press enter to continue..." screen, the program get stuck. It keeps printing the same screen and does not allow another input.

Step to reproduce:
1) Start the calculator program
2) Press enter

Expected Result:
Welcome to Calculator!!!

Enter option to process:
1) Normal calculation
2) Number conversion
3) Formulas
4) Settings

5) User guide

6) Exit

>
Input: "  " not vaild

Press enter to continue....
Enter option to process:
1) Normal calculation
2) Number conversion
3) Formulas
4) Settings

5) User guide

6) Exit

>

Actual Result:
Welcome to Calculator!!!

Enter option to process:
1) Normal calculation
2) Number conversion
3) Formulas
4) Settings

5) User guide

6) Exit

>
Input: "  " not vaild

Press enter to continue....
Enter option to process:
1) Normal calculation
2) Number conversion
3) Formulas
4) Settings

5) User guide

6) Exit

>Input: "  " not vaild

Press enter to continue....

Build Date & Hardware:
15-11-2020 on Window 10.0.19041
Comment 1 danielsuendaniel 2020-11-19 22:58:53 HKT
A duplicated scanner nextline() is run after the user press enter. Removed it now. Problem solved.