Lottery Ticket Java Program
Lottery Ticket Java Program
Lottery Ticket Java Program
*;
public class CIS129_WhitneyHenderson_Lab4{
static Scanner keyboard = new Scanner(System.in);
int purchase;
int newMoney;
int powerball;
//initBoolArray(ticket);
System.out.println("You have $"+STARTING_MONEY);
purchase = getValidPurchase("How many $"+TICKET+" lottery cards would you like to
purchase?");
newMoney = getMoney(purchase);
System.out.println(newMoney);
powerball = initializePowerball();
initializeTicket(winningTicket);
sortLotteryTicket(winningTicket);
winningTicket(winningTicket, powerball);
System.out.println("\n");
//how many tickets the user purchases
for(int x = 0; x < purchase; x++){
initializeTicket(userTickets);
sortLotteryTicket(userTickets);
powerball = initializePowerball();
printTicketNumbers(winningTicket, powerball, userTickets);
}
}//end main
}
}
System.out.print(" "+powerball);
System.out.println();
}
}//end sort
}//end program