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..

This answer was rated:

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
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 3 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

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 3 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 3 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...

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 3 years ago.

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


You need to spend $3 to view this post. Add Funds to your account and buy credits.
Eric M. and 2 other Homework Specialists are ready to help you