Restaurant program in bluej

Hi, I guess I'll post here with my problem as well my introduction. I've coded in Java in high school for 2 years but my teacher was horrible so I decided to wait till college to take another programming class. Well I'm Programming Fundamentals and have been assigned a program in which we have to code a menu Here are the "Instructions:" 1. Create the menu below. All code is to be logically broken down into appropriate user-defined functions to accomplish the necessary tasks.

The menu continues to display until the user enters a valid menu selection this will be done through the default switch statement. When a user makes a valid selection he has the option to select another item from the menu until he is finished ordering at which time his bill will be created and tax of 7.

You are to generate the output below. I have spent the past few hours figuring everything out since I've missed the past 2 classes. The only problem I seem to be having is ending the program by hitting 'E'.

If anyone has any suggestions, feel free to comment or whatever. Move the menu lines into another function -- maybe named menu -- so that main will be easier to write. Then write a loop that include menu. That works, though it doesn't match what Ancient Dragon had in mind. His idea has the menu function also asking for the choice from the user.

You could have a function that just displays it or one like his that asks for the choice as well. If you want to ask for the choice too, as Ancient Dragon suggested, your function header would be something like this:. I've changed it a little but it's still iffy.

It's probably because I don't understand creating functions very well, I've been reading about it in my book but still When I run it, it only asks once and then proceeds to the output at the bottom. I think I have this loop wrong. Ah, looks like you are supposed to enter,or 'E' while looking at the menu. If it is, make the menu function return a char, so it'll be the same except the header will be this:. You'll also change choice from "int" to "char" in your while loop and you'll put all of your options in single parentheses.DecimalFormat; import java.

Please come again! Learn more about Scribd Membership Home. Read Free For 30 Days. Much more than documents. Discover everything Scribd has to offer, including books and audiobooks from major publishers. Start Free Trial Cancel anytime. Uploaded by Izaac Garcilazo.

Document Information click to expand document information Description: simple intro. Date uploaded Aug 08, Did you find this document useful?

Is this content inappropriate? Report this Document. Description: simple intro. Flag for inappropriate content. Download Now. Related titles. Carousel Previous Carousel Next. Jump to Page. Search inside document. Documents Similar To simple java restaurant menu. Anonymous nLvaQj. Brittany NewMe Golden. Izaac Garcilazo.

Giovanni and G Bar. Jules Kragen. Manish Agarwal. Mark Ng. Cortney Brown. Vilma Matuzeviciene. Gopalakrishnan Kuppuswamy. Michael Allen. Nikhil Parekh.

More From Izaac Garcilazo. Popular in Cooking. Hannah Grace Soriano Lopez. Mayank Dubey.By using our site, you acknowledge that you have read and understand our Cookie PolicyPrivacy Policyand our Terms of Service. The dark mode beta is finally here. Change your preferences any time. Stack Overflow for Teams is a private, secure spot for you and your coworkers to find and share information. I need to create a calculator that can add, subtract, multiply, divide, absolute value, and round.

This is what I have so far. It will not compile correctly, and I do not know if it will function. What do I need to do to fix it? You have errors in your code. In the two last functions, the first line returns immediately, when it should return a double or an int you were also missing some parenthesis. Try this:. Learn more. BlueJ Calculator Ask Question.

Asked 6 years, 6 months ago. Active 1 year, 5 months ago. Viewed 12k times. This is what I have so far import java. Ian Wilkins Ian Wilkins 1 1 1 gold badge 1 1 silver badge 1 1 bronze badge.

restaurant program in bluej

Active Oldest Votes. Just a friendly note, if this answers your question, use the checkmark next to the arrows to accept the answer! Jordi Castilla Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password.

Post as a guest Name. Email Required, but never shown. The Overflow Blog. The Overflow How many jobs can be done at home? Featured on Meta. Community and Moderator guidelines for escalating issues via new response…. Feedback on Q2 Community Roadmap. Technical site integration observational experiment live on Stack Overflow. Triage needs to be fixed urgently, and users need to be notified upon…. Dark Mode Beta - help us root out low-contrast and un-converted bits.

Visit chat. Related 0. Hot Network Questions. Question feed. Stack Overflow works best with JavaScript enabled.Register and Participate in Oracle's online communities. Learn from thousand of experts, get answers to your questions and share knowledge with peers. Error: You don't have JavaScript enabled. This tool uses JavaScript and much of it will not work correctly without it enabled.

Subscribe to RSS

Please turn JavaScript back on and reload this page. Welcome to Oracle Communities. Please enter a title. You can not post a blank message.

Subscribe to RSS

Please type your message and try again. This discussion is archived. To generate a restaurant bill using blue j. This content has been marked as final. Show 11 replies. Methinks somebody will fail programming class.

A restaurant billing program? Are you hungry? Those seem like reasonably clear - though general - requirements.

An Overview of NetBeans IDE BlueJ Plugin

What's your question? Tip: Claiming a post is "urgent" is a sure way to make lots of people ignore it. It may be urgent to you, but not to the hundreds of people that monitor this forum. That said, if you have a specific question, please feel free to elaborate on it! We are being monitored? Just you. Hmm, so I was thinking the other day about my first attempts at programming.

restaurant program in bluej

Ah, those were the days.By using our site, you acknowledge that you have read and understand our Cookie PolicyPrivacy Policyand our Terms of Service. The dark mode beta is finally here.

Change your preferences any time. Stack Overflow for Teams is a private, secure spot for you and your coworkers to find and share information. I'm writing a program that displays a fast food menu. The user selects an item, then enters the quantity of that item, and can continue selecting items with specific quantities until done.

I have to use several methods. What I'm having trouble with is calculating a running total. This is my first Java class so I only know the basics. I put the running total in a while loop so it'll keep adding a subtotal to it, but when I call done the runningTotal is 0.

What's the best way to keep track of the running total while using multiple methods? Also, I'm open to any criticism or clean up in my code.

Thank you. Also the price returned by the itemPrice needs to be added into the runningTotal variable. This is how your main method should look like.

You are not required to call the subTotal method, once the user is done. You reset runningTotal to 0 every iteration. I have attached a working example. I moved the total calculation to your subTotal method where it adds every subTotal as they come in. Learn more. Asked 4 years, 5 months ago. Active 1 year, 7 months ago.By using our site, you acknowledge that you have read and understand our Cookie PolicyPrivacy Policyand our Terms of Service. The dark mode beta is finally here.

Change your preferences any time. Stack Overflow for Teams is a private, secure spot for you and your coworkers to find and share information. I need to create a calculator that can add, subtract, multiply, divide, absolute value, and round. This is what I have so far. It will not compile correctly, and I do not know if it will function.

What do I need to do to fix it? You have errors in your code. In the two last functions, the first line returns immediately, when it should return a double or an int you were also missing some parenthesis. Try this:. Learn more. BlueJ Calculator Ask Question.

restaurant program in bluej

Asked 6 years, 6 months ago. Active 1 year, 5 months ago. Viewed 12k times. This is what I have so far import java. Ian Wilkins Ian Wilkins 1 1 1 gold badge 1 1 silver badge 1 1 bronze badge.

Active Oldest Votes. Just a friendly note, if this answers your question, use the checkmark next to the arrows to accept the answer! Jordi Castilla Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password.

Post as a guest Name. Email Required, but never shown.Rethink has set up a Restaurant Response Program to assist with food need and access during times of crisis. If you are a NYC based restaurant - you are eligible for the program. Changing their operation model for the time beingto be a food distribution center. Expectation is to function as an extension of Rethink, and under this model for at least 45 days.

We will work with participating restaurants if an extension is needed. Restaurants are to use their existing food supply - beyond that, we will work to get additional food from our various donation partners.

Letter From Founder. Emergency Food Response. Rethink Approach. Emergency Food Response Hiring. Restaurant Response Program. Food Donations. Community Organization Meals Request. Rethink Cafe. Associate Board. Restaurant Response Program Rethink has set up a Restaurant Response Program to assist with food need and access during times of crisis. To apply to the rethink restaurant response program, please submit the following information:.

Last Name. Email Address. We look forward to keeping you updated with the latest Rethink news. Thank you for your support!


Replies to “Restaurant program in bluej”

Leave a Reply

Your email address will not be published. Required fields are marked *