• Interface for coach
     
    • Create using Swing component library a new class called BusGUI (Graphical User Interface), in which user can add/remove passenger to/from coach by clicking a button. This interface uses the Coach class which was created earlier.
    • Counter show how many passengers there are in the bus.When free (standing & sitting) seats reaches 0, program notifies the user.
    • Furthermore, program displays each passenger in the bus with an ‘X’: add/removes one, depending action.
    • Example of solution. You can execute it in Linux/Unix by using following command:
       
      • java -classpath bussi.jar:. BussiApplication
         
  • Back