need someone do it for me plz..people

need someone do it for me plz..people

write an application that displays a menue of three items in a restaurant as follows: 1.Cheeseburger 4.99 2.Pepsi 2.00 3.Chips 0.75 prompt the user to choose an item using the number (1,2,or 3) that corresponds to the item, or to enter 0 to quit the application.after the user makes the first selection, if the choice is 0, display a bill of $0.otherwise,display the menu again.the user should respond to this prompt with another item number to order or 0 to quit.if the user types0,display the cost of the single requested item.if the user types 1,2 or 3 add the cost of the second item to the first, and then display the menu a third time.if the user types 0 to quit,display the total cost of the two items;otherwise,display the total for all three selections.save the file as FastFood.java

B. modify the application in Exercise above so that if the user makes a menu selection he or she has already made, ignore the selection-that is,do not add a second price for the same item to the total.the user is still allowed only three entries.save the file as FastFood2.java

View Answers

February 12, 2011 at 5:54 PM

1)FastFood.java:

import java.util.*;
class  FastFood
{
    public static void main(String[] args) 
    {
        Scanner input=new Scanner(System.in);
        double price=0;
        boolean check=false;
        do{
        System.out.println("1 Cheeseburger");
        System.out.println("2 Pepsi");
        System.out.println("3 Chips");
        System.out.println("0 Exit");


        System.out.print("Enter choice: ");
        int choice=input.nextInt();

            switch(choice){
                case 1:
                    price+=4.99;
                break;
                case 2:
                    price+=2.00;
                break;
                case 3:
                    price+=0.75;
                break;
                case 0:
                check=true;
                break;
            }
        }
        while(!check);
System.out.println("Total Price: "+price);

    }
}









Related Tutorials/Questions & Answers:
need someone do it for me plz..people
need someone do it for me plz..people  write an application that displays a menue of three items in a restaurant as follows: 1.Cheeseburger 4.99... selection he or she has already made, ignore the selection-that is,do not add a second
need someone to do/help with code
need someone to do/help with code  i need someone to do a code for me. It is a restaurant menu that displays a list of 10 food items. A customer inputs what they want to eat and they receive back a total price for the order. Also
Advertisements
Can someone help me with this?
Can someone help me with this?  I have this project and i dont know how to do it. Can someone help me? please? Write a java class named "PAMA..., Multiply, Divide) Help me please! Thanks in advance!   import
Could someone Possibly help me with this
Could someone Possibly help me with this   think of a number and allow the user to guess it import java.util.*; public class ThinkNumber...(); } System.out.println("Correct!!!!!!!"); } } But when the code is run I do
please i want someone to answer me pleeeeeeeeeeeeease...
please i want someone to answer me pleeeeeeeeeeeeease...    Write a JAVA program using 2D array to auto-grade exams. For a class of N students, your program should read letter answers (A, B, C, D) for each student. Assume
help me to do it in jsp
help me to do it in jsp  if we click on a topic it should direct to another page in separate window i need to create a part of the web page which... to insert and update the topics via admin page. pls help me to do
Do data scientists need PhD?
scientists need PhD? Try to provide me good examples or tutorials links so that I can learn the topic "Do data scientists need PhD?". Also tell me...Do data scientists need PhD?  Hi, I am beginner in Data Science
Do you need math for AI?
learn the topic "Do you need math for AI?". Also tell me which...Do you need math for AI?  Hi, I am beginner in Data Science and machine learning field. I am searching for the tutorials to learn: Do you need
PLZ Need some help on the 2nd part of this question...Someone please help !!!!
PLZ Need some help on the 2nd part of this question...Someone please help !!!!  write an application that displays a menue of three items... a menu selection he or she has already made, ignore the selection-that is,do not add
what is java and why do i need it?
what is java and why do i need it?  Hi, Please tell me what is Java and why do i need it? Is it free to download? Also explain me how to write and test my first Java Application? What is the configuration or system requirement
Need someone to check and modify my simple code - Java Beginners
Need someone to check and modify my simple code   How to write a class that contains Variables that hold hourly rate of pay, number of hours worked. Display gross pay, withholding tax, which is 15% and net pay. I have tried
What do I need to do to use a MSSQL-Server with Web-Harvester?
What do I need to do to use a MSSQL-Server with Web-Harvester?  What do I need to do to use a MSSQL-Server with Web-Harvester
What skills do you need for big data?
: What skills do you need for big data? Try to provide me good examples or tutorials links so that I can learn the topic "What skills do you need for big...What skills do you need for big data?  Hi, I am beginner in Data
Do I need math for data science?
Do I need math for data science?  Hi, I am beginner in Data Science... need math for data science? Try to provide me good examples or tutorials links so that I can learn the topic "Do I need math for data science?"
Do data analysts need to be good at math?
: Do data analysts need to be good at math? Try to provide me good examples or tutorials links so that I can learn the topic "Do data analysts need...Do data analysts need to be good at math?  Hi, I am beginner in Data
What skills do I need for machine learning?
to learn: What skills do I need for machine learning? Try to provide me good examples or tutorials links so that I can learn the topic "What skills do I need...What skills do I need for machine learning?  Hi, I am beginner
What skills do I need to be a data analyst?
to learn: What skills do I need to be a data analyst? Try to provide me good examples or tutorials links so that I can learn the topic "What skills do I need...What skills do I need to be a data analyst?  Hi, I am beginner
ModuleNotFoundError: No module named 'serve_me_do'
ModuleNotFoundError: No module named 'serve_me_do'  Hi, My Python... 'serve_me_do' How to remove the ModuleNotFoundError: No module named 'serve_me_do' error? Thanks   Hi, In your python environment
I really need a tutor for Java program that has to do with multithreading and gui!
I really need a tutor for Java program that has to do with multithreading and gui!  I am looking for a Tutor to help me with a Java program, specially GUI and multithreading. If you can tutor, please email me
PLZ HELP ME. i need php code.
PLZ HELP ME. i need php code.   I want php code for bellow OUTPUT. output is just example but it must be letters only. abc bcd efg jku rgt azs hje qqc wws adt
do this for me plzz - Java Interview Questions
do this for me plzz  Given the no of days and start day of a month print the calender of that month . Startday will be given as integer... to print in the same line i.e., without printing a newline. 2)You do
Java web development, what skills do I need?
Java web development, what skills do I need?  Java web development, what skills do I need
Java web development, what skills do I need?
Java web development, what skills do I need?  Java web development, what skills do I need
Do I need a Masters/PhD to become a data scientist?
Do I need a Masters/PhD to become a data scientist?  Hi, I am... for the tutorials to learn: Do I need a Masters/PhD to become a data scientist? Try to provide me good examples or tutorials links so that I can learn the topic "Do I
i need latest oracle certified java dumps.. Pleas help me?
i need latest oracle certified java dumps.. Pleas help me?  i need latest oracle certified java dumps.. Pleas help me
do the combinations in java, pls help me its urhent - Development process
do the combinations in java, pls help me its urhent  import... or condition5) ") p.evaluate(); } } i need the ouput as follows can any one help me: action when condition1 and condition3 action when condition1
What do we need to study to become a data scientist?
What do we need to study to become a data scientist?  Hi, I want to make career in Data Science as Data scientist. What do we need to study to become a data scientist? Thanks   Hi, To become a data scientist you
Why do the slashes change when the console gives me the error?
Why do the slashes change when the console gives me the error?   ..."; The console gives me back an error saying: java.io.FileNotFoundException: http...(Image.java:120) at java.lang.Thread.run(Thread.java:619) Why do the slashes change
i need to answer this Question but i can't do it probably
i need to answer this Question but i can't do it probably   use the web to locate the lyrics to the traditional song"The Twelve Days of Christmas" the song contains a list of gifts received for the holiday.the list is cumulative
need the answer vry urgently..plz help me...[plzzzzzzzz
need the answer vry urgently..plz help me...[plzzzzzzzz  the question... code...hpw to write in eclipse platform....plz plz mail me...to [email protected]/[email protected]...plz plz...help....me..it can change my lyfe
i have a problem to do this question...pls help me..
i have a problem to do this question...pls help me..  Write a program that prompts the user to input an integer and the output the number with the digits reversed. For example if the input is 12345, the output should be 54321
inheritance....please help me friends...!!!... this is important project that i have to do it..
inheritance....please help me friends...!!!... this is important project that i have to do it..   Point ................. #x : int #y : int + Point() + Point(xCoordinate:int, YCoordinate:int) + getX() : int + getY() : int
need
need  i need a jsp coding based project plz help me
i want to do a project using jsp and servlet....What are all the materials i need to study
i want to do a project using jsp and servlet....What are all the materials i need to study   i want to do a project using jsp and servlet....What are all the materials i need to study ?   Please visit the following
could someone help in this ........
could someone help in this ........  dear Sir/Mrs I'll be thankful for helping me on this ....... write a program that reads 10 numbers. find the largest number and count the occurrence of the largest number from a declared
I need help on my Java code.... please please help me out!?
I need help on my Java code.... please please help me out!?  Well my... the anagram on screen or the output file! Please show me whats wrong. Thanks i need a part of the code thats fixed if possible! Heres is the code: import
could you suggest me that in which area i have to do a project?i want a complete guidence to complete my project.
could you suggest me that in which area i have to do a project?i want a complete guidence to complete my project.  could you suggest me that in which area i have to do a project?i want a complete guidence to complete my project
I really need help with this assignment question Please help me out Please
I really need help with this assignment question Please help me out Please  * Description* You are hired to develop a laptop inventory information... in MySQL. For this purpose you will need to use the sheridancollege database we
Can any one please help me in this ,,,,,,, need java code for this ,,,,please anyone
Can any one please help me in this ,,,,,,, need java code for this ,,,,please anyone  The Airport Valet Parking Company (AVP) is a company which... information; Bookings for the service need to be made at least 1 day in advance
What is VPN and why do I need it?
Understanding VPN - What is VPN and why do I need it? VPN is also known... marketing companies for different SEO strategies.ADS_TO_REPLACE_5 Why do you need... decided to open another branch in the UK and there is a need to extend the same
need
and move that click to specified co-ordinates.please reply to me
need
and move that click to specified co-ordinates.please reply to me
Social Media Marketing: Do you really need it?
Social Media Marketing: Do you really need it? Social Media Marketing might... that it is always the way to go. There are 3 important things that you need to know before... for nothing is not really a good idea. The first thing that you need to consider
What do we need in PHP Database
Part-4 : What do we Need ? Before making any application or program, we need few software that is essential to run PHP and MySQL code. We need three things..._TO_REPLACE_1 The second thing you need to installed MySQL. It is a database
What Security Functions Do You Need for Ecommerce?
What Security Functions Do You Need for E-commerce? It is very important... of the company but also for the security of the customers. These clients need... functions that any businessperson requires to keep information safe. Need
Fashion Accessories: Why do you need them?
Fashion Accessories: Why do you need them? It is pretty obvious why you would..., but the need for all sorts of fashion accessories doesn't come as a simple idea... to make an outfit look better than it did before, you need to know exactly what
Need Help in Java programming
Need Help in Java programming  Hello. Can someone please help me with writing the following program Java program that gives assignment details such as:assignment number,assignment name,due date,submission date,percentage marks
Need of ORM
Need of ORM  Why do you need ORM tools like hibernate
Need some help urgently
Need some help urgently  Can someone please help me with this below question. I need to write a class for this. If you roll Y standard six-sided dice... need to write a class for this where X and Y are passed as parameter. If someone
How do you do data mining projects?
do you do data mining projects? Try to provide me good examples or tutorials links so that I can learn the topic "How do you do data mining projects...How do you do data mining projects?  Hi, I am beginner in Data

Ads