Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
177 views

OOP Assignment #5: Friend

The document provides 3 programming assignments: 1) Create a Phone class with a constructor and methods using a friend function. 2) Create a Work class representing working times and salary with methods like add, printSalary, subtract, and compare. 3) Create a Capability class.
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
177 views

OOP Assignment #5: Friend

The document provides 3 programming assignments: 1) Create a Phone class with a constructor and methods using a friend function. 2) Create a Work class representing working times and salary with methods like add, printSalary, subtract, and compare. 3) Create a Capability class.
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

OOP Assignment #5

1# Give the code for an example when you use a friend function. Using the Phone class which containing a name of a person, and a phone number. Include a constructor and appropriate selector methods.

2# Give the code for an example of an ADT class. Using the class Work whose objects represent working times and salary rates. Having methods as add( .), printSalary(), subtract( compare( or any ), ) other methods.

3# Give the code for an example of a Capability class.

You might also like