Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 4 of 4

Thread: Help me with my code :(

  1. #1
    Junior Member
    Join Date
    Dec 2009
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Help me with my code :(

    First off im not going to lie and say this is for my own curiosity or something. A teacher assigned this project for me. ill admit i made a mistake taking this course and i just want to finish the project, take my exam and dip out of it for good. clearly programming isnt going to be my major . i cant afford to have a bad mark. my GPA will drop lower than i need it to and ill loose my scholarship.

    Its a really simple code and i just need some help and a good walkthrough as i do it. if you can help me please email me. fredman555@gmail.com or post here.
    Last edited by roxxorz2; December 15th, 2009 at 10:52 AM.


  2. #2
    Super Moderator helloworld922's Avatar
    Join Date
    Jun 2009
    Posts
    2,895
    Thanks
    23
    Thanked 619 Times in 561 Posts
    Blog Entries
    18

    Default Re: Help me with my code :(

    Sorry, we won't do your homework/projects for you (at least not for free). If this is the case, tell me and I'll move this to the paid projects section. However, if we can see that you have given some effort, we will help you for free, so feel free to post what it is you need help solving along with your attempt to solve it.

  3. #3
    Junior Member
    Join Date
    Dec 2009
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Help me with my code :(

    Quote Originally Posted by helloworld922 View Post
    Sorry, we won't do your homework/projects for you (at least not for free). If this is the case, tell me and I'll move this to the paid projects section. However, if we can see that you have given some effort, we will help you for free, so feel free to post what it is you need help solving along with your attempt to solve it.
    unfortunately thats my problem. i dont know what im doing. I dont expect anyone to do it for me, but guide and walk me through it alot. i litterally know just as much as i did at the beginning of the year. But the program seems simple enough, make the user an interface where he can order different pizzas for deliver that calculates the tax, total etc. So if anyone wants to help me it shouldn't take much effort at all

    Ill try to scrounge something together but its going to be god awful and full of errors
    Last edited by roxxorz2; December 15th, 2009 at 02:44 PM.

  4. #4
    Junior Member
    Join Date
    Dec 2009
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Help me with my code :(

    let me just explain what im trying to do.

    user inputs name
    user then selects type of pizza they want
    user selects size of pizza
    user selects number of pizzas

    if user is finished he/she is displayed all they ordered plus the prices (with the 5% tax applied)

    import java.util.Scanner;
     
    public class pizzaorder
    {
    	private String PizzaName;
    	private int size;
     
     
    	public static void main(String[] args)
    	{
     
    	System.out.println("Please input your name:");
    	Scanner keyboard = new Scanner(System.in);	
     
    	String Name = keyboard.nextLine();
     
    	System.out.println("Hello" + Name);
     
     
            System.out.println("********** Menu **********");
            System.out.println("1.Cheese\t2.Pepperoni\t3.Sausage\n4.hree Cheese\t.5Buffalo Wings\t\6.Quit");
    	System.out.println("Please enter type of pizza");
    	int choice = keyboard.nextInt();
    	System.out.println("What size of pizza?(inches and cost)");
    	System.out.println("10----------$9.99");
    	System.out.println("12----------$12.99");
    	System.out.println("14----------$14.99");
    	System.out.println("16----------$17.99");
    	System.out.println("   ");
    	int size = keyboard.nextInt();
            System.out.println("How many of this pizza?");
    	int amount = keyboard.nextInt();
    	}
     
    }
     
    	public static void checkout(String[] args)
    	System.out.println("1.re-order\t2.Confirm\t3.checkout");
     
    	while (choice !=3)
            {
    			switch(choice)
    			{
    				case 1:
     
     
    				case 2:
     
     
    				case 3:
     
     
    				default:
    				     System.out.println("Wrong selection");
     
    			}
     
     
     
     
     
     
    	}
     
     
     
    }

    What the program needs is this.

    1. The class should have input method to gather information for one pizza.
    2. The class should have method to output the information about one pizza.
    3. Has at least two constructors, i.e. the default constructor and the constructor
    that initializes the instance variables of a pizza. You may add more if you wish.
    4. The class should have a reasonable set of accessor and mutator methods,
    whether or not your program uses them.

    and when your ordering the pizza it should have

    1. An order may contain multiple pizzas. Use an array to store all the pizzas in
    one order.
    2. The class should have input method to gather information for one order.
    When asking customer for the order, the program should display the available
    options.
    3. The class should have method to calculate the total price for each order. Pizza
    unit price are determined by size, not by pizza type. There is also a 10% sales
    tax charged on the entire order. For example, if a customer orders three pizzas
    as follows:

    The application should provide a menu that leads users of the order process. The
    menu should have at least the follow options:

    1. Order: put an order.
    2. Confirm: calculate the total price and display the detailed order.
    3. Check out: output end of order message, such as thank you for your order,
    and terminate the application.

    -----------------------------------------------------------

    now as you can see by the commands im using and how im using them, im god awful at java. i can barely keep up with what i know so throwing something fancy in there will terrorize me. So if youre explaining something to me dumb it down ALOT.
    Last edited by roxxorz2; December 16th, 2009 at 02:55 PM.