0% found this document useful (0 votes)
3 views5 pages

C++ Lab Class Implementation Guide

Uploaded by

baigsharaz181
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views5 pages

C++ Lab Class Implementation Guide

Uploaded by

baigsharaz181
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

ASSIGNMENT#6

Name: Mirza Sheraz Baig


Roll: F2024408138

Question_1
#include <iostream>

using namespace std;

class Lab {

public:

string labname;

string labbuilding;

string crname;

int labroomNum;

int numOfStudents;

int fans;

int chairs;

int pcs;

int projectors;

int tables;

string instructorName;

Lab(string name, string building, string cr, int room, int students, int f, int c, int p, int proj, int t, string instructor)

labname = name;

labbuilding = building;

crname = cr;

labroomNum = room;

numOfStudents = students;

fans = f;

chairs = c;

pcs = p;

projectors = proj;

tables = t;

instructorName = instructor;

}
Lab(const Lab &a)

labname = [Link];

labbuilding = [Link];

crname = [Link];

labroomNum = [Link];

numOfStudents = [Link];

fans = [Link];

chairs = [Link];

pcs = [Link];

projectors = [Link];

tables = [Link];

instructorName = [Link];

void display()

cout << "Lab Name: " << labname << endl;

cout << "Building: " << labbuilding << endl;

cout << "CR name: " << crname << endl;

cout << "Room Number: " << labroomNum << endl;

cout << "Number of Students: " << numOfStudents << endl;

cout << "Fans: " << fans << endl;

cout << "Chairs: " << chairs << endl;

cout << "PCs: " << pcs << endl;

cout << "Projectors: " << projectors << endl;

cout << "Tables: " << tables << endl;

cout << "Instructor Name: " << instructorName << endl;

};

int main() {

Lab lab1("OOP Lab", "CB1", "ali" ,610, 30, 4, 35, 20, 2, 10, "Mam Javeria Iqbal");

Lab lab2 = lab1;

[Link]();

return 0;

}
Question_2
#include <iostream>

using namespace std;

class Lab {

private:

string labinstructor;

int numstudents;

int numboys;

int numgirls;

float highestCGPA;

float lowestCGPA;

int pcs;

int tables;

int chairs;

int projectors;

int acs;

int windows;

string batchAdvisor;

public:

string labname;

string course;

string building;

int room;

string department;

string university;

int batch;

Lab(string lname, string crs, string bldg, int rm, string instructor,

int students, int boys, int girls, float highCGPA, float lowCGPA,

int pcCount, int tableCount, int chairCount, int projCount,

int acCount, int winCount, string dept, string advisor,

string uni, int b)

labname = lname;

course = crs;
building = bldg;

room = rm;

labinstructor = instructor;

numstudents = students;

numboys = boys;

numgirls = girls;

highestCGPA = highCGPA;

lowestCGPA = lowCGPA;

pcs = pcCount;

tables = tableCount;

chairs = chairCount;

projectors = projCount;

acs = acCount;

windows = winCount;

department = dept;

batchAdvisor = advisor;

university = uni;

batch = b;

void display()

cout << "Lab Name: " << labname << endl;

cout << "Course: " << course << endl;

cout << "Building: " << building << endl;

cout << "Room: " << room << endl;

cout << "Department: " << department << endl;

cout << "University: " << university << endl;

cout << "batch: " << batch << endl;

cout << "Lab Instructor: " << labinstructor << endl;

cout << "Batch Advisor: " << batchAdvisor << endl;

cout << "Number of Students: " << numstudents <<endl;

cout<< " Boys: " << numboys <<endl;

cout<< " Girls: " << numgirls << endl;

cout << "Highest CGPA: " << highestCGPA << ", Lowest CGPA: " << lowestCGPA << endl;

cout << "PCs: " << pcs << ", Tables: " << tables << ", Chairs: " << chairs << endl;

cout << "Projectors: " << projectors << endl;

cout<<" ACs: " << acs <<endl;


cout<< " Windows: " << windows << endl;

};

int main() {

Lab oopLab("OopLab", "OOP", "CB1", 610, "Mam Javeria Iqbal",

50, 30, 20, 3.9, 2.0, 50, 55, 60, 1, 2, 0,

"CyberSecurity", "Amir Waseem", "UMT",2024408);

[Link]();

return 0;

__________________________________________________________________________

You might also like