Question: Q1: (4 Marks) Consider the classes given below. Draw the resulting classes when Pear class inherits from Fruit class using public, private and protected class

Q1: (4 Marks) Consider the classes given below. Draw the resulting classes when Pear class inherits from Fruit class using public, private and protected class access. class Fruit class Pear private: string harvestSeason; bool has Seeds; public: void getdata(); void putdata: protected: bool containsVtaminC; private: int quantity: float price; bool isSweet; public: void showdata(); void getdata()
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
