C++ assignment 4
C++ assignment 4
#include <iostream.h>
class Box {
public:
length = l;
breadth = b;
height = h;
double Volume() {
private:
};
int main(void) {
Box b1; // Declare b1
if(b1.compare(b2)) {
} else {
return 0;
}
13.B
#include<iostream.h>
#include<string.h>
class Employee {
public:
float salary;
this->id=id;
this->name=name;
this->salary=salary;
void display()
};
int main(void)
e1.getdata(101,"Sonno",89000);
e2.getdata(102,"Vicky",59000);
e1.display();
e2.display();
return 0;
}
13 c.
#include <iostream.h>
class Box {
public:
length = l;
breadth = b;
height = h;
double Volume() {
private:
};
int main(void) {
Box b1; // Declare b1
if(b1.compare(b2)) {
} else {
return 0;
}
14.
#include<iostream.h>
#include<conio.h>
class item
int code;
float price;
public:
code=a;
price=b;
void show()
};
int main()
clrscr();
int x,i;
float y;
for(i=0;i<size;i++)
cin>>x>>y;
p->getdata(x,y);
p++;
for(i=0;i<size;i++)
cout<<"\nItem:"<<i+1;
d->show();
d++;
delete [] p;
return 0;