Professional Documents
Culture Documents
Assesment #01 (Oop LAB)
Assesment #01 (Oop LAB)
"
Task# 01;
#include <iostream>
struct customer{
string name;
string id;
int age;
string adress;
};
struct product{
string maker;
string brand;
string name;
string adress;
float price;
int height;
int weight;
};
struct order{
string sender;
string reciever;
int date;
product p1;
product p2;
customer c1;
int orderprice;
};
int main()
order o1,o2;
cin>>o1.c1.name;
cout<<o1.c1.name;
cin>>o1.c1.age;
cout<<o1.c1.age<<endl;
cin>>o1.c1.id;
cout<<o1.c1.id<<endl;
cin>>o1.c1.adress;
cout<<o1.c1.adress<<endl;
cin>>o1.c1.maker;
cin>>o1.c1.brand;
cin>>o1.c1.adress>>o1.c1.name>>o1.c1.price>>o1.c1.weight>>o1.c1.height;
cout<<"the adress is"<<o1.c1.adress<<endl<<"the name is"<<o1.c1.name<<endl<<"the price
is"<<o1.c1.price<<endl<<"the weight is"<<o1.c1.weight<<endl<<"the heightt is"<<o1.c1.weigt<<endl;
cout<<"enter name2"<<endl;
cin>>o2.c2.name;
cout<<o2.c2.name;
cin>>o2.c2.age;
cout<<o2.c2.age<<endl;
cin>>o2.c2.id;
cout<<o2.c2.id<<endl;
cin>>o2.c2.adress;
cout<<o2.c2.adress<<endl;
cin>>o2.c2.maker;
cin>>o2.c2.brand;
cin>>o2.c2.adress>>o2.c2.name>>o2.c2.price>>o2.c2.weight>>o2.c2.height;
}
Task# 02;
#include <iostream>
#include <string>
#include<windows.h>
struct student
string name;
string education;
int attendence;
};
struct instractor
string personal;
string education;
string professional;
int attendence;
};
struct course
string content;
int code;
int credithours;
};
struct attendence
{
student S;
instractor I;
};
struct lecture
int roomNo;
int time;
string lecturetype;
};
struct batch
int id;
int intake;
};
struct degree
string title;
int credithours;
};
struct exam
string type;
int degreetime;
};
struct grade
int code;
int marks;
};
int main()
student S;
instractor I;
course C;
attendence A;
lecture L;
batch B;
degree D;
exam E;
grade G;