Consider the following scenario There is a Class called Scientific experiments that has a method called Analyse
Question:
Consider the following scenario
There is a Class called Scientific experiments that has a method called Analyse which accepts an array of integers as input and returns their Accuracy of Integers, as output Now, an improved version of Scientific-experiments class called New Scientific-experiments has been released and Scientific-experiments has been withdrawn In this version, the 'Analyse method takes one more input parameter called Type of analysis it Type of analysis=1, the method returns Accuracy of integers if Type of analysis=2 then it returns the Precision of the experiments
a) Which Design Pattern will you sise to protect the calling programs from further changes to Scientific experiments class. We do not wish to change the calling programs.
b) Explain in detail why you have chosen to use this design pattern
c) Explain with me help of class dagram & pseudo code, the solution to protect the calling program from changes to 'Scientific experiments' Class
Building Java Programs A Back To Basics Approach
ISBN: 9780135471944
5th Edition
Authors: Stuart Reges, Marty Stepp