- Type
- Quiz
- Course
- CS304 Object Oriented Programming
- Size
- PDF 24 KB
- Updated
- 23 Oct 2026
You get 3 free files a day on the website. Add the Chrome extensionSign in with the extension for 30 a day.
Preview text
Text from pages 1, 2 of 3. Download the file for all 3 pages.
#include<iostream> using namespace std;
class Complex
private: int real, image; public: Complex(){ real = 0; image = 0;
Complex(Complex &obj)
real = obj.real; image = obj.image;
void get_data(){ cout<<"*************************"<<"\n"; cout<<"AL-JUNAID TECH INSTITUTE"<<"\n"; cout<<" For More: "<<"\n";
cout<<"*************************"<<"\n"; cout<<" Enter complex number:"<<"\n"; cout<<"real = "; cin>>real; cout<<" Imaginary = "; cin>>image;
void display_data(){ cout<<real<< " + "<<image<<"i"<<"\n";
void add_Complex(Complex &obj); void sub_Complex(Complex &obj);
int main(){ Complex obj; obj.get_data(); cout<<"1st Complex number is : "<<"\n"; obj.display_data(); Complex obj1(obj); cout<<"2nd Complex number is : "<<"\n"; obj1.display_data(); obj1.add_Complex(obj); obj1.sub_Complex(obj);
void Complex::add_Complex(Complex &obj){
Related CS304 files
All CS304 files →- CS304 Highlighted Handouts by VU Sparky Highlighted PDF 4.3 MB
- CS304 Midterm MCQs with References by Moaaz Midterm PDF 326 KB
- CS304 Assignment Solution Assignment PDF 250 KB
- CS304 Solved Sample Paper by Qalb-e-Momin Quiz PDF 119 KB
- CS304 Quiz 2 by Smile Quiz PDF 467 KB
- CS304 Current Paper by Qalb-e-Momin Quiz PDF 2.7 MB
Get more out of VUBuddy, for free
- Unlimited downloads
- The explanation behind every MCQ answer
- Study offline on slow data
- 30 downloads a day instead of 3
- Sign in and buy Pro Semester here
One Pro Semester membership works in both the extension and the app.