Challenge 3: Implement a Father Class
In this challenge, we'll implement a base class father and derived classes, son and daughter.
Problem Statement
Implement a code which have:
- A parent class named
Father
.- Inside it define:
eye_color
hair_color
void Father_traits()
function:- It prints the eye_color and hair_color of the called object
- Inside it define:
- Then, there are two derived classes
Son
class- has a private member
name
- has a function named
Son_traits()
which prints traits of the Son
- has a private member