Results 1 to 3 of 3

Thread: Decisions.

  1. #1
    whateverme is offline Member
    Join Date
    Oct 2010
    Posts
    51
    Rep Power
    0

    Default Decisions.

    Hey there, I'm trying to write a program that includes the decisions.
    in this program I writing, I have to do a review of concert dates. what I'm currently working on now is that - when the person order tickets by typing in their account number, this account number will be checked against a series of a known accounts.
    I need think I need to a separate method that prints a receipt confirming the seats booked.
    this what I have currently.
    Java Code:
     
    public static void main (String[] param)
    	{
    		concert();
    		System.exit(0);
    	}
    public static void concert()
    	{
    		String ordertickets;
    		int tickets;
    		
    		ordertickets = JOptionPane.showInputDialog("Order tickets now.\nType in the number of a band\n\n 1. The xx \n 2. Muse \n 3. Radiohead");
    		tickets = Integer.parseInteger(ordertickets);
    		
    		switch (tickets)
    		{
    		case 1:	JOptionPane.showMessageDialog(null, "10 pounds - General Admission");
    				break;	
    		case 2:	JOptionPane.showMessageDialog(null, "8 pounds - General Admission");
    				break;	
    		case 3:	JOptionPane.showMessageDialog(null, "6 pounds - General Admission");
    				break;
    		default: JOptionPane.showMessageDialog(null, " Error. Please type in the number of group listed.");
                   break;		
    		}
    		
    	}
    how do I make the accounts and also how do I print receipts in another method?

  2. #2
    al_Marshy_1981 is offline Senior Member
    Join Date
    Feb 2010
    Location
    Waterford, Ireland
    Posts
    748
    Rep Power
    5

    Default

    hate to be a pain in the **** but what have you actually tried buddy?

  3. #3
    Zack's Avatar
    Zack is offline Senior Member
    Join Date
    Jun 2010
    Location
    Destiny Islands
    Posts
    692
    Rep Power
    5

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •