Download as rtf, pdf, or txt
Download as rtf, pdf, or txt
You are on page 1of 8

"......................................Assesment# 01(oop LAB)........................................

"

Task# 01;

#include <iostream>

using namespace std;

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;

cout<<"enter the name1"<<endl;

cin>>o1.c1.name;

cout<<o1.c1.name;

cout<<"enter the age of customer 1"<<endl;

cin>>o1.c1.age;

cout<<o1.c1.age<<endl;

cout<<"enter the id of customer 1"<<endl;

cin>>o1.c1.id;

cout<<o1.c1.id<<endl;

cout<<"enter the adress of customer 1"<<endl;

cin>>o1.c1.adress;

cout<<o1.c1.adress<<endl;

cout<<"input the product information"<<endl;

cin>>o1.c1.maker;

cout<<"the maker name"<< o1.c1.maker<<endl;

cin>>o1.c1.brand;

cout<<"the brand is "<<o1.c1.brand<<endl;

cout<<"please input all requirments of product"<<

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;

cout<<"enter the age of customer 2"<<endl;

cin>>o2.c2.age;

cout<<o2.c2.age<<endl;

cout<<"enter the id of customer 2"<<endl;

cin>>o2.c2.id;

cout<<o2.c2.id<<endl;

cout<<"enter the adress of customer 2"<<endl;

cin>>o2.c2.adress;

cout<<o2.c2.adress<<endl;

cout<<"input the product information"<<endl;

cin>>o2.c2.maker;

cout<<"the maker name"<< o2.c2.maker<<endl;

cin>>o2.c2.brand;

cout<<"the brand is "<<o2.c2.brand<<endl;

cout<<" please input all requirments of product"<<

cin>>o2.c2.adress>>o2.c2.name>>o2.c2.price>>o2.c2.weight>>o2.c2.height;

cout<<"the adress is"<<o2.c2.adress<<endl<<"the name is"<<o2.c2.name<<endl<<"the price


is"<<o2.c2.price<<endl<<"the weight is"<<o2.c2.weight<<endl<<"the heightt is"<<o2.c2.weigt<<endl;

}
Task# 02;

#include <iostream>

#include <string>

#include<windows.h>

using namespace std;

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;

cout << "Enter the Student name :";

cin >> S.name;

cout << "Enter the Student education :";

cin >> S.education;

cout << "Enter the Instructor name :";

cin >> I.personal;

cout << "Enter the Instructor education :";

cin >> I.education;

cout << "Enter the instructor professional :";


cin >> I.professional;

cout << "Enter the course code :";

cin >> C.code;

cout << "Enter the course content :";

cin >> C.content;

cout << "Enter the course Credit_Hours :";

cin >> C.credithours;

cout << "Enter the student attendence :";

cin >> A.S.attendence;

cout << "Enter the Instructor attendence :";

cin >> A.I.attendence;

cout << "Enter the Lecture time :";

cin >> L.time;

cout << "Enter the Lecture room_NO :";

cin >> L.roomNo;

cout << "Enter the Lecture type :";

cin >> L.lecturetype;

cout << "Enter the Batch id :";

cin >> B.id;

cout << "Enter the Batch intake :";

cin >> B.intake;

cout << "Enter the Degree title :";

cin >> D.title;

cout << "Enter the Degree credit_Hours :";

cin >> D.credithours;


cout << "Enter the Exame type :";

cin >> E.type;

cout << "Enter the Exame Duration :";

cin >> E.degreetime;

cout << "Enter the Grade Code :";

cin >> G.code;

cout << "Enter the marks :";

cin >> G.marks;

You might also like