Computers and Technology

Create an interface measurable that has a single method: int getmeasure() rewrite our old friend datasetbook. change its name to datasetmeasurable. replace all references to book objects with measurable objects. to test your datasetmeasurable, write two or more classes that implement measurable. (i suggest keeping them very simple.) write a tester that puts instances of both measurable classes into a datasetmeasurable. notice that datasetbook could store only book objects. but datasetmeasurable can store anything implementing measurable. if i have a building class implementing measurable, and a heatsensor implementing measurable, i can put buildings and heatsensors into one datasetmeasurable object. doing that probably isn't rational, but datasetmeasurable is much more flexible than datasetbook; so long as the objects we add to it are measurable, it doesn't care if the application using it is sensible or not.

answer
Answers: 3

Similar questions

Do you know the correct answer?
Create an interface measurable that has a single method: int getmeasure() rewrite our old friend da...

Questions in other subjects: