Advertisement
Guest User

Untitled

a guest
Nov 23rd, 2014
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.60 KB | None | 0 0
  1. }
  2.        
  3.  
  4.             public void  printTicket(){
  5.        
  6.        
  7.             // Simulate the printing of a ticket.
  8.             System.out.println("##################");
  9.             System.out.println("# The BlueJ Line");
  10.             System.out.println("# Ticket");
  11.             System.out.println("# " + price + " cents.");
  12.             System.out.println("##################");
  13.             System.out.println();
  14.      
  15.             // Update the total collected with the balance.
  16.             total = total + balance;
  17.             // Clear the balance.
  18.             balance = 0;
  19.         }
  20.     }
  21.  
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement