1. Public, Private and Protected
2. False, although, when resources are critical, calling a destructor is more timely
3. No, static properties, fields and methods may be independent of object instances
4.
Code:
|---------------|
| HotDrink |
|---------------|
| Milk | |---------------|
| Sugar | | <<Interface>> |
|---------------| | ICup |
| Drink() | |---------------|
| AddMilk() | | Color |
| AddSugar() | | Volume |
|---------------| |---------------|
^ | Refill() |
| | Wash() |
| |---------------|
|-----------------------------|
| |
| |
|---------------| |---------------|
| CupOfCoffee |---() ICup | CupOfTea |---() ICup
|---------------| |---------------|
| BeanType | | LeafType |
|---------------| |---------------|
| | | |
|---------------| |---------------|
5. private void slakeThirst(object beverage)
{
// Employ interface polymorphism
ICup glassWare;
glassWare = beverage;
glassWare.AddMilk();
glassWare.Drink();
glassWare.Wash();
}