SlideShare a Scribd company logo
1 of 3
Download to read offline
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

Prezentacja
PrezentacjaPrezentacja
Prezentacjasp2zabki
 
755 Cordova Bay Rd - Open House Presentation
755 Cordova Bay Rd - Open House Presentation755 Cordova Bay Rd - Open House Presentation
755 Cordova Bay Rd - Open House PresentationAragonProperties
 
Bezpieczeństwo w sieci prezentacja power point
Bezpieczeństwo w sieci prezentacja power pointBezpieczeństwo w sieci prezentacja power point
Bezpieczeństwo w sieci prezentacja power pointsp2zabki
 

Viewers also liked (6)

Prezentacja
PrezentacjaPrezentacja
Prezentacja
 
755 Cordova Bay Rd - Open House Presentation
755 Cordova Bay Rd - Open House Presentation755 Cordova Bay Rd - Open House Presentation
755 Cordova Bay Rd - Open House Presentation
 
Internet1
Internet1Internet1
Internet1
 
Płock
PłockPłock
Płock
 
Dbi
DbiDbi
Dbi
 
Bezpieczeństwo w sieci prezentacja power point
Bezpieczeństwo w sieci prezentacja power pointBezpieczeństwo w sieci prezentacja power point
Bezpieczeństwo w sieci prezentacja power point
 

Similar to 07

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.pdfmallik3000
 
ECET 370 Effective Communication/tutorialrank.com
 ECET 370 Effective Communication/tutorialrank.com ECET 370 Effective Communication/tutorialrank.com
ECET 370 Effective Communication/tutorialrank.comjonhson275
 
ECET 370 Redefined Education--ecet370.com
ECET 370 Redefined Education--ecet370.comECET 370 Redefined Education--ecet370.com
ECET 370 Redefined Education--ecet370.comagathachristie210
 
ECET 370 Education Planning--ecet370.com
 ECET 370 Education Planning--ecet370.com ECET 370 Education Planning--ecet370.com
ECET 370 Education Planning--ecet370.comWindyMiller46
 
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.pdfudit652068
 
ECET 370 Invent Yourself/newtonhelp.com
ECET 370 Invent Yourself/newtonhelp.comECET 370 Invent Yourself/newtonhelp.com
ECET 370 Invent Yourself/newtonhelp.comlechenau124
 
ECET 370 Inspiring Innovation--ecet370.com
ECET 370 Inspiring Innovation--ecet370.comECET 370 Inspiring Innovation--ecet370.com
ECET 370 Inspiring Innovation--ecet370.comkopiko106
 
ECET 370 Success Begins/Newtonhelp.com
ECET 370 Success Begins/Newtonhelp.comECET 370 Success Begins/Newtonhelp.com
ECET 370 Success Begins/Newtonhelp.comledlang1
 
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.docxalfred4lewis58146
 
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.comshanaabe90
 
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.comGVlaxmi7
 
Chef for beginners module 5
Chef for beginners   module 5Chef for beginners   module 5
Chef for beginners module 5Chef
 
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.comclaric64
 

Similar to 07 (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 Redefined Education--ecet370.com
ECET 370 Redefined Education--ecet370.comECET 370 Redefined Education--ecet370.com
ECET 370 Redefined Education--ecet370.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
 
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 liankei (20)

Lo 19
Lo 19Lo 19
Lo 19
 
Lo 18
Lo 18Lo 18
Lo 18
 
Lo 13
Lo 13Lo 13
Lo 13
 
Lo 12
Lo 12Lo 12
Lo 12
 
Lo 11
Lo 11Lo 11
Lo 11
 
Lo 06
Lo 06Lo 06
Lo 06
 
Lo 05
Lo 05Lo 05
Lo 05
 
Lo 04
Lo 04Lo 04
Lo 04
 
Lo 01
Lo 01Lo 01
Lo 01
 
Lo 16
Lo 16Lo 16
Lo 16
 
Lo 15
Lo 15Lo 15
Lo 15
 
Lo 09
Lo 09Lo 09
Lo 09
 
Lo 08
Lo 08Lo 08
Lo 08
 
Lo 03
Lo 03Lo 03
Lo 03
 
Lo 20
Lo 20Lo 20
Lo 20
 
Lo19
Lo19Lo19
Lo19
 
Lo20
Lo20Lo20
Lo20
 
Lo17
Lo17Lo17
Lo17
 
Lo18
Lo18Lo18
Lo18
 
Lo15
Lo15Lo15
Lo15
 

Recently uploaded

[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesBoston Institute of Analytics
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfhans926745
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 

Recently uploaded (20)

[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 

07

  • 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