QUESTION 2 60 MARKS Required: Given the following THREE (3) classes (found on the Edstem platform)...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
QUESTION 2 60 MARKS Required: Given the following THREE (3) classes (found on the Edstem platform) - IceCream, Milkshake, and Waffle: a) Log into the learning platform edstem.org; navigate to: Assessments > Final Exam Question 2 > Consumable.java. Create an abstract superclass, Consumable, and modify the provided classes to work with your abstract superclass. Create a no-arg constructor, a parameterised constructor, and a toString () method for each class. Use as many concepts and principles learned in this course as possible. [SUBMIT ON EDSTEM] (20 marks) b) Justify your class design. Discuss the reasoning behind your design decisions for each of the FOUR (4) classes. [max 500 words] (10 marks) c) Do you think an abstract class or an interface would be more appropriate in this scenario? Justify your answer, making detailed reference to the code provided/written to reinforce your argument. [max 500 words] (10 marks) d) Log into the learning platform edstem.org; navigate to: Assessments Final Exam Question 2 PolymorphismDemo.java. Using the classes you have implemented in part 2(a), create a complete program that demonstrates the concept of polymorphism. [SUBMIT ON EDSTEM] (10 marks) e) Describe how the code you have written in part 2(d) demonstrates the concept of polymorphism, making specific references to the code you have written in parts 2(a) and/or 2(d). [max 250 words] (5 marks) f) Explain inheritance with appropriate references to the code you have written in parts 2(a) and/or 2(d). [max 250 words] (5 marks) QUESTION 2 60 MARKS Required: Given the following THREE (3) classes (found on the Edstem platform) - IceCream, Milkshake, and Waffle: a) Log into the learning platform edstem.org; navigate to: Assessments > Final Exam Question 2 > Consumable.java. Create an abstract superclass, Consumable, and modify the provided classes to work with your abstract superclass. Create a no-arg constructor, a parameterised constructor, and a toString () method for each class. Use as many concepts and principles learned in this course as possible. [SUBMIT ON EDSTEM] (20 marks) b) Justify your class design. Discuss the reasoning behind your design decisions for each of the FOUR (4) classes. [max 500 words] (10 marks) c) Do you think an abstract class or an interface would be more appropriate in this scenario? Justify your answer, making detailed reference to the code provided/written to reinforce your argument. [max 500 words] (10 marks) d) Log into the learning platform edstem.org; navigate to: Assessments Final Exam Question 2 PolymorphismDemo.java. Using the classes you have implemented in part 2(a), create a complete program that demonstrates the concept of polymorphism. [SUBMIT ON EDSTEM] (10 marks) e) Describe how the code you have written in part 2(d) demonstrates the concept of polymorphism, making specific references to the code you have written in parts 2(a) and/or 2(d). [max 250 words] (5 marks) f) Explain inheritance with appropriate references to the code you have written in parts 2(a) and/or 2(d). [max 250 words] (5 marks)
Expert Answer:
Answer rating: 100% (QA)
a Code Implementation Here is an example implementation for creating an abstract superclass Consumable and modifying the provided classes to work with this abstract superclass ... View the full answer
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date:
Students also viewed these programming questions
-
Developments in Technology Light is incident from air on the end face of a multimode optical fibre at angle of incidence as shown below. n n 1 2 The refractive indices of the core and cladding are...
-
answer the question clearly You are building a flight-control system for which a convincing safety case must be made. Would you assign the tasks of safety requirements engineering, test case...
-
Consider examples 9.2 and 9.3. Assume that social damage is quadratic as in the examples. Following section 9.2.3, assume that the regulator can only set a uniform tax. Determine the formula for the...
-
Zinski Supply Corp. has approached ABC to become a distributor of its time management software. The cost of the software is $550 and ABC would propose to sell the package for $995, including...
-
Calculate the compacted cubic yards per hour if a compactor with a 5-ft drum width travels at 3 mph over a 10-in. lift of aggregate base course with 4 passes required to meet density specifications...
-
An online magazine finds that the mean number of typographical errors per page is five. Find the probability that the number of typographical errors found on any given page is (a) exactly five, (b)...
-
Imaging Inc., a developer of radiology equipment, has stock outstanding as follows: 40,000 shares of cumulative preferred 2% stock, $75 par, and 100,000 shares of $50 par common. During its first...
-
Find y'' for y = 2+ y" = 53 X
-
Franco Welles, sales manager for Nanek, Inc., is trying to decide whether to pay a sales rep for a new territory with straight commission or a combination plan. He wants to evaluate possible plansto...
-
Read the case study about Kirklands Inc. and write the Kirklands Strategic Plan
-
Laura Carroll is thinking about opening a high-end fashion boutique in an affluent suburb of Miami, Florida. She contacts an angel investor who she knows has invested in fashion boutiques before, and...
-
Heather Smith and Katie Jones are launching a personal finance software company. They conducted a thorough feasibility analysis, and are now working on their business plan. Heather just sent you an...
-
Pineapple Beach Hotel Co. (Pineapple) operates a hotel providing accommodation, leisure facilities, and restaurants. Its year end was April 30, 2023. You are the audit senior of Berry & Co. and are...
-
John Brunner is a biochemist at a major university. He is thinking about starting a business to commercialize some animal vaccines on which he has been working. John just registered for a biotech...
-
Suppose you have been asked by your local chamber of commerce to teach a two-hour workshop on how to write an effective business plan. The workshop will be attended by people who are thinking about...
-
Question 5: The Poverty Trap Model Suppose the relationship between income today, y, and income tomorrow, Ut+1, is given by: yt+1 = (y-2) +2 1. Using any online graphing calculator, plot the...
-
A Firm intends to invest some capital for a period of 15 years; the Firm's Management considers three Options, each consisting of purchasing a machinery of a specific brand, different for each...
-
The following additional information is available for the Dr. Ivan and Irene Incisor family. The Incisors own a rental beach house in Hawaii. The beach house was rented for the full year during 2012...
-
Sophie is a single taxpayer. For the first payroll period in October 2012, she is paid wages of $3,250 monthly. Sophie claims three allowances on her Form W-4. a. Use the percentage method to...
-
Larry Gaines, age 42, sells his personal residence on November 12, 2012, for $144,000. He lived in the house for 7 years. The expenses of the sale are $10,500, and he has made capital improvements of...
-
For the attached flows over slender delta wings, show that at low angles of attack Eqs. 1.11 and 1.33 are identical. Eq 1.11 Eq 1.13 = 1 2 AR CL=
-
The ellipsoid given in Problem 2.3 is also undergoing a pulsative major axis change with the same period but with phase difference \(\phi\). Express the equation of surfaces. Problem 2.3 An oblate...
-
Express the components of stress tensor in generalized coordinates in terms ofvelocity gradients.
Study smarter with the SolutionInn App