CodeGym /Courses /Java Multithreading /Big task: Restaurant menu in Java

Big task: Restaurant menu in Java

Java Multithreading
Level 9 , Lesson 15
Available

"Hi, Amigo!"

"Today you'll start working on a super state-of-the-art and useful program! It's an electronic menu. Take a look:"

Big task: Restaurant menu in Java - 1

"Far out! What's it for?"

"You ask so many questions! Look, you do it, and then we'll talk. Consult with the secret agent. He'll give you all the necessary instructions."

"Captain, sir! I can't create such beautiful artwork!"

"Remember, you need to implement the necessary business logic. The pictures will be created by a designer. Go see the secret agent. You'll figure it out along the way."

"I'll figure it out, sir!"

16
Task
Java Multithreading, level 9, lesson 15
Locked
Restaurant (part 1)
Restaurant (part 1)
32
Task
Java Multithreading, level 9, lesson 15
Locked
Restaurant (part 2)
Restaurant (part 2)
32
Task
Java Multithreading, level 9, lesson 15
Locked
Restaurant (part 3)
Restaurant (part 3)
16
Task
Java Multithreading, level 9, lesson 15
Locked
Restaurant (part 4)
Restaurant (part 4)
16
Task
Java Multithreading, level 9, lesson 15
Locked
Restaurant (part 5)
Restaurant (part 5)
16
Task
Java Multithreading, level 9, lesson 15
Locked
Restaurant (part 6)
Restaurant (part 6)
16
Task
Java Multithreading, level 9, lesson 15
Locked
Restaurant (part 7)
Restaurant (part 7)
16
Task
Java Multithreading, level 9, lesson 15
Locked
Restaurant (part 8)
Restaurant (part 8)
16
Task
Java Multithreading, level 9, lesson 15
Locked
Restaurant (part 9)
Restaurant (part 9)
32
Task
Java Multithreading, level 9, lesson 15
Locked
Restaurant (part 10)
Restaurant (part 10)
16
Task
Java Multithreading, level 9, lesson 15
Locked
Restaurant (part 11)
Restaurant (part 11)
9
Task
Java Multithreading, level 9, lesson 15
Locked
Restaurant (part 12)
Restaurant (part 12)
16
Task
Java Multithreading, level 9, lesson 15
Locked
Restaurant (part 13)
Restaurant (part 13)
32
Task
Java Multithreading, level 9, lesson 15
Locked
Restaurant (part 14)
Restaurant (part 14)
32
Task
Java Multithreading, level 9, lesson 15
Locked
Restaurant (part 15)
Restaurant (part 15)
32
Task
Java Multithreading, level 9, lesson 15
Locked
Restaurant (part 16)
Restaurant (part 16)
32
Task
Java Multithreading, level 9, lesson 15
Locked
Restaurant (part 17)
Restaurant (part 17)
32
Task
Java Multithreading, level 9, lesson 15
Locked
Restaurant (part 18)
Restaurant (part 18)
32
Task
Java Multithreading, level 9, lesson 15
Locked
Restaurant (part 19)
Restaurant (part 19)
16
Task
Java Multithreading, level 9, lesson 15
Locked
Restaurant (part 20)
Restaurant (part 20)
32
Task
Java Multithreading, level 9, lesson 15
Locked
Restaurant (part 21)
Restaurant (part 21)
32
Task
Java Multithreading, level 9, lesson 15
Locked
Restaurant (part 22)
Restaurant (part 22)
9
Task
Java Multithreading, level 9, lesson 15
Locked
Restaurant (part 23)
Restaurant (part 23)
Comments (32)
TO VIEW ALL COMMENTS OR TO MAKE A COMMENT,
GO TO FULL VERSION
Azamjon Sobirov Level 47, Toshkent, Uzbekistan
27 May 2025
part 10 very difficult
Maksim Krasnov Level 47, Kyiv, Ukraine
2 March 2023
Part 10. When solving part 10, carefully check: a) correct message formatting (see part 9 paragraph 2.4) b) correct sorting of these messages when printed. (see part 9 paragraph 2.4)
Thomas Level 41, Bayreuth, Germany
14 March 2023
Part 10: It is crucial to make sure you coded point a) with absolute correct formatting. Otherwise nothing will go green except the revalidate call. In addition to Maksim's a) and b) hints I'd like to add a c) c) Create an Advertising with zero impressions left and make sure no Exception will be thrown. If you don't do that the requirement 'The set should include only videos with a positive number of remaining impressions.' will never go green. Part 14: From part 10 on I tested a lot of stuff and changed the main method to do so. If you did this as well make sure you have the requirements for the main method from part 5 intact again (no problem for at least parts 11 to 13). If not requirement 'When the food is prepared, the cook must generate an appropriate event.' will fail Part 16: hard as nails again... but they made it a tiny bit easier for you. Sorting by date does not only work with date classes (Date or LocalDate or a date string starting with yyyyMMdd) but instead you can use the format string they require for output (dd-MMM-yyyy). This will give a wrong sorting in the end but validation accepts it nonetheless (they probably just check some different days of the same month in the same year). Part 17: printActiveVideoSet looks sorted ascending and if you just do that, sort the list ascending by Advertising getName you're done. printArchivedVideoSet looks unsorted from the example (Second , Third, Fourth) but you also need to sort ascending. In addition to printActiveVideoSet you must not distinguish between upper and lower case letters (convert the name to lowercase and then sort).
Dawn( #11020889) Level 37, Toronto, Canada
17 May 2023
I was stuck at Part 14 and tried 13 times. After I saw your recommendation, I woke up. Thank you so much!
Vo Level 41, Sofia, Bulgaria
17 March 2022
Condition: 2.5.1. Throw an UnsupportedOperationException if the number of impressions is not positive. Validation: If the impressionsRemaining field is 0, the revalidate() method must throw an UnsupportedOperationException. Me: Really?!?!
Lisa Level 41
9 October 2021
Part 3... in the update method, if you save the passed Object holding the order in a order variable and cast it to the type Order, then this won't pass... like:

    public void update(Observable tablet, Object arg) {
        Order order = (Order) arg;
        ConsoleHelper.writeMessage("Start cooking - " + order);
    }
You need to print the arg directly Ahh... just seen that Seb posted this already. A pity this hasn't been fixed :(
MaGaby2280 Level 41, Guatemala City, Guatemala
12 April 2021
For the part 3 of the task, take under consideration that the Observable Interface has been deprecated since Java 9
allthemore Level 41
26 February 2021
Task#16 To format month in Date use 'MMM' not 'MMMM' (which is also valid for formatter. Both formats provide the same output view for May month because of its short name and you have to guess which format to use to pass task validation).
BlueJavaBanana Level 37
23 November 2020
I'm with everyone else here. Very ambiguous instructions on some tasks. Worse still is I find that sometimes you cannot pass a tasks because of some small error several previous tasks back. I passed everything up to task 16. it was having none of it. I used the model solution for the section I was failing on and it STILL failed with the model answer. I can only assume that some where several tasks back something wasn't quite what they expected and now the requirements is showing up. It's an alright task, but sometimes spending a whole day just trying to figue out how they want a line of text formatted is annoying and stiffles your progress in learning. It's not like these issues are easy to debug without creating huge amounts of test code to simulate different orders on different days (which I did by the way). Hell, it's not even like we've been taught how to debug! I appreciate codegym, but big tasks like this NEED attention. It is good to struggle and work hard at a solution but when the problem lies with your solution not quite working the way they want it to due to shallow explanations it becomes disheartening. I recommend people give things several good attempts and then have a look at the model answers. You won't learn anything spnding days figuring out how th validator wants stuff to work.
John Squirrels Level 1, San Francisco, Poland
24 November 2020
Thanks for you comment. We'll forward that towards our technical team.
John Squirrels Level 1, San Francisco, Poland
24 November 2020
If something does not work out correctly for you, please go to Help section and leave your question over there.
BlueJavaBanana Level 37
24 November 2020
Thanks John. The codegym set up is amazing! But there could definitely be some improvement on some tasks, I feel this is one of them. Regardless you and your team have made a great course overall. So well done for that!
Justin Johnson Level 31, Clearwater, United States
4 October 2020
This is awful...a lot of the conditions are hard to understand without more explanation. Thank you to everyone who helped with people's questions on the tasks...cant wait to finish.
brus5 Level 41, Dąbrowa Górnicza, Poland
5 September 2020
After reading of comment section I was a little bit scared of this task. I knew that, I couldn't give up on this. The help section of tasks was very helpful and I 'borrow' some ideas of others students when validator wasn't friendly to me. This task was hell to me.
brus5 Level 41, Dąbrowa Górnicza, Poland
1 September 2020
Hint for future students, don't restart that task, it will throw you at first part and you'll have to start it once again.