List studentJoinedEvent command does not work. When I use the list studentJoinedEvent command, whatever I type 'all', 'pending' or 'end' at the end of the command, it will detect as a wrong command. ========================================================================== Welcome to the Event Management System Please input today date (e.g. 01-jan-2020). 10-Nov-2020 SystemDate confirm: 10-Nov-2020 Please enter your command: create student s12345678 cs mary chan F 19 Created student mary chan with StudentID: s12345678. Please enter your command: list studentJoinedEvent s12345678 all |s12345678|mary |chan |F |Computer Science |19 | Wrong Command List student joined event command should be "list studentJoinedEvent sXXXXXXXX all" or "list studentJoinedEvent sXXXXXXXX pending" or "list studentJoinedEvent sXXXXXXXX end" Please enter your command: list studentJoinedEvent s12345678 pending |s12345678|mary |chan |F |Computer Science |19 | Wrong Command List student joined event command should be "list studentJoinedEvent sXXXXXXXX all" or "list studentJoinedEvent sXXXXXXXX pending" or "list studentJoinedEvent sXXXXXXXX end" Please enter your command: list studentJoinedEvent s12345678 end |s12345678|mary |chan |F |Computer Science |19 | Wrong Command List student joined event command should be "list studentJoinedEvent sXXXXXXXX all" or "list studentJoinedEvent sXXXXXXXX pending" or "list studentJoinedEvent sXXXXXXXX end" Please enter your command: ==========================================================================
if(cmdParts[3] == "all") { .. } else if(cmdParts[3] == "pending") { .. } else if(cmdParts[3] == "end") { .. } change to if(cmdParts[3].equals("all")) { .. } else if(cmdParts[3].equals("pending")) { .. } else if(cmdParts[3].equals("end")) { .. }