Q6: Write OOP to represent two workers using friend function. Create a class called worker which contains name, salary.
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
Q6: Write OOP to represent two workers using friend function. Create a class called worker which contains name, salary.
Q6: Write OOP to represent two workers using friend function. Create a class called worker which contains name, salary. A class worker contains constructor to set the values of all data members for each worker and a friend function bonus() to add 100 on the salary of each worker.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!