Source of Screen.java


  1: // Screen.java
  2: // Represents the screen of the ATM

  4: public class Screen
  5: {
  6:    // displays a message without a carriage return
  7:    public void displayMessage( String message ) 
  8:    {
  9:       System.out.print( message ); 
 10:    } // end method displayMessage

 12:    // display a message with a carriage return
 13:    public void displayMessageLine( String message ) 
 14:    {
 15:       System.out.println( message );   
 16:    } // end method displayMessageLine

 18:    // display a dollar amount
 19:    public void displayDollarAmount( double amount )
 20:    {
 21:       System.out.printf( "$%,.2f", amount );   
 22:    } // end method displayDollarAmount 
 23: } // end class Screen



 27: /**************************************************************************
 28:  * (C) Copyright 1992-2005 by Deitel & Associates, Inc. and               *
 29:  * Pearson Education, Inc. All Rights Reserved.                           *
 30:  *                                                                        *
 31:  * DISCLAIMER: The authors and publisher of this book have used their     *
 32:  * best efforts in preparing the book. These efforts include the          *
 33:  * development, research, and testing of the theories and programs        *
 34:  * to determine their effectiveness. The authors and publisher make       *
 35:  * no warranty of any kind, expressed or implied, with regard to these    *
 36:  * programs or to the documentation contained in these books. The authors *
 37:  * and publisher shall not be liable in any event for incidental or       *
 38:  * consequential damages in connection with, or arising out of, the       *
 39:  * furnishing, performance, or use of these programs.                     *
 40:  *************************************************************************/