Composition, Inheritance, or Neither?
For each of the following pairs of classes, state whether one class might inherit from the other, contain the other, or neither. Explain your answers.
a. RetailStore and Manager
b. CashRegister and RetailStore
c. BookStore and RetailStore
d. Book and Bookstore
e. Employee and Manager
f. Manager and Bookstore
g. Shelf and Book
h. Shelf and BookStore
1. Customer and Bookstore
j. Manager and Cashier
k. Cashier and RetailStore
l. Salary and Employee
m. Cashier and Salary
n. Abbott and Costello
o. Singer and MichaelJackson
p. Square and Cube (tricky!)
q. Game and Dice
r. Game and Monopoly
s. Opera and Musical (tricky!)
t. Musical and MusicalComedy
u. Beer and Drinks
v. Telephone and Buttons
w. Wardrobe and Pants
x. ProgrammingExercises and ProgrammingBook
y. Editor and Author
z. Circle and Cylinder (controversial!)
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.