How JustAnswer Works:

  • Ask an Expert
    Experts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional Answer
    Via email, text message, or notification as you wait on our site.
    Ask follow up questions if you need to.
  • 100% Satisfaction Guarantee
    Rate the answer you receive.

Ask Eric M. Your Own Question

Eric M.
Eric M., Tutor
Category: Homework
Satisfied Customers: 2198
Experience:  9 years of tutoring experience, Bachelor's and Master's in Computing, pursuing PhD
Type Your Homework Question Here...
Eric M. is online now
A new question is answered every 9 seconds

need help in java homework. have done a little bit and stucked..

Resolved Question:

need help in java homework. have done a little bit and stucked.. it is needed for before 9-25-2013 10 am central time.

The PokeBall is coming soon and you have gotten yourself a date. The PokeBall is a fancy dance and you want to have a fancy night. Part of that is going to a fancy dinner. But where will you go?

We're going to need a little help. In this lab you're going to create your own personal concierge. We'll call them the PokeBallPlanner, and they'll help you make dinner plans. There are many restaurants in the area and each one has several different dinner plans, where the dinner plan is a set of courses (appetizer, entrée, desert, drinks, etc.). We're going to call the dinner plan a Menu and the courses on it LineItems. Which one should we choose? Let's start with something simple – you're going to take the most expensive Menu you can get.

We are going to test one method and one method only:

Menu PokeBallPlanner.getBestDinnerOption(List options)
This method takes a list of menus and returns the best one, which for now means the most expensive one.

Once you finish this lab, you should try improving it. One way of doing that is to pick a best option by some other criterion than price. An alternative is to assign each course a prestige factor – caviar is more prestigious than bruschetta and a burger at Mannys is more prestigious than a burger at McDonalds. The best meal could be the one that is most prestigious. Or it could be the one that has the best prestige to cost ratio. Come up with something cool and try it out.

This one you're going to do without any help. It's just like the oil well problem we did in class. You know everything you need to know, now you just need to put it all together. Good luck.

Part of the project is attached with hint from instructor
Submitted: 2 years ago.
Category: Homework
Expert:  Eric M. replied 2 years ago.
Hey! I'll be happy to help you with this.

The body of the getBestDinnerOption method should look like this:

public String getBestDinnerOption(List options)
LineItem currentMaxLineItem=(LineItem)options.get(0);
for(int i=0;i<options.size();i++) {
LineItem newItem=(LineItem)options.get(i);
if(newItem.price>currentMaxPriceLineItem.price) {

Thanks! If this answer is acceptable, please remember to click 'Accept' or give positive feedback when prompted. If you need further assistance before this is deemed acceptable, please don't hesitate to ask for more detail. Thanks again!
Customer: replied 2 years ago.

hi! would you please also write down the other part of the program? like the get price part in the Menu class?....and please send it as a zip format for the whole project.

thank you for your helps

Expert:  Eric M. replied 2 years ago.
Sure thing! Just to confirm, what is the getPrice() method supposed to do? Is it supposed to return the total cost of all the dishes served by the restaurant, the average cost...?

Also, I don't think your getMenu method works. Did you write that, or is that part of what you were given?
Customer: replied 2 years ago.

...i wrote the get menu method..and i don't think it works either..the get price is the part to actually get the price of a menu for the picking that it could actually print out to show the result..


Customer: replied 2 years ago.

i actually finished it however the result only come out as "Mcdonalds" which has the lowest the price in total..i dont know why..and i'm not sure how to used the getoption in the main either...

Expert:  Eric M. replied 2 years ago.
I think a little more work than expected is required here -- I can still help, it'll just take a day or so.

Is there any portion of the code that I'm not allowed to edit?
Customer: replied 2 years ago.

just the main part should keep the same which is showed in the lab help PDF ..thank you!

Expert:  Eric M. replied 2 years ago.
You can view this answer by clicking here to Register or Login and paying $3.
If you've already paid for this answer, simply Login.
Eric M., Tutor
Category: Homework
Satisfied Customers: 2198
Experience: 9 years of tutoring experience, Bachelor's and Master's in Computing, pursuing PhD
Eric M. and other Homework Specialists are ready to help you

JustAnswer in the News:

Ask-a-doc Web sites: If you've got a quick question, you can try to get an answer from sites that say they have various specialists on hand to give quick answers... seen a spike since October in legal questions from readers about layoffs, unemployment and severance.
Web sites like
...leave nothing to chance.
Traffic on JustAnswer rose 14 percent...and had nearly 400,000 page views in 30 days...inquiries related to stress, high blood pressure, drinking and heart pain jumped 33 percent.
Tory Johnson, GMA Workplace Contributor, discusses work-from-home jobs, such as JustAnswer in which verified Experts answer people’s questions.
I will tell you that...the things you have to go through to be an Expert are quite rigorous.

What Customers are Saying:

  • Wonderful service, prompt, efficient, and accurate. Couldn't have asked for more. I cannot thank you enough for your help. Mary C. Freshfield, Liverpool, UK
< Previous | Next >
  • Wonderful service, prompt, efficient, and accurate. Couldn't have asked for more. I cannot thank you enough for your help. Mary C. Freshfield, Liverpool, UK
  • This expert is wonderful. They truly know what they are talking about, and they actually care about you. They really helped put my nerves at ease. Thank you so much!!!! Alex Los Angeles, CA
  • Thank you for all your help. It is nice to know that this service is here for people like myself, who need answers fast and are not sure who to consult. GP Hesperia, CA
  • I couldn't be more satisfied! This is the site I will always come to when I need a second opinion. Justin Kernersville, NC
  • Just let me say that this encounter has been entirely professional and most helpful. I liked that I could ask additional questions and get answered in a very short turn around. Esther Woodstock, NY
  • Thank you so much for taking your time and knowledge to support my concerns. Not only did you answer my questions, you even took it a step further with replying with more pertinent information I needed to know. Robin Elkton, Maryland
  • He answered my question promptly and gave me accurate, detailed information. If all of your experts are half as good, you have a great thing going here. Diane Dallas, TX

Meet The Experts:

  • Manal Elkhoshkhany

    Manal Elkhoshkhany


    Satisfied Customers:

    More than 5000 online tutoring sessions.
< Last | Next >
  • Manal Elkhoshkhany's Avatar

    Manal Elkhoshkhany


    Satisfied Customers:

    More than 5000 online tutoring sessions.
  • LogicPro's Avatar



    Satisfied Customers:

    Expert in Java C++ C C# VB Javascript Design SQL HTML
  • Linda_us's Avatar


    Finance, Accounts & Homework Tutor

    Satisfied Customers:

    Post Graduate Diploma in Management (MBA)
  • Chris M.'s Avatar

    Chris M.

    M.S.W. Social Work

    Satisfied Customers:

    Master's Degree, strong math and writing skills, experience in one-on-one tutoring (college English)
  • F. Naz's Avatar

    F. Naz

    Chartered Accountant

    Satisfied Customers:

    Experience with chartered accountancy
  • Bizhelp's Avatar



    Satisfied Customers:

    Bachelors Degree and CPA with Accounting work experience
  • Seanna's Avatar



    Satisfied Customers:

    3,000+ satisfied customers, all topics, A+ work