SlideShare a Scribd company logo
1 of 1
Download to read offline
Do This: Consider the following 2D array of Dessert objects. 1 Cake chocolateCake = new
Cake("chocolate", 4, 5.99, 1, "strawberry"); Donut blueberryDonut = new Donut("blueberry", 8,
1.50, false, true); Pie applePie = new Pie("apple", 12, 2.50 , "apple", true); Donut plainDonut =
new Donut("plain", 3,0.75, false, false); Cake carrotCake = new Cake("carrot", 6, 8.25, 3 ,
"vanilla"); Cake vanillaCake = new Cake("vanilla", 4, 3.75, 1, "chocolate"); Dessert[][]
dessertInventory = {{chocolateCake,blueberryDonut,applePie},{plainDonut,carrotCake,vanillaCake
}}; Write the method public Dessert highestInventory (Dessert [] [] inventory) that finds and returns
the Dessert object with the highest quantity in the 2D array. You can assume that the Dessert
class contains the method getQuantity(), which returns the quantity of the object it is called on.

More Related Content

More from adamsapparelsformen

Does anyone have a photo of the completed moon map I need t.pdf
Does anyone have a photo of the completed moon map I need t.pdfDoes anyone have a photo of the completed moon map I need t.pdf
Does anyone have a photo of the completed moon map I need t.pdfadamsapparelsformen
 
Document your result for H influenzae below 1 What is the.pdf
Document your result for H influenzae below 1 What is the.pdfDocument your result for H influenzae below 1 What is the.pdf
Document your result for H influenzae below 1 What is the.pdfadamsapparelsformen
 
Doal gaz doru bir ekilde tanmlayan ifadeyi sein Fracking.pdf
Doal gaz doru bir ekilde tanmlayan ifadeyi sein  Fracking.pdfDoal gaz doru bir ekilde tanmlayan ifadeyi sein  Fracking.pdf
Doal gaz doru bir ekilde tanmlayan ifadeyi sein Fracking.pdfadamsapparelsformen
 
Do it in Java Problem4 Natural Language Processing Writ.pdf
Do it in Java Problem4 Natural Language Processing Writ.pdfDo it in Java Problem4 Natural Language Processing Writ.pdf
Do it in Java Problem4 Natural Language Processing Writ.pdfadamsapparelsformen
 
Diyelim ki mevcut d politikann aksine ABD ve Meksika farkl .pdf
Diyelim ki mevcut d politikann aksine ABD ve Meksika farkl .pdfDiyelim ki mevcut d politikann aksine ABD ve Meksika farkl .pdf
Diyelim ki mevcut d politikann aksine ABD ve Meksika farkl .pdfadamsapparelsformen
 
Do it in Java Please ExamPrep4_Spring2023 Source Packages lo.pdf
Do it in Java Please ExamPrep4_Spring2023 Source Packages lo.pdfDo it in Java Please ExamPrep4_Spring2023 Source Packages lo.pdf
Do it in Java Please ExamPrep4_Spring2023 Source Packages lo.pdfadamsapparelsformen
 
DNA replikasyonundan geen bakterileri moleklleri izlemeni.pdf
DNA replikasyonundan geen bakterileri moleklleri izlemeni.pdfDNA replikasyonundan geen bakterileri moleklleri izlemeni.pdf
DNA replikasyonundan geen bakterileri moleklleri izlemeni.pdfadamsapparelsformen
 
DNA exits mostly as a double stranded molecule Because of .pdf
DNA exits mostly as a double stranded molecule Because of .pdfDNA exits mostly as a double stranded molecule Because of .pdf
DNA exits mostly as a double stranded molecule Because of .pdfadamsapparelsformen
 
Dk bir gerileme R2 u anlama gelir A sol taraftaki d.pdf
Dk bir gerileme  R2  u anlama gelir   A  sol taraftaki d.pdfDk bir gerileme  R2  u anlama gelir   A  sol taraftaki d.pdf
Dk bir gerileme R2 u anlama gelir A sol taraftaki d.pdfadamsapparelsformen
 
Divisional Income Statements and Retum on fnvestment Analysi.pdf
Divisional Income Statements and Retum on fnvestment Analysi.pdfDivisional Income Statements and Retum on fnvestment Analysi.pdf
Divisional Income Statements and Retum on fnvestment Analysi.pdfadamsapparelsformen
 
discussing Monopolies and Externalities Positive and Negati.pdf
discussing Monopolies and Externalities Positive and Negati.pdfdiscussing Monopolies and Externalities Positive and Negati.pdf
discussing Monopolies and Externalities Positive and Negati.pdfadamsapparelsformen
 
Distinguish time clauses from conditions and name the types .pdf
Distinguish time clauses from conditions and name the types .pdfDistinguish time clauses from conditions and name the types .pdf
Distinguish time clauses from conditions and name the types .pdfadamsapparelsformen
 
Dispersed Workplace A Case Study Your nonprofit organizatio.pdf
Dispersed Workplace A Case Study Your nonprofit organizatio.pdfDispersed Workplace A Case Study Your nonprofit organizatio.pdf
Dispersed Workplace A Case Study Your nonprofit organizatio.pdfadamsapparelsformen
 
Discuta los mritos relativos de la codificacin manual en c.pdf
Discuta los mritos relativos de la codificacin manual en c.pdfDiscuta los mritos relativos de la codificacin manual en c.pdf
Discuta los mritos relativos de la codificacin manual en c.pdfadamsapparelsformen
 
Discussion Board Death and Dying The Conversation We Want.pdf
Discussion Board  Death and Dying The Conversation We Want.pdfDiscussion Board  Death and Dying The Conversation We Want.pdf
Discussion Board Death and Dying The Conversation We Want.pdfadamsapparelsformen
 
Discussion Prompt Fake news and whos responsible In your .pdf
Discussion Prompt Fake news and whos responsible In your .pdfDiscussion Prompt Fake news and whos responsible In your .pdf
Discussion Prompt Fake news and whos responsible In your .pdfadamsapparelsformen
 
Discussion Board Regression Step 1 Provide a setting for .pdf
Discussion Board Regression Step 1 Provide a setting for .pdfDiscussion Board Regression Step 1 Provide a setting for .pdf
Discussion Board Regression Step 1 Provide a setting for .pdfadamsapparelsformen
 
Discussion 4 Business Supports Discussion Description Plea.pdf
Discussion 4 Business Supports Discussion Description Plea.pdfDiscussion 4 Business Supports Discussion Description Plea.pdf
Discussion 4 Business Supports Discussion Description Plea.pdfadamsapparelsformen
 
Discuss ways to improve cultural competence at the workplace.pdf
Discuss ways to improve cultural competence at the workplace.pdfDiscuss ways to improve cultural competence at the workplace.pdf
Discuss ways to improve cultural competence at the workplace.pdfadamsapparelsformen
 
Discuss how health informatics evolved from being a concept .pdf
Discuss how health informatics evolved from being a concept .pdfDiscuss how health informatics evolved from being a concept .pdf
Discuss how health informatics evolved from being a concept .pdfadamsapparelsformen
 

More from adamsapparelsformen (20)

Does anyone have a photo of the completed moon map I need t.pdf
Does anyone have a photo of the completed moon map I need t.pdfDoes anyone have a photo of the completed moon map I need t.pdf
Does anyone have a photo of the completed moon map I need t.pdf
 
Document your result for H influenzae below 1 What is the.pdf
Document your result for H influenzae below 1 What is the.pdfDocument your result for H influenzae below 1 What is the.pdf
Document your result for H influenzae below 1 What is the.pdf
 
Doal gaz doru bir ekilde tanmlayan ifadeyi sein Fracking.pdf
Doal gaz doru bir ekilde tanmlayan ifadeyi sein  Fracking.pdfDoal gaz doru bir ekilde tanmlayan ifadeyi sein  Fracking.pdf
Doal gaz doru bir ekilde tanmlayan ifadeyi sein Fracking.pdf
 
Do it in Java Problem4 Natural Language Processing Writ.pdf
Do it in Java Problem4 Natural Language Processing Writ.pdfDo it in Java Problem4 Natural Language Processing Writ.pdf
Do it in Java Problem4 Natural Language Processing Writ.pdf
 
Diyelim ki mevcut d politikann aksine ABD ve Meksika farkl .pdf
Diyelim ki mevcut d politikann aksine ABD ve Meksika farkl .pdfDiyelim ki mevcut d politikann aksine ABD ve Meksika farkl .pdf
Diyelim ki mevcut d politikann aksine ABD ve Meksika farkl .pdf
 
Do it in Java Please ExamPrep4_Spring2023 Source Packages lo.pdf
Do it in Java Please ExamPrep4_Spring2023 Source Packages lo.pdfDo it in Java Please ExamPrep4_Spring2023 Source Packages lo.pdf
Do it in Java Please ExamPrep4_Spring2023 Source Packages lo.pdf
 
DNA replikasyonundan geen bakterileri moleklleri izlemeni.pdf
DNA replikasyonundan geen bakterileri moleklleri izlemeni.pdfDNA replikasyonundan geen bakterileri moleklleri izlemeni.pdf
DNA replikasyonundan geen bakterileri moleklleri izlemeni.pdf
 
DNA exits mostly as a double stranded molecule Because of .pdf
DNA exits mostly as a double stranded molecule Because of .pdfDNA exits mostly as a double stranded molecule Because of .pdf
DNA exits mostly as a double stranded molecule Because of .pdf
 
Dk bir gerileme R2 u anlama gelir A sol taraftaki d.pdf
Dk bir gerileme  R2  u anlama gelir   A  sol taraftaki d.pdfDk bir gerileme  R2  u anlama gelir   A  sol taraftaki d.pdf
Dk bir gerileme R2 u anlama gelir A sol taraftaki d.pdf
 
Divisional Income Statements and Retum on fnvestment Analysi.pdf
Divisional Income Statements and Retum on fnvestment Analysi.pdfDivisional Income Statements and Retum on fnvestment Analysi.pdf
Divisional Income Statements and Retum on fnvestment Analysi.pdf
 
discussing Monopolies and Externalities Positive and Negati.pdf
discussing Monopolies and Externalities Positive and Negati.pdfdiscussing Monopolies and Externalities Positive and Negati.pdf
discussing Monopolies and Externalities Positive and Negati.pdf
 
Distinguish time clauses from conditions and name the types .pdf
Distinguish time clauses from conditions and name the types .pdfDistinguish time clauses from conditions and name the types .pdf
Distinguish time clauses from conditions and name the types .pdf
 
Dispersed Workplace A Case Study Your nonprofit organizatio.pdf
Dispersed Workplace A Case Study Your nonprofit organizatio.pdfDispersed Workplace A Case Study Your nonprofit organizatio.pdf
Dispersed Workplace A Case Study Your nonprofit organizatio.pdf
 
Discuta los mritos relativos de la codificacin manual en c.pdf
Discuta los mritos relativos de la codificacin manual en c.pdfDiscuta los mritos relativos de la codificacin manual en c.pdf
Discuta los mritos relativos de la codificacin manual en c.pdf
 
Discussion Board Death and Dying The Conversation We Want.pdf
Discussion Board  Death and Dying The Conversation We Want.pdfDiscussion Board  Death and Dying The Conversation We Want.pdf
Discussion Board Death and Dying The Conversation We Want.pdf
 
Discussion Prompt Fake news and whos responsible In your .pdf
Discussion Prompt Fake news and whos responsible In your .pdfDiscussion Prompt Fake news and whos responsible In your .pdf
Discussion Prompt Fake news and whos responsible In your .pdf
 
Discussion Board Regression Step 1 Provide a setting for .pdf
Discussion Board Regression Step 1 Provide a setting for .pdfDiscussion Board Regression Step 1 Provide a setting for .pdf
Discussion Board Regression Step 1 Provide a setting for .pdf
 
Discussion 4 Business Supports Discussion Description Plea.pdf
Discussion 4 Business Supports Discussion Description Plea.pdfDiscussion 4 Business Supports Discussion Description Plea.pdf
Discussion 4 Business Supports Discussion Description Plea.pdf
 
Discuss ways to improve cultural competence at the workplace.pdf
Discuss ways to improve cultural competence at the workplace.pdfDiscuss ways to improve cultural competence at the workplace.pdf
Discuss ways to improve cultural competence at the workplace.pdf
 
Discuss how health informatics evolved from being a concept .pdf
Discuss how health informatics evolved from being a concept .pdfDiscuss how health informatics evolved from being a concept .pdf
Discuss how health informatics evolved from being a concept .pdf
 

Recently uploaded

Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppCeline George
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 

Recently uploaded (20)

Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website App
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 

Find Highest Quantity Dessert in 2D Array

  • 1. Do This: Consider the following 2D array of Dessert objects. 1 Cake chocolateCake = new Cake("chocolate", 4, 5.99, 1, "strawberry"); Donut blueberryDonut = new Donut("blueberry", 8, 1.50, false, true); Pie applePie = new Pie("apple", 12, 2.50 , "apple", true); Donut plainDonut = new Donut("plain", 3,0.75, false, false); Cake carrotCake = new Cake("carrot", 6, 8.25, 3 , "vanilla"); Cake vanillaCake = new Cake("vanilla", 4, 3.75, 1, "chocolate"); Dessert[][] dessertInventory = {{chocolateCake,blueberryDonut,applePie},{plainDonut,carrotCake,vanillaCake }}; Write the method public Dessert highestInventory (Dessert [] [] inventory) that finds and returns the Dessert object with the highest quantity in the 2D array. You can assume that the Dessert class contains the method getQuantity(), which returns the quantity of the object it is called on.