You have two classes, Class A and Class B. Being a programmer either you can implement Class B as nested class of Class A or you can inherit Class B from Class A.
These are two ways to describe the relationship between classes. Discuses the situations in which, concept of public inheritance and nested class is more appropriate to use. Justify with solid reasons.