Question: Define a struct called Child with components name, age, and toysCost. Define a class called Kindergarten that has private members name, cost, numberOfChildren, kids [
Define a struct called Child with components name, age, and toysCost.
Define a class called Kindergarten that has private members name, cost, numberOfChildren, kids an array of type Child, claculate Cost The class has the public members setgetgetCost and a default parametrized constructor.
Implement all member functions of the class enforcing the concept of information hiding.
Use the following driver:
int main
Kindergarten ;
KGsetAlBaraem", ;
KGprint;
return ;
Contents of the "Child.txt file:
Ali Omar,
Hussein Ahmed,
Amal Abass,
Ibrahem Adnan,
Fatima Ali,
Sample Output:
AlBaraem Kindergarten has children with toys worth dirham
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
