Could someone find an obvious reason this while loop performs once and then breaks? I don't think the condition on the while loop is dropping it out. I must be when I call the formatted writers but I 'm not sure how to make it stay in the while loop. Any suggestion will help. thanks
while(transval!=0){
System.out.println("Account#: " +cc.getAccountNo());
System.out.println("Credit Limit: " + cc.getCreditLimit());
System.out.println("Available Credit: " + cc.getAvailable());
System.out.println("Outstanding Balance: " + cc.getBalance());
System.out.println("Charge: " + cc.getAmount());
System.out.println("Description; " + cc.getDescription());
System.out.println("payment: " + cc.getPayment());
System.out.println("Total Charges: " + cc.getTotalCharges());
System.out.println("Total Payments " + cc.getTotalPayments());
System.out.println("\n");
System.out.println("Transaction (0=Quit, +$=charge, -$=payment, 9999=Limit increase): ");
transval = Console.in.readDouble();
if (transval == 0){
break;
}
if (transval == 9999){
cc.creditIncrease();
}
if (transval > 0) {
System.out.println("Transaction description: ");
transdesc = Console.in.readLine();
transdesc = Console.in.readLine();
cc.setAmount(transval);
cc.setDescription(transdesc);
cc.Transaction();
} else if (transval < 0){
cc.setAmount(transval);
cc.setDescription("Payment");
cc.setPayment(transval);
cc.Transaction();
}
}