Jjjjjjjj

275 palavras 2 páginas
amount); } }

/** * Imprime um ticket azul */ public void printTicketAzul() { int amountLeftToPay = priceAzul - balance; if(amountLeftToPay <= 0) { // Simulate the printing of a ticket. System.out.println("##################"); System.out.println("# The BlueJ Line"); System.out.println("# Blue Ticket"); System.out.println("# " + priceAzul + " cents."); System.out.println("##################"); System.out.println();

// Update the total collected with the price. total += priceAzul; // Reduce the balance by the prince. balance = balance - priceAzul; } else { System.out.println("You must insert at least: " + (amountLeftToPay) + " more cents."); } }

/** * Imprime um ticket amarelo */ public void printTicketAmarelo() { int amountLeftToPay = priceAmarelo - balance; if(amountLeftToPay <= 0) { // Simulate the printing of a ticket. System.out.println("##################"); System.out.println("# The BlueJ Line"); System.out.println("# Yellow Ticket"); System.out.println("# " + priceAmarelo + " cents."); System.out.println("##################"); System.out.println();

// Update the total collected with the price. total += priceAmarelo; // Reduce the balance by the prince. balance = balance - priceAmarelo; } else { System.out.println("You must insert at least: " + (amountLeftToPay) + " more cents."); } } /** * Imprime um ticket

Relacionados

  • jjjjjjjj
    514 palavras | 3 páginas
  • jjjjjjjj
    325 palavras | 2 páginas
  • Jjjjjjjj
    3211 palavras | 13 páginas
  • Jjjjjjjj
    574 palavras | 3 páginas
  • jjjjjjjj
    299 palavras | 2 páginas
  • jjjjjjjj
    8671 palavras | 35 páginas
  • jjjjjjjj
    446 palavras | 2 páginas
  • Jjjjjjjj
    1025 palavras | 5 páginas
  • jjjjjjjj
    284 palavras | 2 páginas
  • jjjjjjjj
    1107 palavras | 5 páginas