7. (10 points) Given Person class, extend it and define Doctor class.
Here are the signatures of the constructors and methods provided by Person class.
(1) Each person has a name (as a string) and age (as an int).
(2) Constructor Person() define name as "anonymous" and age as 18.
(3) Constructor Person(string name) uses given parameter name to initialized data
member name, and initialize age as 18.
(4) Constructor Person(string name, int age) uses given parameter name to initialize data
member age. If given parameter age is in the range of [0, 130], then uses given
parameter age to initialize data member age, otherwise, set data member age to be 18.
(5) Method string getName() returns the name of a person.
(6) Method int getAge() returns the age of a person.
(7) Method void setAge(int age) uses given parameter age to reset data member age if the
former is in the range of [0, 130], otherwise, leave the corresponding data member as
it is.
(8) Method void setName(string name) uses given parameter name to reset data member
name.
Each doctor is a person, just with additional data member to describe the name of all
insurances he/she takes. This data member insurances can be a vector of string.
Your job: Declare Doctor class as a subclass of Person and define the following
methods. NO NEED TO define Person class.
(1) Default constructor Doctor() with insurances initialized by "medicaid" and
"medicare".
(2) Write a method, given a string representing a specific insurance, search whether it is
in the vector of insurances or not, if yes, return true, otherwise, return false.