This Bug caused in main function, it will success we are choose from yes or no(y/n) in terminal, but when trying to input another alphabet, the program will throw an exception
> repairRequest|10112023-12-13Initiating checking process.Checking all furniture from the room...Checkingthe floor tile...Checking all electrical appliances...Checking sanitary ware..Room 101's device situation has been thoroughly checked, and need to be > Maintain it now?(Y/N) 9 > Wrong Input! Pease Try Again! >YInitiating advanced repairing process.Removing all items from the room...Place a layer of dustproof paper on the walls and floors of the room...Maintenance in progress.Room 101 has been impeccably repaired. > repairRequest]10112023-12-13Initiating checking process..Checking all furniture from the room...Checking the floor tile...Checking all electrical appliances..Checking sanitary ware..Room 101's device situation has been thoroughly checked, and need to be > Maintain it now?(Y/N)Exception in thread "main" java.util.NoSuchElementExceptionat java.base/java.util.Scanner.throwFor(Scanner.java:945) atjava.base/java.util.Scanner.next(Scanner.java:1486) atproject.CmdRepairRequest.execute(CmdRepairRequest.java:30)atproject.Main.main(Main.java:43) When we duplicated input the repairing request for one room, an exception will be thrown which ralated to Scanner.java, if we deleted "scanner.close()", the bug will be fixed
For update, the wrong input will be ok, only the problem of the scanner.close(), The bug is fixed since we remove the scanner.close()