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: 2191
Experience:  9 years of tutoring experience, Bachelor's and Master's in Computing, pursuing PhD
29802289
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
http://speedy.sh/6G6sn/lab03.zip
http://speedy.sh/3d3Ru/lab3help.pdf
Submitted: 1 year ago.
Category: Homework
Expert:  Eric M. replied 1 year 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) {
currentMaxPriceLineItem=newItem;
}
}
return newItem.name;
}

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 1 year 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 1 year 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 1 year 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 restaurant..so that it could actually print out to show the result..


 

Customer: replied 1 year ago.

http://speedy.sh/j5b9E/lab03revised.zip


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 1 year 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 1 year ago.

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

Expert:  Eric M. replied 1 year ago.
THIS ANSWER IS LOCKED!
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: 2191
Experience: 9 years of tutoring experience, Bachelor's and Master's in Computing, pursuing PhD
Eric M. and 5 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... Justanswer.com.
JustAnswer.com...has seen a spike since October in legal questions from readers about layoffs, unemployment and severance.
Web sites like justanswer.com/legal
...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
< Last | 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

    Tutor

    Satisfied Customers:

    4522
    More than 5000 online tutoring sessions.
< Last | Next >
  • http://ww2.justanswer.com/uploads/BU/BusinessTutor/2012-2-2_115741_Kouki2.64x64.jpg Manal Elkhoshkhany's Avatar

    Manal Elkhoshkhany

    Tutor

    Satisfied Customers:

    4522
    More than 5000 online tutoring sessions.
  • http://ww2.justanswer.com/uploads/ComputersGuru/2010-02-13_051118_Photo41.JPG LogicPro's Avatar

    LogicPro

    Engineer

    Satisfied Customers:

    3458
    Expert in Java C++ C C# VB Javascript Design SQL HTML
  • http://ww2.justanswer.com/uploads/LI/lindaus/2012-6-10_04811_IMG20120609164157.64x64.jpg Linda_us's Avatar

    Linda_us

    Finance, Accounts & Homework Tutor

    Satisfied Customers:

    3124
    Post Graduate Diploma in Management (MBA)
  • http://ww2.justanswer.com/uploads/chooser77/2009-08-18_162025_Chris.jpg Chris M.'s Avatar

    Chris M.

    M.S.W. Social Work

    Satisfied Customers:

    2385
    Master's Degree, strong math and writing skills, experience in one-on-one tutoring (college English)
  • http://ww2.justanswer.com/uploads/JawaadAhmed/2009-6-27_12137_SIs_SHadi.jpg F. Naz's Avatar

    F. Naz

    Chartered Accountant

    Satisfied Customers:

    1988
    Experience with chartered accountancy
  • http://ww2.justanswer.com/uploads/JK/jkcpa/2011-1-16_182614_jkcpa.64x64.jpg Bizhelp's Avatar

    Bizhelp

    CPA

    Satisfied Customers:

    1876
    Bachelors Degree and CPA with Accounting work experience
  • http://ww2.justanswer.com/uploads/avremote/photoa.jpg Seanna's Avatar

    Seanna

    Tutor

    Satisfied Customers:

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

Related Homework Questions