Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

If a team, including yourself, are designing an application of a calculator. You have two calculator types, one calculates in Decimal only (SimpleCalculator) while

 

If a team, including yourself, are designing an application of a calculator. You have two calculator types, one calculates in Decimal only (SimpleCalculator) while the other calculates in Decimal and Binary (ProgrammerCalculator). Your colleague created a design where there is an interface (Calculator) that has two abstract methods calculateDecimal() and calculateBinary(). The two calculator classes (SimpleCalculator and ProgrammerCalculator) implementing the same interface (Calculator). You believe that this design violates one of the design principles. 1) What is the design principle you can apply to solve the problem you discovered? 2) Describe your solution for the problem and why did you apply this solution?

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Income Tax Fundamentals 2013

Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill

31st Edition

1111972516, 978-1285586618, 1285586611, 978-1285613109, 978-1111972516

More Books

Students also viewed these Programming questions

Question

1. What are emotions?

Answered: 1 week ago