jituTechnology

jituTechnology

Uncategorized

Write a program to find the maximum of two member variables suing friend function

  /*Write a program to find the maximum of two member variables suing friend function   Programmed by: KiranShrestha Roll No.: 10121 Programmed on: 31st july,2011*/ #include <iostream.h> #include <conio.h> class D { intx,y; public: D(int a, int b) { x= a; y=b; } void display() { max(x,y); } friend void max (int ,int); }; […]

read more

>4.1 Write a program to swap the private data of two classes using friend function.

> /*Write a program to swap the private data of two classes using friend function. Programmed by: KiranShrestha Roll No.: 10121 Programmed on: 31st July, 2011*/ #include <iostream.h> #include <conio.h> class b; class a { int x; public: void assign(int t) { x =t; } void display() { cout<<“value of x is: “<<x<<endl; } friend […]

read more

>3.2 Toollbooth at a bridge programme

> /*imagine a tollbooth at a bridge. Cars passing by the booth are expected to pay a five-rupee toll. Mostly they do, but sometimes a car goes by without paying. The tollbooth keeps track of the number of cars that have gone by and of the total amount of money collected. Model this tollbooth with […]

read more

>3.1 Write a program to test this class for 10 customers. Make use of all three types of constructors (wherever appropriate)

> /* define a class to represent a bank account. Include the following members: Data Members: i)                    Name of the account holder ii)                   Account number iii)                 Balance amount in the account Member functions: I)                    Open an account II)                  Deposit and withdrawal money III)                Display account information Write a program to test this class for 10 […]

read more

>2.5 Write a program to represent a Circle to calculate area and perimeter

> /*Write a program to represent a Circle. Include member functions to perform the following task: a.     Calculate area of the circle b.     Calculate perimeter of the circle Programmed by: Name: Jitendra Kr Yadav Roll: 10116 (NCIT-ELX) Date: 23 july 2011*/ #include <iostream.h> #include <conio.h> class Circle { private: float r; public: void assign(float a) […]

read more


Connect with Me

GPO 8973 NPC 541; Kathmandu Nepal
Phone: +977 9851236800

Calendar

March 2024
S M T W T F S
 12
3456789
10111213141516
17181920212223
24252627282930
31