Q.1: Program to add two complex numbers using objects as arguments.
Q.2: Program to add time in hour and min using objects as argument.
Q.3. Create a class using friend function to calculate the mean of two values and parameter for the mean function should be object of the same class.
Q4.Create two classes using friend function i.e max to find the maximum value and parameters for the max function are two objects of the two classes.
Q.5.A library uses computer based information system for keeping track of its collection. With each book the information system stores the following information.
(i) Accession no of the book (an integer)
(ii) issue code with I,B,L,A indicating issued to a member, send for binding, Issued to another library and available respectively
(iii) Identity of the member which is an alphanumeric quantity.
The services extended by the library are
(a) Provides status of a requested book
(b) Provides list of all issued book
Q.6. Create two classes A & B with data members i and j respectively. Include friend function swap () to swap the values in the data members of the two classes.
Q.7.WAP to count and display the number of objects created in a class. (Use static variable)
(c) Provides list of books issued to a member
No comments:
Post a Comment