



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
Material Type: Quiz; Professor: Lane; Class: Design of Large Programs; Subject: Computer Science; University: University of New Mexico; Term: Unknown 1989;
Typology: Quizzes
1 / 6
This page cannot be seen from the preview
Don't miss anything!
Ch. 6
Individual section
Circle correct answer for each question
You get 2 tries for each question
Correct on 1st try (top line): 3 pts
Correct on 2nd try (bottom line): 1 pt
Keep your answers! (On quiz sheet)
Hand in sheet when complete
Group section
Start when all members of group are done w/ individual
Again, 2 tries
Grade yourselves as you go along
Hand in final group sheet
Why two interfaces, an abstract class, and a bunch of concrete classes?
Common OO design principle
Interface : provides a contract or specification of what an object should be able to do
Has no data of its own
AbstractClass : provides “most” of the implementation of an interface
Takes grunt work out of instantiating an interface
May not be the most efficient possible
Concrete Class : provides everything necessary to use
Common view of interfaces:
“Interfaces are Java’s kludge to get around the lack of multiple inheritance”
(mostly)
Interfaces describe properties of a thing -- how you can use it
Any two objects that obey the same interface are (should be) semantically interchangeable
Can plug either in to same place and have function of program remain same
They may support diff extra stuff, side effects, have different efficiencies, etc.