SlideShare a Scribd company logo
Assignment: Object Oriented Programming in Java
Information
 This assignment is to be done in pairs (groups of 2).
 Total: 20 marks
o Exercises a-d : 12 marks
o Exercises e: 3 marks
o Exercise f: 5 marks
Case Description
The Michelin is a restaurant situated in a small city called Winsum, located in the northern part of The
Netherlands. The owner, Miss Lisanne, has enlisted your help, as a technology consultant, to develop a
Java application for automating the customer ordering process. Miss Lisanne describes menus (dishes) in
her restaurant as follows.
All menus are identified by a name, e.g. “stamppot boerenkool”, the amount of calories of the dish, e.g.
564.65 kcal, the estimated cooking time in minutes, e.g. 45 min (only integer values), the price per
person, e.g. 20.5, and the number of wine bottles included, e.g. 0.5.
Based on this description, complete the assignment by following the exercises listed below.
Exercise a
 Create a Java class (in a Java Project in Eclipse) to represent a menu from the description Miss
Lisanne. You can call your class Menu (or any other name that you prefer). Note that this class
only serves as a “template” (you do not give values to the attributes yet, but simply define the
attributes and the methods).
 Hint:
o Define the attributes of the class, their types (e.g. String) and visibility.
o Add the constructor in the class
o Define the getter and setter methods for each of the attributes
o Pay attention to the Java naming conventions for classes and methods
Exercise b
 Add a method in your class to print the details of the menus in the format below:
o Menu <name> contains <calories> calories, comes with <number of wine bottles> bottles
and cost <price>
o Note that <name>, <calories> , <number of wine bottles> and <price> correspond to the
attributes of your class.
 You are free to use any name for your method.
Exercise c
 (In the same Java Project) Create another class containing the “main” method.
 In this “main class”, create 5 objects of the class Menu, as defined in the table below.
name amount of calories cooking time price per person number of wine bottles
Stamppot
boerenkool
564.65 45 20.5 0.5
Metworst 345 12 10.99 0
Hutspot 560.4 65 30.9 1
Biefstuk 780 46 50.34 2
Kibbeling 450.4 23 20.78 1
Exercise d
 In your “main class” create an array of length 5, and store the 5 objects (Exercise c) into the
array. You can use any name for your array.
 From the array, use a loop to
o Print the details of all the objects using the method you defined in Exercise b. An
example output:
Exercise e
 Use another loop to:
o Print only the name and cooking time of all the dishes that take less than 30 minutes to
cook. Hint: you may use the getter methods for the name and cooking time attributes,
and then, print these values (name, cooking time). An example output is shown below.
“Metworst” and “Kibbeling” correspond to the names, while 12 and 23
correspond to the cooking time.
Menu Stamppot boerenkool contains 564.65 calories, comes with 0.5 bottles and
cost 20.5
Menu Metworst contains 345.0 calories, comes with 0.0 bottles and cost 10.99
Menu Hutspot contains 560.4 calories, comes with 1.0 bottles and cost 30.9
Menu Biefstuk contains 780.0 calories, comes with 2.0 bottles and cost 50.34
Menu Kibbeling contains 450.4 calories, comes with 1.0 bottles and cost 20.78
Metworst cooks in 12
Kibbeling cooks in 23
Exercise f
 Use another loop to
o Calculate and print the total price of all the objects (in the array). Example output:
o Calculate the total price of all the objects. If the price is more than 65, give a discount of
10% and print the total price and the discounted price. Example output:
Submission
 Locate your 2 classes (Menu and “main class”). In your PC, these files will have extension “.java”.
They will be in a folder that has the same name as your Java Project name in Eclipse.
 Copy these 2 files to a new folder. The folder name should be the ids of the 2 group members
separated by an underscore (“_”). For e.g. if the members have ids S1 and S2, then the folder
name is “S1_S2”.
 Zip the folder and submit it via Lol@, under Travaux  Java Assignment. (Only 1 of the team
member needs to submit)
 To evaluate your work, we will first look at the codes, and then run it (the “main class”) to see if
the results are correct.
The total price is: 133.51
The total price is: 133.51
The discounted price is: 120.15

More Related Content

Viewers also liked

Lo27
Lo27Lo27
Lo27
lksoo
 
P4
P4P4
P4
lksoo
 
E7
E7E7
E7
lksoo
 
E10
E10E10
E10
lksoo
 
P1
P1P1
P1
lksoo
 
T4
T4T4
T4
lksoo
 
T1
T1T1
T1
lksoo
 
P5
P5P5
P5
lksoo
 
E9
E9E9
E9
lksoo
 
T2
T2T2
T2
lksoo
 

Viewers also liked (10)

Lo27
Lo27Lo27
Lo27
 
P4
P4P4
P4
 
E7
E7E7
E7
 
E10
E10E10
E10
 
P1
P1P1
P1
 
T4
T4T4
T4
 
T1
T1T1
T1
 
P5
P5P5
P5
 
E9
E9E9
E9
 
T2
T2T2
T2
 

Similar to Lo37

Here is the assignment5.java file -You are required, but not limi.pdf
Here is the assignment5.java file -You are required, but not limi.pdfHere is the assignment5.java file -You are required, but not limi.pdf
Here is the assignment5.java file -You are required, but not limi.pdf
mallik3000
 
ECET 370 Effective Communication/tutorialrank.com
 ECET 370 Effective Communication/tutorialrank.com ECET 370 Effective Communication/tutorialrank.com
ECET 370 Effective Communication/tutorialrank.com
jonhson275
 
ECET 370 Education Planning--ecet370.com
 ECET 370 Education Planning--ecet370.com ECET 370 Education Planning--ecet370.com
ECET 370 Education Planning--ecet370.com
WindyMiller46
 
ECET 370 Redefined Education--ecet370.com
ECET 370 Redefined Education--ecet370.comECET 370 Redefined Education--ecet370.com
ECET 370 Redefined Education--ecet370.com
agathachristie210
 
These are the outputs which should match they are 4 of them -outp.pdf
These are the outputs which should match they are 4 of them -outp.pdfThese are the outputs which should match they are 4 of them -outp.pdf
These are the outputs which should match they are 4 of them -outp.pdf
udit652068
 
ECET 370 Invent Yourself/newtonhelp.com
ECET 370 Invent Yourself/newtonhelp.comECET 370 Invent Yourself/newtonhelp.com
ECET 370 Invent Yourself/newtonhelp.com
lechenau124
 
ECET 370 Inspiring Innovation--ecet370.com
ECET 370 Inspiring Innovation--ecet370.comECET 370 Inspiring Innovation--ecet370.com
ECET 370 Inspiring Innovation--ecet370.com
kopiko106
 
ECET 370 Success Begins/Newtonhelp.com
ECET 370 Success Begins/Newtonhelp.comECET 370 Success Begins/Newtonhelp.com
ECET 370 Success Begins/Newtonhelp.com
ledlang1
 
Page 8 of 83.Tutorial Get Started with Eclipse in the Compute.docx
Page 8 of 83.Tutorial Get Started with Eclipse in the Compute.docxPage 8 of 83.Tutorial Get Started with Eclipse in the Compute.docx
Page 8 of 83.Tutorial Get Started with Eclipse in the Compute.docx
alfred4lewis58146
 
ECET 370 Achievement Education -- www.ecet370.com
ECET 370 Achievement Education -- www.ecet370.comECET 370 Achievement Education -- www.ecet370.com
ECET 370 Achievement Education -- www.ecet370.com
shanaabe90
 
ECET 370 HELPS Redefined Education--ecet370helps.com
ECET 370 HELPS Redefined Education--ecet370helps.comECET 370 HELPS Redefined Education--ecet370helps.com
ECET 370 HELPS Redefined Education--ecet370helps.com
GVlaxmi7
 
Chef for beginners module 5
Chef for beginners   module 5Chef for beginners   module 5
Chef for beginners module 5
Chef
 
ECET 370 HELPS Education Counseling--ecet370helps.com
ECET 370 HELPS  Education Counseling--ecet370helps.comECET 370 HELPS  Education Counseling--ecet370helps.com
ECET 370 HELPS Education Counseling--ecet370helps.com
claric64
 

Similar to Lo37 (13)

Here is the assignment5.java file -You are required, but not limi.pdf
Here is the assignment5.java file -You are required, but not limi.pdfHere is the assignment5.java file -You are required, but not limi.pdf
Here is the assignment5.java file -You are required, but not limi.pdf
 
ECET 370 Effective Communication/tutorialrank.com
 ECET 370 Effective Communication/tutorialrank.com ECET 370 Effective Communication/tutorialrank.com
ECET 370 Effective Communication/tutorialrank.com
 
ECET 370 Education Planning--ecet370.com
 ECET 370 Education Planning--ecet370.com ECET 370 Education Planning--ecet370.com
ECET 370 Education Planning--ecet370.com
 
ECET 370 Redefined Education--ecet370.com
ECET 370 Redefined Education--ecet370.comECET 370 Redefined Education--ecet370.com
ECET 370 Redefined Education--ecet370.com
 
These are the outputs which should match they are 4 of them -outp.pdf
These are the outputs which should match they are 4 of them -outp.pdfThese are the outputs which should match they are 4 of them -outp.pdf
These are the outputs which should match they are 4 of them -outp.pdf
 
ECET 370 Invent Yourself/newtonhelp.com
ECET 370 Invent Yourself/newtonhelp.comECET 370 Invent Yourself/newtonhelp.com
ECET 370 Invent Yourself/newtonhelp.com
 
ECET 370 Inspiring Innovation--ecet370.com
ECET 370 Inspiring Innovation--ecet370.comECET 370 Inspiring Innovation--ecet370.com
ECET 370 Inspiring Innovation--ecet370.com
 
ECET 370 Success Begins/Newtonhelp.com
ECET 370 Success Begins/Newtonhelp.comECET 370 Success Begins/Newtonhelp.com
ECET 370 Success Begins/Newtonhelp.com
 
Page 8 of 83.Tutorial Get Started with Eclipse in the Compute.docx
Page 8 of 83.Tutorial Get Started with Eclipse in the Compute.docxPage 8 of 83.Tutorial Get Started with Eclipse in the Compute.docx
Page 8 of 83.Tutorial Get Started with Eclipse in the Compute.docx
 
ECET 370 Achievement Education -- www.ecet370.com
ECET 370 Achievement Education -- www.ecet370.comECET 370 Achievement Education -- www.ecet370.com
ECET 370 Achievement Education -- www.ecet370.com
 
ECET 370 HELPS Redefined Education--ecet370helps.com
ECET 370 HELPS Redefined Education--ecet370helps.comECET 370 HELPS Redefined Education--ecet370helps.com
ECET 370 HELPS Redefined Education--ecet370helps.com
 
Chef for beginners module 5
Chef for beginners   module 5Chef for beginners   module 5
Chef for beginners module 5
 
ECET 370 HELPS Education Counseling--ecet370helps.com
ECET 370 HELPS  Education Counseling--ecet370helps.comECET 370 HELPS  Education Counseling--ecet370helps.com
ECET 370 HELPS Education Counseling--ecet370helps.com
 

More from lksoo

Lo43
Lo43Lo43
Lo43
lksoo
 
Lo12
Lo12Lo12
Lo12
lksoo
 
L10
L10L10
L10
lksoo
 
L9
L9L9
L9
lksoo
 
L8
L8L8
L8
lksoo
 
L7
L7L7
L7
lksoo
 
L6
L6L6
L6
lksoo
 
L5
L5L5
L5
lksoo
 
L4
L4L4
L4
lksoo
 
L3
L3L3
L3
lksoo
 
L2
L2L2
L2
lksoo
 
L1
L1L1
L1
lksoo
 
E6
E6E6
E6
lksoo
 

More from lksoo (13)

Lo43
Lo43Lo43
Lo43
 
Lo12
Lo12Lo12
Lo12
 
L10
L10L10
L10
 
L9
L9L9
L9
 
L8
L8L8
L8
 
L7
L7L7
L7
 
L6
L6L6
L6
 
L5
L5L5
L5
 
L4
L4L4
L4
 
L3
L3L3
L3
 
L2
L2L2
L2
 
L1
L1L1
L1
 
E6
E6E6
E6
 

Recently uploaded

一比一原版(DU毕业证)迪肯大学毕业证成绩单
一比一原版(DU毕业证)迪肯大学毕业证成绩单一比一原版(DU毕业证)迪肯大学毕业证成绩单
一比一原版(DU毕业证)迪肯大学毕业证成绩单
zvaywau
 
一比一原版(UniSA毕业证)南澳大学毕业证成绩单如何办理
一比一原版(UniSA毕业证)南澳大学毕业证成绩单如何办理一比一原版(UniSA毕业证)南澳大学毕业证成绩单如何办理
一比一原版(UniSA毕业证)南澳大学毕业证成绩单如何办理
zeyhe
 
acting board rough title here lolaaaaaaa
acting board rough title here lolaaaaaaaacting board rough title here lolaaaaaaa
acting board rough title here lolaaaaaaa
angelicafronda7
 
Memory Rental Store - The Chase (Storyboard)
Memory Rental Store - The Chase (Storyboard)Memory Rental Store - The Chase (Storyboard)
Memory Rental Store - The Chase (Storyboard)
SuryaKalyan3
 
一比一原版(QUT毕业证)昆士兰科技大学毕业证成绩单如何办理
一比一原版(QUT毕业证)昆士兰科技大学毕业证成绩单如何办理一比一原版(QUT毕业证)昆士兰科技大学毕业证成绩单如何办理
一比一原版(QUT毕业证)昆士兰科技大学毕业证成绩单如何办理
zeyhe
 
Inter-Dimensional Girl Boards Segment (Act 3)
Inter-Dimensional Girl Boards Segment (Act 3)Inter-Dimensional Girl Boards Segment (Act 3)
Inter-Dimensional Girl Boards Segment (Act 3)
CristianMestre
 
A Brief Introduction About Hadj Ounis
A Brief  Introduction  About  Hadj OunisA Brief  Introduction  About  Hadj Ounis
A Brief Introduction About Hadj Ounis
Hadj Ounis
 
2137ad - Characters that live in Merindol and are at the center of main stories
2137ad - Characters that live in Merindol and are at the center of main stories2137ad - Characters that live in Merindol and are at the center of main stories
2137ad - Characters that live in Merindol and are at the center of main stories
luforfor
 
一比一原版(GU毕业证)格里菲斯大学毕业证成绩单
一比一原版(GU毕业证)格里菲斯大学毕业证成绩单一比一原版(GU毕业证)格里菲斯大学毕业证成绩单
一比一原版(GU毕业证)格里菲斯大学毕业证成绩单
zvaywau
 
The Last Polymath: Muntadher Saleh‎‎‎‎‎‎‎‎‎‎‎‎
The Last Polymath: Muntadher Saleh‎‎‎‎‎‎‎‎‎‎‎‎The Last Polymath: Muntadher Saleh‎‎‎‎‎‎‎‎‎‎‎‎
The Last Polymath: Muntadher Saleh‎‎‎‎‎‎‎‎‎‎‎‎
iraqartsandculture
 
Fed by curiosity and beauty - Remembering Myrsine Zorba
Fed by curiosity and beauty - Remembering Myrsine ZorbaFed by curiosity and beauty - Remembering Myrsine Zorba
Fed by curiosity and beauty - Remembering Myrsine Zorba
mariavlachoupt
 
一比一原版(qut毕业证)昆士兰科技大学毕业证如何办理
一比一原版(qut毕业证)昆士兰科技大学毕业证如何办理一比一原版(qut毕业证)昆士兰科技大学毕业证如何办理
一比一原版(qut毕业证)昆士兰科技大学毕业证如何办理
taqyed
 
2137ad Merindol Colony Interiors where refugee try to build a seemengly norm...
2137ad  Merindol Colony Interiors where refugee try to build a seemengly norm...2137ad  Merindol Colony Interiors where refugee try to build a seemengly norm...
2137ad Merindol Colony Interiors where refugee try to build a seemengly norm...
luforfor
 
Caffeinated Pitch Bible- developed by Claire Wilson
Caffeinated Pitch Bible- developed by Claire WilsonCaffeinated Pitch Bible- developed by Claire Wilson
Caffeinated Pitch Bible- developed by Claire Wilson
ClaireWilson398082
 
ART FORMS OF KERALA: TRADITIONAL AND OTHERS
ART FORMS OF KERALA: TRADITIONAL AND OTHERSART FORMS OF KERALA: TRADITIONAL AND OTHERS
ART FORMS OF KERALA: TRADITIONAL AND OTHERS
Sandhya J.Nair
 
IrishWritersCtrsPersonalEssaysMay29.pptx
IrishWritersCtrsPersonalEssaysMay29.pptxIrishWritersCtrsPersonalEssaysMay29.pptx
IrishWritersCtrsPersonalEssaysMay29.pptx
Aine Greaney Ellrott
 
ashokathegreat project class 12 presentation
ashokathegreat project class 12 presentationashokathegreat project class 12 presentation
ashokathegreat project class 12 presentation
aditiyad2020
 
Memory Rental Store - The Ending(Storyboard)
Memory Rental Store - The Ending(Storyboard)Memory Rental Store - The Ending(Storyboard)
Memory Rental Store - The Ending(Storyboard)
SuryaKalyan3
 
Codes n Conventionss copy (2).pptx new new
Codes n Conventionss copy (2).pptx new newCodes n Conventionss copy (2).pptx new new
Codes n Conventionss copy (2).pptx new new
ZackSpencer3
 

Recently uploaded (19)

一比一原版(DU毕业证)迪肯大学毕业证成绩单
一比一原版(DU毕业证)迪肯大学毕业证成绩单一比一原版(DU毕业证)迪肯大学毕业证成绩单
一比一原版(DU毕业证)迪肯大学毕业证成绩单
 
一比一原版(UniSA毕业证)南澳大学毕业证成绩单如何办理
一比一原版(UniSA毕业证)南澳大学毕业证成绩单如何办理一比一原版(UniSA毕业证)南澳大学毕业证成绩单如何办理
一比一原版(UniSA毕业证)南澳大学毕业证成绩单如何办理
 
acting board rough title here lolaaaaaaa
acting board rough title here lolaaaaaaaacting board rough title here lolaaaaaaa
acting board rough title here lolaaaaaaa
 
Memory Rental Store - The Chase (Storyboard)
Memory Rental Store - The Chase (Storyboard)Memory Rental Store - The Chase (Storyboard)
Memory Rental Store - The Chase (Storyboard)
 
一比一原版(QUT毕业证)昆士兰科技大学毕业证成绩单如何办理
一比一原版(QUT毕业证)昆士兰科技大学毕业证成绩单如何办理一比一原版(QUT毕业证)昆士兰科技大学毕业证成绩单如何办理
一比一原版(QUT毕业证)昆士兰科技大学毕业证成绩单如何办理
 
Inter-Dimensional Girl Boards Segment (Act 3)
Inter-Dimensional Girl Boards Segment (Act 3)Inter-Dimensional Girl Boards Segment (Act 3)
Inter-Dimensional Girl Boards Segment (Act 3)
 
A Brief Introduction About Hadj Ounis
A Brief  Introduction  About  Hadj OunisA Brief  Introduction  About  Hadj Ounis
A Brief Introduction About Hadj Ounis
 
2137ad - Characters that live in Merindol and are at the center of main stories
2137ad - Characters that live in Merindol and are at the center of main stories2137ad - Characters that live in Merindol and are at the center of main stories
2137ad - Characters that live in Merindol and are at the center of main stories
 
一比一原版(GU毕业证)格里菲斯大学毕业证成绩单
一比一原版(GU毕业证)格里菲斯大学毕业证成绩单一比一原版(GU毕业证)格里菲斯大学毕业证成绩单
一比一原版(GU毕业证)格里菲斯大学毕业证成绩单
 
The Last Polymath: Muntadher Saleh‎‎‎‎‎‎‎‎‎‎‎‎
The Last Polymath: Muntadher Saleh‎‎‎‎‎‎‎‎‎‎‎‎The Last Polymath: Muntadher Saleh‎‎‎‎‎‎‎‎‎‎‎‎
The Last Polymath: Muntadher Saleh‎‎‎‎‎‎‎‎‎‎‎‎
 
Fed by curiosity and beauty - Remembering Myrsine Zorba
Fed by curiosity and beauty - Remembering Myrsine ZorbaFed by curiosity and beauty - Remembering Myrsine Zorba
Fed by curiosity and beauty - Remembering Myrsine Zorba
 
一比一原版(qut毕业证)昆士兰科技大学毕业证如何办理
一比一原版(qut毕业证)昆士兰科技大学毕业证如何办理一比一原版(qut毕业证)昆士兰科技大学毕业证如何办理
一比一原版(qut毕业证)昆士兰科技大学毕业证如何办理
 
2137ad Merindol Colony Interiors where refugee try to build a seemengly norm...
2137ad  Merindol Colony Interiors where refugee try to build a seemengly norm...2137ad  Merindol Colony Interiors where refugee try to build a seemengly norm...
2137ad Merindol Colony Interiors where refugee try to build a seemengly norm...
 
Caffeinated Pitch Bible- developed by Claire Wilson
Caffeinated Pitch Bible- developed by Claire WilsonCaffeinated Pitch Bible- developed by Claire Wilson
Caffeinated Pitch Bible- developed by Claire Wilson
 
ART FORMS OF KERALA: TRADITIONAL AND OTHERS
ART FORMS OF KERALA: TRADITIONAL AND OTHERSART FORMS OF KERALA: TRADITIONAL AND OTHERS
ART FORMS OF KERALA: TRADITIONAL AND OTHERS
 
IrishWritersCtrsPersonalEssaysMay29.pptx
IrishWritersCtrsPersonalEssaysMay29.pptxIrishWritersCtrsPersonalEssaysMay29.pptx
IrishWritersCtrsPersonalEssaysMay29.pptx
 
ashokathegreat project class 12 presentation
ashokathegreat project class 12 presentationashokathegreat project class 12 presentation
ashokathegreat project class 12 presentation
 
Memory Rental Store - The Ending(Storyboard)
Memory Rental Store - The Ending(Storyboard)Memory Rental Store - The Ending(Storyboard)
Memory Rental Store - The Ending(Storyboard)
 
Codes n Conventionss copy (2).pptx new new
Codes n Conventionss copy (2).pptx new newCodes n Conventionss copy (2).pptx new new
Codes n Conventionss copy (2).pptx new new
 

Lo37

  • 1. Assignment: Object Oriented Programming in Java Information  This assignment is to be done in pairs (groups of 2).  Total: 20 marks o Exercises a-d : 12 marks o Exercises e: 3 marks o Exercise f: 5 marks Case Description The Michelin is a restaurant situated in a small city called Winsum, located in the northern part of The Netherlands. The owner, Miss Lisanne, has enlisted your help, as a technology consultant, to develop a Java application for automating the customer ordering process. Miss Lisanne describes menus (dishes) in her restaurant as follows. All menus are identified by a name, e.g. “stamppot boerenkool”, the amount of calories of the dish, e.g. 564.65 kcal, the estimated cooking time in minutes, e.g. 45 min (only integer values), the price per person, e.g. 20.5, and the number of wine bottles included, e.g. 0.5. Based on this description, complete the assignment by following the exercises listed below. Exercise a  Create a Java class (in a Java Project in Eclipse) to represent a menu from the description Miss Lisanne. You can call your class Menu (or any other name that you prefer). Note that this class only serves as a “template” (you do not give values to the attributes yet, but simply define the attributes and the methods).  Hint: o Define the attributes of the class, their types (e.g. String) and visibility. o Add the constructor in the class o Define the getter and setter methods for each of the attributes o Pay attention to the Java naming conventions for classes and methods Exercise b  Add a method in your class to print the details of the menus in the format below: o Menu <name> contains <calories> calories, comes with <number of wine bottles> bottles and cost <price> o Note that <name>, <calories> , <number of wine bottles> and <price> correspond to the attributes of your class.  You are free to use any name for your method.
  • 2. Exercise c  (In the same Java Project) Create another class containing the “main” method.  In this “main class”, create 5 objects of the class Menu, as defined in the table below. name amount of calories cooking time price per person number of wine bottles Stamppot boerenkool 564.65 45 20.5 0.5 Metworst 345 12 10.99 0 Hutspot 560.4 65 30.9 1 Biefstuk 780 46 50.34 2 Kibbeling 450.4 23 20.78 1 Exercise d  In your “main class” create an array of length 5, and store the 5 objects (Exercise c) into the array. You can use any name for your array.  From the array, use a loop to o Print the details of all the objects using the method you defined in Exercise b. An example output: Exercise e  Use another loop to: o Print only the name and cooking time of all the dishes that take less than 30 minutes to cook. Hint: you may use the getter methods for the name and cooking time attributes, and then, print these values (name, cooking time). An example output is shown below. “Metworst” and “Kibbeling” correspond to the names, while 12 and 23 correspond to the cooking time. Menu Stamppot boerenkool contains 564.65 calories, comes with 0.5 bottles and cost 20.5 Menu Metworst contains 345.0 calories, comes with 0.0 bottles and cost 10.99 Menu Hutspot contains 560.4 calories, comes with 1.0 bottles and cost 30.9 Menu Biefstuk contains 780.0 calories, comes with 2.0 bottles and cost 50.34 Menu Kibbeling contains 450.4 calories, comes with 1.0 bottles and cost 20.78 Metworst cooks in 12 Kibbeling cooks in 23
  • 3. Exercise f  Use another loop to o Calculate and print the total price of all the objects (in the array). Example output: o Calculate the total price of all the objects. If the price is more than 65, give a discount of 10% and print the total price and the discounted price. Example output: Submission  Locate your 2 classes (Menu and “main class”). In your PC, these files will have extension “.java”. They will be in a folder that has the same name as your Java Project name in Eclipse.  Copy these 2 files to a new folder. The folder name should be the ids of the 2 group members separated by an underscore (“_”). For e.g. if the members have ids S1 and S2, then the folder name is “S1_S2”.  Zip the folder and submit it via Lol@, under Travaux  Java Assignment. (Only 1 of the team member needs to submit)  To evaluate your work, we will first look at the codes, and then run it (the “main class”) to see if the results are correct. The total price is: 133.51 The total price is: 133.51 The discounted price is: 120.15