test
This commit is contained in:
parent
37776af5db
commit
ab03d5f10c
4045 changed files with 286212 additions and 3 deletions
64
.config/Code/User/History/17d3e36f/0pbt.cpp
Normal file
64
.config/Code/User/History/17d3e36f/0pbt.cpp
Normal file
|
@ -0,0 +1,64 @@
|
|||
/*
|
||||
Rafay Ahmad
|
||||
23I-2526
|
||||
*/
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
|
||||
class BasicShape{
|
||||
double area;
|
||||
public:
|
||||
double getArea(){
|
||||
return area;
|
||||
}
|
||||
virtual void calcArea() = 0;
|
||||
void setArea(double area){
|
||||
this->area = area;
|
||||
}
|
||||
};
|
||||
|
||||
class Circle : public BasicShape{
|
||||
long int centerX;
|
||||
long int centerY;
|
||||
double radius;
|
||||
public:
|
||||
Circle(long int centerX, long int centerY, double radius) : centerX(centerX), centerY(centerY){
|
||||
calcArea();
|
||||
}
|
||||
void calcArea() override{
|
||||
setArea(3.14159*radius*radius);
|
||||
}
|
||||
};
|
||||
|
||||
class Rectangle : public BasicShape{
|
||||
long int width;
|
||||
long int length;
|
||||
public:
|
||||
Rectangle(long int width, long int length) : width(width), length(length){
|
||||
calcArea();
|
||||
}
|
||||
long int getWidth(){
|
||||
return width;
|
||||
}
|
||||
long int getLength(){
|
||||
return length;
|
||||
}
|
||||
void calcArea() override{
|
||||
setArea(width*length);
|
||||
}
|
||||
};
|
||||
|
||||
int main(){
|
||||
|
||||
BasicShape **shapes = new BasicShape*[2];
|
||||
shapes[0] = new Circle(10, 10, 10);
|
||||
shapes[1] = new Rectangle(30, 50);
|
||||
|
||||
shapes[0]->calcArea();
|
||||
shapes[1]->calcArea();
|
||||
|
||||
cout<<"Circle: "<<shapes[0]->getArea()<<endl;
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
19
.config/Code/User/History/17d3e36f/2D4M.cpp
Normal file
19
.config/Code/User/History/17d3e36f/2D4M.cpp
Normal file
|
@ -0,0 +1,19 @@
|
|||
/*
|
||||
Rafay Ahmad
|
||||
23I-2526
|
||||
*/
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
|
||||
class BasicShape{
|
||||
double area;
|
||||
public:
|
||||
|
||||
};
|
||||
|
||||
int main(){
|
||||
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
66
.config/Code/User/History/17d3e36f/2ElL.cpp
Normal file
66
.config/Code/User/History/17d3e36f/2ElL.cpp
Normal file
|
@ -0,0 +1,66 @@
|
|||
/*
|
||||
Rafay Ahmad
|
||||
23I-2526
|
||||
*/
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
|
||||
class BasicShape{
|
||||
double area;
|
||||
public:
|
||||
double getArea(){
|
||||
return area;
|
||||
}
|
||||
virtual void calcArea() = 0;
|
||||
void setArea(double area){
|
||||
this->area = area;
|
||||
}
|
||||
};
|
||||
|
||||
class Circle : public BasicShape{
|
||||
long int centerX;
|
||||
long int centerY;
|
||||
double radius;
|
||||
public:
|
||||
Circle(long int centerX, long int centerY, double radius) : centerX(centerX), centerY(centerY){
|
||||
calcArea();
|
||||
}
|
||||
void calcArea() override{
|
||||
setArea(3.14159*radius*radius);
|
||||
}
|
||||
};
|
||||
|
||||
class Rectangle : public BasicShape{
|
||||
long int width;
|
||||
long int length;
|
||||
public:
|
||||
Rectangle(long int width, long int length) : width(width), length(length){
|
||||
calcArea();
|
||||
}
|
||||
long int getWidth(){
|
||||
return width;
|
||||
}
|
||||
long int getLength(){
|
||||
return length;
|
||||
}
|
||||
void calcArea() override{
|
||||
setArea(width*length);
|
||||
}
|
||||
};
|
||||
|
||||
int main(){
|
||||
|
||||
BasicShape **shapes = new BasicShape*[2];
|
||||
shapes[0] = new Circle(0, 0, 10);
|
||||
shapes[1] = new Rectangle(30, 50);
|
||||
|
||||
cout<<"Circle: "<<shapes[0]->getArea()<<endl;
|
||||
cout<<"Rectangle: "<<shapes[1]->getArea()<<endl;
|
||||
|
||||
delete shapes[0];
|
||||
delete shapes[1];
|
||||
delete[] shapes;
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
32
.config/Code/User/History/17d3e36f/7E4T.cpp
Normal file
32
.config/Code/User/History/17d3e36f/7E4T.cpp
Normal file
|
@ -0,0 +1,32 @@
|
|||
/*
|
||||
Rafay Ahmad
|
||||
23I-2526
|
||||
*/
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
|
||||
class BasicShape{
|
||||
double area;
|
||||
public:
|
||||
double getArea(){
|
||||
return area;
|
||||
}
|
||||
virtual void calcArea() = 0;
|
||||
};
|
||||
|
||||
class Circle : public BasicShape{
|
||||
long int centerX;
|
||||
long int centerY;
|
||||
double radius;
|
||||
public:
|
||||
Circle(long int centerX, long int centerY, double radius) : centerX(centerX), centerY(centerY){
|
||||
calcArea();
|
||||
}
|
||||
};
|
||||
|
||||
int main(){
|
||||
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
21
.config/Code/User/History/17d3e36f/B4Fg.cpp
Normal file
21
.config/Code/User/History/17d3e36f/B4Fg.cpp
Normal file
|
@ -0,0 +1,21 @@
|
|||
/*
|
||||
Rafay Ahmad
|
||||
23I-2526
|
||||
*/
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
|
||||
class BasicShape{
|
||||
double area;
|
||||
public:
|
||||
double getArea(){
|
||||
return area;
|
||||
}
|
||||
};
|
||||
|
||||
int main(){
|
||||
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
13
.config/Code/User/History/17d3e36f/CGB4.cpp
Normal file
13
.config/Code/User/History/17d3e36f/CGB4.cpp
Normal file
|
@ -0,0 +1,13 @@
|
|||
/*
|
||||
Rafay Ahmad
|
||||
23I-2526
|
||||
*/
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
|
||||
int main(){
|
||||
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
56
.config/Code/User/History/17d3e36f/CwBh.cpp
Normal file
56
.config/Code/User/History/17d3e36f/CwBh.cpp
Normal file
|
@ -0,0 +1,56 @@
|
|||
/*
|
||||
Rafay Ahmad
|
||||
23I-2526
|
||||
*/
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
|
||||
class BasicShape{
|
||||
double area;
|
||||
public:
|
||||
double getArea(){
|
||||
return area;
|
||||
}
|
||||
virtual void calcArea() = 0;
|
||||
void setArea(double area){
|
||||
this->area = area;
|
||||
}
|
||||
};
|
||||
|
||||
class Circle : public BasicShape{
|
||||
long int centerX;
|
||||
long int centerY;
|
||||
double radius;
|
||||
public:
|
||||
Circle(long int centerX, long int centerY, double radius) : centerX(centerX), centerY(centerY){
|
||||
calcArea();
|
||||
}
|
||||
void calcArea() override{
|
||||
setArea(3.14159*radius*radius);
|
||||
}
|
||||
};
|
||||
|
||||
class Rectangle : public BasicShape{
|
||||
long int width;
|
||||
long int length;
|
||||
public:
|
||||
Rectangle(long int width, long int length) : width(width), length(length){
|
||||
calcArea();
|
||||
}
|
||||
long int getWidth(){
|
||||
return width;
|
||||
}
|
||||
long int getLength(){
|
||||
return length;
|
||||
}
|
||||
void calcArea() override{
|
||||
setArea(width*length);
|
||||
}
|
||||
};
|
||||
|
||||
int main(){
|
||||
|
||||
BasicShape **shapes;
|
||||
|
||||
return 0;
|
||||
}
|
56
.config/Code/User/History/17d3e36f/D8Wj.cpp
Normal file
56
.config/Code/User/History/17d3e36f/D8Wj.cpp
Normal file
|
@ -0,0 +1,56 @@
|
|||
/*
|
||||
Rafay Ahmad
|
||||
23I-2526
|
||||
*/
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
|
||||
class BasicShape{
|
||||
double area;
|
||||
public:
|
||||
double getArea(){
|
||||
return area;
|
||||
}
|
||||
virtual void calcArea() = 0;
|
||||
void setArea(double area){
|
||||
this->area = area;
|
||||
}
|
||||
};
|
||||
|
||||
class Circle : public BasicShape{
|
||||
long int centerX;
|
||||
long int centerY;
|
||||
double radius;
|
||||
public:
|
||||
Circle(long int centerX, long int centerY, double radius) : centerX(centerX), centerY(centerY){
|
||||
calcArea();
|
||||
}
|
||||
void calcArea() override{
|
||||
setArea(3.14159*radius*radius);
|
||||
}
|
||||
};
|
||||
|
||||
class Rectangle : public BasicShape{
|
||||
long int width;
|
||||
long int length;
|
||||
public:
|
||||
Rectangle(long int width, long int length) : width(width), length(length){
|
||||
calcArea();
|
||||
}
|
||||
long int getWidth(){
|
||||
return width;
|
||||
}
|
||||
long int getLength(){
|
||||
return length;
|
||||
}
|
||||
void calcArea() override{
|
||||
setArea(width*length);
|
||||
}
|
||||
};
|
||||
|
||||
int main(){
|
||||
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
22
.config/Code/User/History/17d3e36f/Du76.cpp
Normal file
22
.config/Code/User/History/17d3e36f/Du76.cpp
Normal file
|
@ -0,0 +1,22 @@
|
|||
/*
|
||||
Rafay Ahmad
|
||||
23I-2526
|
||||
*/
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
|
||||
class BasicShape{
|
||||
double area;
|
||||
public:
|
||||
double getArea(){
|
||||
return area;
|
||||
}
|
||||
virtual void calcArea() = 0;
|
||||
};
|
||||
|
||||
int main(){
|
||||
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
26
.config/Code/User/History/17d3e36f/GerB.cpp
Normal file
26
.config/Code/User/History/17d3e36f/GerB.cpp
Normal file
|
@ -0,0 +1,26 @@
|
|||
/*
|
||||
Rafay Ahmad
|
||||
23I-2526
|
||||
*/
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
|
||||
class BasicShape{
|
||||
double area;
|
||||
public:
|
||||
double getArea(){
|
||||
return area;
|
||||
}
|
||||
virtual void calcArea() = 0;
|
||||
};
|
||||
|
||||
class Circle : public BasicShape{
|
||||
|
||||
};
|
||||
|
||||
int main(){
|
||||
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
61
.config/Code/User/History/17d3e36f/GsiF.cpp
Normal file
61
.config/Code/User/History/17d3e36f/GsiF.cpp
Normal file
|
@ -0,0 +1,61 @@
|
|||
/*
|
||||
Rafay Ahmad
|
||||
23I-2526
|
||||
*/
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
|
||||
class BasicShape{
|
||||
double area;
|
||||
public:
|
||||
double getArea(){
|
||||
return area;
|
||||
}
|
||||
virtual void calcArea() = 0;
|
||||
void setArea(double area){
|
||||
this->area = area;
|
||||
}
|
||||
};
|
||||
|
||||
class Circle : public BasicShape{
|
||||
long int centerX;
|
||||
long int centerY;
|
||||
double radius;
|
||||
public:
|
||||
Circle(long int centerX, long int centerY, double radius) : centerX(centerX), centerY(centerY){
|
||||
calcArea();
|
||||
}
|
||||
void calcArea() override{
|
||||
setArea(3.14159*radius*radius);
|
||||
}
|
||||
};
|
||||
|
||||
class Rectangle : public BasicShape{
|
||||
long int width;
|
||||
long int length;
|
||||
public:
|
||||
Rectangle(long int width, long int length) : width(width), length(length){
|
||||
calcArea();
|
||||
}
|
||||
long int getWidth(){
|
||||
return width;
|
||||
}
|
||||
long int getLength(){
|
||||
return length;
|
||||
}
|
||||
void calcArea() override{
|
||||
setArea(width*length);
|
||||
}
|
||||
};
|
||||
|
||||
int main(){
|
||||
|
||||
BasicShape **shapes = new BasicShape*[2];
|
||||
shapes[0] = new Circle(10, 10, 10);
|
||||
shapes[1] = new Rectangle(30, 50);
|
||||
|
||||
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
28
.config/Code/User/History/17d3e36f/IBRX.cpp
Normal file
28
.config/Code/User/History/17d3e36f/IBRX.cpp
Normal file
|
@ -0,0 +1,28 @@
|
|||
/*
|
||||
Rafay Ahmad
|
||||
23I-2526
|
||||
*/
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
|
||||
class BasicShape{
|
||||
double area;
|
||||
public:
|
||||
double getArea(){
|
||||
return area;
|
||||
}
|
||||
virtual void calcArea() = 0;
|
||||
};
|
||||
|
||||
class Circle : public BasicShape{
|
||||
long int centerX;
|
||||
long int centerY;
|
||||
|
||||
};
|
||||
|
||||
int main(){
|
||||
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
38
.config/Code/User/History/17d3e36f/JH2O.cpp
Normal file
38
.config/Code/User/History/17d3e36f/JH2O.cpp
Normal file
|
@ -0,0 +1,38 @@
|
|||
/*
|
||||
Rafay Ahmad
|
||||
23I-2526
|
||||
*/
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
|
||||
class BasicShape{
|
||||
double area;
|
||||
public:
|
||||
double getArea(){
|
||||
return area;
|
||||
}
|
||||
virtual void calcArea() = 0;
|
||||
void setArea(double area){
|
||||
this->area = area;
|
||||
}
|
||||
};
|
||||
|
||||
class Circle : public BasicShape{
|
||||
long int centerX;
|
||||
long int centerY;
|
||||
double radius;
|
||||
public:
|
||||
Circle(long int centerX, long int centerY, double radius) : centerX(centerX), centerY(centerY){
|
||||
calcArea();
|
||||
}
|
||||
void calcArea() override{
|
||||
setArea(3.14159*radius*radius);
|
||||
}
|
||||
};
|
||||
|
||||
int main(){
|
||||
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
45
.config/Code/User/History/17d3e36f/KMHn.cpp
Normal file
45
.config/Code/User/History/17d3e36f/KMHn.cpp
Normal file
|
@ -0,0 +1,45 @@
|
|||
/*
|
||||
Rafay Ahmad
|
||||
23I-2526
|
||||
*/
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
|
||||
class BasicShape{
|
||||
double area;
|
||||
public:
|
||||
double getArea(){
|
||||
return area;
|
||||
}
|
||||
virtual void calcArea() = 0;
|
||||
void setArea(double area){
|
||||
this->area = area;
|
||||
}
|
||||
};
|
||||
|
||||
class Circle : public BasicShape{
|
||||
long int centerX;
|
||||
long int centerY;
|
||||
double radius;
|
||||
public:
|
||||
Circle(long int centerX, long int centerY, double radius) : centerX(centerX), centerY(centerY){
|
||||
calcArea();
|
||||
}
|
||||
void calcArea() override{
|
||||
setArea(3.14159*radius*radius);
|
||||
}
|
||||
};
|
||||
|
||||
class Rectangle : public BasicShape{
|
||||
long int width;
|
||||
long int length;
|
||||
public:
|
||||
|
||||
};
|
||||
|
||||
int main(){
|
||||
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
66
.config/Code/User/History/17d3e36f/Ltcg.cpp
Normal file
66
.config/Code/User/History/17d3e36f/Ltcg.cpp
Normal file
|
@ -0,0 +1,66 @@
|
|||
/*
|
||||
Rafay Ahmad
|
||||
23I-2526
|
||||
*/
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
|
||||
class BasicShape{
|
||||
double area;
|
||||
public:
|
||||
double getArea(){
|
||||
return area;
|
||||
}
|
||||
virtual void calcArea() = 0;
|
||||
void setArea(double area){
|
||||
this->area = area;
|
||||
}
|
||||
};
|
||||
|
||||
class Circle : public BasicShape{
|
||||
long int centerX;
|
||||
long int centerY;
|
||||
double radius;
|
||||
public:
|
||||
Circle(long int centerX, long int centerY, double radius) : centerX(centerX), centerY(centerY), radius(radius){
|
||||
calcArea();
|
||||
}
|
||||
void calcArea() override{
|
||||
setArea(3.14159*radius*radius);
|
||||
}
|
||||
};
|
||||
|
||||
class Rectangle : public BasicShape{
|
||||
long int width;
|
||||
long int length;
|
||||
public:
|
||||
Rectangle(long int width, long int length) : width(width), length(length){
|
||||
calcArea();
|
||||
}
|
||||
long int getWidth(){
|
||||
return width;
|
||||
}
|
||||
long int getLength(){
|
||||
return length;
|
||||
}
|
||||
void calcArea() override{
|
||||
setArea(width*length);
|
||||
}
|
||||
};
|
||||
|
||||
int main(){
|
||||
|
||||
BasicShape **shapes = new BasicShape*[2];
|
||||
shapes[0] = new Circle(0, 0, 10);
|
||||
shapes[1] = new Rectangle(30, 50);
|
||||
|
||||
cout<<"Circle: "<<shapes[0]->getArea()<<endl;
|
||||
cout<<"Rectangle: "<<shapes[1]->getArea()<<endl;
|
||||
|
||||
delete shapes[0];
|
||||
delete shapes[1];
|
||||
delete[] shapes;
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
42
.config/Code/User/History/17d3e36f/R7mB.cpp
Normal file
42
.config/Code/User/History/17d3e36f/R7mB.cpp
Normal file
|
@ -0,0 +1,42 @@
|
|||
/*
|
||||
Rafay Ahmad
|
||||
23I-2526
|
||||
*/
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
|
||||
class BasicShape{
|
||||
double area;
|
||||
public:
|
||||
double getArea(){
|
||||
return area;
|
||||
}
|
||||
virtual void calcArea() = 0;
|
||||
void setArea(double area){
|
||||
this->area = area;
|
||||
}
|
||||
};
|
||||
|
||||
class Circle : public BasicShape{
|
||||
long int centerX;
|
||||
long int centerY;
|
||||
double radius;
|
||||
public:
|
||||
Circle(long int centerX, long int centerY, double radius) : centerX(centerX), centerY(centerY){
|
||||
calcArea();
|
||||
}
|
||||
void calcArea() override{
|
||||
setArea(3.14159*radius*radius);
|
||||
}
|
||||
};
|
||||
|
||||
class Rectangle : public BasicShape{
|
||||
|
||||
};
|
||||
|
||||
int main(){
|
||||
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
17
.config/Code/User/History/17d3e36f/RSST.cpp
Normal file
17
.config/Code/User/History/17d3e36f/RSST.cpp
Normal file
|
@ -0,0 +1,17 @@
|
|||
/*
|
||||
Rafay Ahmad
|
||||
23I-2526
|
||||
*/
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
|
||||
class BasicShape{
|
||||
|
||||
};
|
||||
|
||||
int main(){
|
||||
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
64
.config/Code/User/History/17d3e36f/SS3q.cpp
Normal file
64
.config/Code/User/History/17d3e36f/SS3q.cpp
Normal file
|
@ -0,0 +1,64 @@
|
|||
/*
|
||||
Rafay Ahmad
|
||||
23I-2526
|
||||
*/
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
|
||||
class BasicShape{
|
||||
double area;
|
||||
public:
|
||||
double getArea(){
|
||||
return area;
|
||||
}
|
||||
virtual void calcArea() = 0;
|
||||
void setArea(double area){
|
||||
this->area = area;
|
||||
}
|
||||
};
|
||||
|
||||
class Circle : public BasicShape{
|
||||
long int centerX;
|
||||
long int centerY;
|
||||
double radius;
|
||||
public:
|
||||
Circle(long int centerX, long int centerY, double radius) : centerX(centerX), centerY(centerY){
|
||||
calcArea();
|
||||
}
|
||||
void calcArea() override{
|
||||
setArea(3.14159*radius*radius);
|
||||
}
|
||||
};
|
||||
|
||||
class Rectangle : public BasicShape{
|
||||
long int width;
|
||||
long int length;
|
||||
public:
|
||||
Rectangle(long int width, long int length) : width(width), length(length){
|
||||
calcArea();
|
||||
}
|
||||
long int getWidth(){
|
||||
return width;
|
||||
}
|
||||
long int getLength(){
|
||||
return length;
|
||||
}
|
||||
void calcArea() override{
|
||||
setArea(width*length);
|
||||
}
|
||||
};
|
||||
|
||||
int main(){
|
||||
|
||||
BasicShape **shapes = new BasicShape*[2];
|
||||
shapes[0] = new Circle(10, 10, 10);
|
||||
shapes[1] = new Rectangle(30, 50);
|
||||
|
||||
shapes[0]->calcArea();
|
||||
shapes[1]->calcArea();
|
||||
|
||||
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
50
.config/Code/User/History/17d3e36f/UbLy.cpp
Normal file
50
.config/Code/User/History/17d3e36f/UbLy.cpp
Normal file
|
@ -0,0 +1,50 @@
|
|||
/*
|
||||
Rafay Ahmad
|
||||
23I-2526
|
||||
*/
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
|
||||
class BasicShape{
|
||||
double area;
|
||||
public:
|
||||
double getArea(){
|
||||
return area;
|
||||
}
|
||||
virtual void calcArea() = 0;
|
||||
void setArea(double area){
|
||||
this->area = area;
|
||||
}
|
||||
};
|
||||
|
||||
class Circle : public BasicShape{
|
||||
long int centerX;
|
||||
long int centerY;
|
||||
double radius;
|
||||
public:
|
||||
Circle(long int centerX, long int centerY, double radius) : centerX(centerX), centerY(centerY){
|
||||
calcArea();
|
||||
}
|
||||
void calcArea() override{
|
||||
setArea(3.14159*radius*radius);
|
||||
}
|
||||
};
|
||||
|
||||
class Rectangle : public BasicShape{
|
||||
long int width;
|
||||
long int length;
|
||||
public:
|
||||
Rectangle(long int width, long int length) : width(width), length(length){
|
||||
calcArea();
|
||||
}
|
||||
void calcArea() override{
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
int main(){
|
||||
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
30
.config/Code/User/History/17d3e36f/XJP7.cpp
Normal file
30
.config/Code/User/History/17d3e36f/XJP7.cpp
Normal file
|
@ -0,0 +1,30 @@
|
|||
/*
|
||||
Rafay Ahmad
|
||||
23I-2526
|
||||
*/
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
|
||||
class BasicShape{
|
||||
double area;
|
||||
public:
|
||||
double getArea(){
|
||||
return area;
|
||||
}
|
||||
virtual void calcArea() = 0;
|
||||
};
|
||||
|
||||
class Circle : public BasicShape{
|
||||
long int centerX;
|
||||
long int centerY;
|
||||
double radius;
|
||||
public:
|
||||
|
||||
};
|
||||
|
||||
int main(){
|
||||
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
43
.config/Code/User/History/17d3e36f/amR0.cpp
Normal file
43
.config/Code/User/History/17d3e36f/amR0.cpp
Normal file
|
@ -0,0 +1,43 @@
|
|||
/*
|
||||
Rafay Ahmad
|
||||
23I-2526
|
||||
*/
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
|
||||
class BasicShape{
|
||||
double area;
|
||||
public:
|
||||
double getArea(){
|
||||
return area;
|
||||
}
|
||||
virtual void calcArea() = 0;
|
||||
void setArea(double area){
|
||||
this->area = area;
|
||||
}
|
||||
};
|
||||
|
||||
class Circle : public BasicShape{
|
||||
long int centerX;
|
||||
long int centerY;
|
||||
double radius;
|
||||
public:
|
||||
Circle(long int centerX, long int centerY, double radius) : centerX(centerX), centerY(centerY){
|
||||
calcArea();
|
||||
}
|
||||
void calcArea() override{
|
||||
setArea(3.14159*radius*radius);
|
||||
}
|
||||
};
|
||||
|
||||
class Rectangle : public BasicShape{
|
||||
long int width;
|
||||
long int length;
|
||||
};
|
||||
|
||||
int main(){
|
||||
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
62
.config/Code/User/History/17d3e36f/d5Dk.cpp
Normal file
62
.config/Code/User/History/17d3e36f/d5Dk.cpp
Normal file
|
@ -0,0 +1,62 @@
|
|||
/*
|
||||
Rafay Ahmad
|
||||
23I-2526
|
||||
*/
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
|
||||
class BasicShape{
|
||||
double area;
|
||||
public:
|
||||
double getArea(){
|
||||
return area;
|
||||
}
|
||||
virtual void calcArea() = 0;
|
||||
void setArea(double area){
|
||||
this->area = area;
|
||||
}
|
||||
};
|
||||
|
||||
class Circle : public BasicShape{
|
||||
long int centerX;
|
||||
long int centerY;
|
||||
double radius;
|
||||
public:
|
||||
Circle(long int centerX, long int centerY, double radius) : centerX(centerX), centerY(centerY){
|
||||
calcArea();
|
||||
}
|
||||
void calcArea() override{
|
||||
setArea(3.14159*radius*radius);
|
||||
}
|
||||
};
|
||||
|
||||
class Rectangle : public BasicShape{
|
||||
long int width;
|
||||
long int length;
|
||||
public:
|
||||
Rectangle(long int width, long int length) : width(width), length(length){
|
||||
calcArea();
|
||||
}
|
||||
long int getWidth(){
|
||||
return width;
|
||||
}
|
||||
long int getLength(){
|
||||
return length;
|
||||
}
|
||||
void calcArea() override{
|
||||
setArea(width*length);
|
||||
}
|
||||
};
|
||||
|
||||
int main(){
|
||||
|
||||
BasicShape **shapes = new BasicShape*[2];
|
||||
shapes[0] = new Circle(0, 0, 10);
|
||||
shapes[1] = new Rectangle(30, 50);
|
||||
|
||||
cout<<"Circle: "<<shapes[0]->getArea()<<endl;
|
||||
cout<<"Rectangle: "<<shapes[1]->getArea()<<endl;
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
1
.config/Code/User/History/17d3e36f/entries.json
Normal file
1
.config/Code/User/History/17d3e36f/entries.json
Normal file
|
@ -0,0 +1 @@
|
|||
{"version":1,"resource":"file:///home/rafayahmad/Stuff/OOP/lab15/lab15.cpp","entries":[{"id":"CGB4.cpp","timestamp":1714968342279},{"id":"RSST.cpp","timestamp":1714968383646},{"id":"2D4M.cpp","timestamp":1714968427129},{"id":"B4Fg.cpp","timestamp":1714968496582},{"id":"Du76.cpp","timestamp":1714968513955},{"id":"qMEu.cpp","timestamp":1714968532072},{"id":"GerB.cpp","timestamp":1714968832822},{"id":"IBRX.cpp","timestamp":1714968897645},{"id":"XJP7.cpp","timestamp":1714968932949},{"id":"7E4T.cpp","timestamp":1714968985145},{"id":"hDuY.cpp","timestamp":1714969010551},{"id":"lmTf.cpp","timestamp":1714969023684},{"id":"m2um.cpp","timestamp":1714969038427},{"id":"JH2O.cpp","timestamp":1714969078217},{"id":"R7mB.cpp","timestamp":1714969109920},{"id":"amR0.cpp","timestamp":1714969163993},{"id":"KMHn.cpp","timestamp":1714969174083},{"id":"w1Cq.cpp","timestamp":1714969206006},{"id":"UbLy.cpp","timestamp":1714969227832},{"id":"v5TW.cpp","timestamp":1714969266492},{"id":"D8Wj.cpp","timestamp":1714969277682},{"id":"CwBh.cpp","timestamp":1714969313838},{"id":"gc5B.cpp","timestamp":1714969342955},{"id":"GsiF.cpp","timestamp":1714969391538},{"id":"SS3q.cpp","timestamp":1714969422895},{"id":"0pbt.cpp","timestamp":1714969483534},{"id":"nd5x.cpp","timestamp":1714969524731},{"id":"y8Hu.cpp","timestamp":1714969580587},{"id":"d5Dk.cpp","timestamp":1714969703617},{"id":"2ElL.cpp","timestamp":1714971155366},{"id":"Ltcg.cpp","timestamp":1714971355086}]}
|
56
.config/Code/User/History/17d3e36f/gc5B.cpp
Normal file
56
.config/Code/User/History/17d3e36f/gc5B.cpp
Normal file
|
@ -0,0 +1,56 @@
|
|||
/*
|
||||
Rafay Ahmad
|
||||
23I-2526
|
||||
*/
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
|
||||
class BasicShape{
|
||||
double area;
|
||||
public:
|
||||
double getArea(){
|
||||
return area;
|
||||
}
|
||||
virtual void calcArea() = 0;
|
||||
void setArea(double area){
|
||||
this->area = area;
|
||||
}
|
||||
};
|
||||
|
||||
class Circle : public BasicShape{
|
||||
long int centerX;
|
||||
long int centerY;
|
||||
double radius;
|
||||
public:
|
||||
Circle(long int centerX, long int centerY, double radius) : centerX(centerX), centerY(centerY){
|
||||
calcArea();
|
||||
}
|
||||
void calcArea() override{
|
||||
setArea(3.14159*radius*radius);
|
||||
}
|
||||
};
|
||||
|
||||
class Rectangle : public BasicShape{
|
||||
long int width;
|
||||
long int length;
|
||||
public:
|
||||
Rectangle(long int width, long int length) : width(width), length(length){
|
||||
calcArea();
|
||||
}
|
||||
long int getWidth(){
|
||||
return width;
|
||||
}
|
||||
long int getLength(){
|
||||
return length;
|
||||
}
|
||||
void calcArea() override{
|
||||
setArea(width*length);
|
||||
}
|
||||
};
|
||||
|
||||
int main(){
|
||||
|
||||
BasicShape **shapes = new BasicShape*[2];
|
||||
|
||||
return 0;
|
||||
}
|
35
.config/Code/User/History/17d3e36f/hDuY.cpp
Normal file
35
.config/Code/User/History/17d3e36f/hDuY.cpp
Normal file
|
@ -0,0 +1,35 @@
|
|||
/*
|
||||
Rafay Ahmad
|
||||
23I-2526
|
||||
*/
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
|
||||
class BasicShape{
|
||||
double area;
|
||||
public:
|
||||
double getArea(){
|
||||
return area;
|
||||
}
|
||||
virtual void calcArea() = 0;
|
||||
};
|
||||
|
||||
class Circle : public BasicShape{
|
||||
long int centerX;
|
||||
long int centerY;
|
||||
double radius;
|
||||
public:
|
||||
Circle(long int centerX, long int centerY, double radius) : centerX(centerX), centerY(centerY){
|
||||
calcArea();
|
||||
}
|
||||
void calcArea() override{
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
int main(){
|
||||
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
35
.config/Code/User/History/17d3e36f/lmTf.cpp
Normal file
35
.config/Code/User/History/17d3e36f/lmTf.cpp
Normal file
|
@ -0,0 +1,35 @@
|
|||
/*
|
||||
Rafay Ahmad
|
||||
23I-2526
|
||||
*/
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
|
||||
class BasicShape{
|
||||
double area;
|
||||
public:
|
||||
double getArea(){
|
||||
return area;
|
||||
}
|
||||
virtual void calcArea() = 0;
|
||||
};
|
||||
|
||||
class Circle : public BasicShape{
|
||||
long int centerX;
|
||||
long int centerY;
|
||||
double radius;
|
||||
public:
|
||||
Circle(long int centerX, long int centerY, double radius) : centerX(centerX), centerY(centerY){
|
||||
calcArea();
|
||||
}
|
||||
void calcArea() override{
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
int main(){
|
||||
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
38
.config/Code/User/History/17d3e36f/m2um.cpp
Normal file
38
.config/Code/User/History/17d3e36f/m2um.cpp
Normal file
|
@ -0,0 +1,38 @@
|
|||
/*
|
||||
Rafay Ahmad
|
||||
23I-2526
|
||||
*/
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
|
||||
class BasicShape{
|
||||
double area;
|
||||
public:
|
||||
double getArea(){
|
||||
return area;
|
||||
}
|
||||
virtual void calcArea() = 0;
|
||||
void setArea(double area){
|
||||
this->area = area;
|
||||
}
|
||||
};
|
||||
|
||||
class Circle : public BasicShape{
|
||||
long int centerX;
|
||||
long int centerY;
|
||||
double radius;
|
||||
public:
|
||||
Circle(long int centerX, long int centerY, double radius) : centerX(centerX), centerY(centerY){
|
||||
calcArea();
|
||||
}
|
||||
void calcArea() override{
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
int main(){
|
||||
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
65
.config/Code/User/History/17d3e36f/nd5x.cpp
Normal file
65
.config/Code/User/History/17d3e36f/nd5x.cpp
Normal file
|
@ -0,0 +1,65 @@
|
|||
/*
|
||||
Rafay Ahmad
|
||||
23I-2526
|
||||
*/
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
|
||||
class BasicShape{
|
||||
double area;
|
||||
public:
|
||||
double getArea(){
|
||||
return area;
|
||||
}
|
||||
virtual void calcArea() = 0;
|
||||
void setArea(double area){
|
||||
this->area = area;
|
||||
}
|
||||
};
|
||||
|
||||
class Circle : public BasicShape{
|
||||
long int centerX;
|
||||
long int centerY;
|
||||
double radius;
|
||||
public:
|
||||
Circle(long int centerX, long int centerY, double radius) : centerX(centerX), centerY(centerY){
|
||||
calcArea();
|
||||
}
|
||||
void calcArea() override{
|
||||
setArea(3.14159*radius*radius);
|
||||
}
|
||||
};
|
||||
|
||||
class Rectangle : public BasicShape{
|
||||
long int width;
|
||||
long int length;
|
||||
public:
|
||||
Rectangle(long int width, long int length) : width(width), length(length){
|
||||
calcArea();
|
||||
}
|
||||
long int getWidth(){
|
||||
return width;
|
||||
}
|
||||
long int getLength(){
|
||||
return length;
|
||||
}
|
||||
void calcArea() override{
|
||||
setArea(width*length);
|
||||
}
|
||||
};
|
||||
|
||||
int main(){
|
||||
|
||||
BasicShape **shapes = new BasicShape*[2];
|
||||
shapes[0] = new Circle(10, 10, 10);
|
||||
shapes[1] = new Rectangle(30, 50);
|
||||
|
||||
shapes[0]->calcArea();
|
||||
shapes[1]->calcArea();
|
||||
|
||||
cout<<"Circle: "<<shapes[0]->getArea()<<endl;
|
||||
cout<<"Rectangle: "<<shapes[1]->getArea()<<endl;
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
26
.config/Code/User/History/17d3e36f/qMEu.cpp
Normal file
26
.config/Code/User/History/17d3e36f/qMEu.cpp
Normal file
|
@ -0,0 +1,26 @@
|
|||
/*
|
||||
Rafay Ahmad
|
||||
23I-2526
|
||||
*/
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
|
||||
class BasicShape{
|
||||
double area;
|
||||
public:
|
||||
double getArea(){
|
||||
return area;
|
||||
}
|
||||
virtual void calcArea() = 0;
|
||||
};
|
||||
|
||||
class Circle : public BasicShape{
|
||||
|
||||
};
|
||||
|
||||
int main(){
|
||||
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
56
.config/Code/User/History/17d3e36f/v5TW.cpp
Normal file
56
.config/Code/User/History/17d3e36f/v5TW.cpp
Normal file
|
@ -0,0 +1,56 @@
|
|||
/*
|
||||
Rafay Ahmad
|
||||
23I-2526
|
||||
*/
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
|
||||
class BasicShape{
|
||||
double area;
|
||||
public:
|
||||
double getArea(){
|
||||
return area;
|
||||
}
|
||||
virtual void calcArea() = 0;
|
||||
void setArea(double area){
|
||||
this->area = area;
|
||||
}
|
||||
};
|
||||
|
||||
class Circle : public BasicShape{
|
||||
long int centerX;
|
||||
long int centerY;
|
||||
double radius;
|
||||
public:
|
||||
Circle(long int centerX, long int centerY, double radius) : centerX(centerX), centerY(centerY){
|
||||
calcArea();
|
||||
}
|
||||
void calcArea() override{
|
||||
setArea(3.14159*radius*radius);
|
||||
}
|
||||
};
|
||||
|
||||
class Rectangle : public BasicShape{
|
||||
long int width;
|
||||
long int length;
|
||||
public:
|
||||
Rectangle(long int width, long int length) : width(width), length(length){
|
||||
calcArea();
|
||||
}
|
||||
long int getWidth(){
|
||||
return width;
|
||||
}
|
||||
long int getLength(){
|
||||
return length;
|
||||
}
|
||||
void calcArea() override{
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
int main(){
|
||||
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
47
.config/Code/User/History/17d3e36f/w1Cq.cpp
Normal file
47
.config/Code/User/History/17d3e36f/w1Cq.cpp
Normal file
|
@ -0,0 +1,47 @@
|
|||
/*
|
||||
Rafay Ahmad
|
||||
23I-2526
|
||||
*/
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
|
||||
class BasicShape{
|
||||
double area;
|
||||
public:
|
||||
double getArea(){
|
||||
return area;
|
||||
}
|
||||
virtual void calcArea() = 0;
|
||||
void setArea(double area){
|
||||
this->area = area;
|
||||
}
|
||||
};
|
||||
|
||||
class Circle : public BasicShape{
|
||||
long int centerX;
|
||||
long int centerY;
|
||||
double radius;
|
||||
public:
|
||||
Circle(long int centerX, long int centerY, double radius) : centerX(centerX), centerY(centerY){
|
||||
calcArea();
|
||||
}
|
||||
void calcArea() override{
|
||||
setArea(3.14159*radius*radius);
|
||||
}
|
||||
};
|
||||
|
||||
class Rectangle : public BasicShape{
|
||||
long int width;
|
||||
long int length;
|
||||
public:
|
||||
Rectangle(long int width, long int length) : width(width), length(length){
|
||||
calcArea();
|
||||
}
|
||||
};
|
||||
|
||||
int main(){
|
||||
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
62
.config/Code/User/History/17d3e36f/y8Hu.cpp
Normal file
62
.config/Code/User/History/17d3e36f/y8Hu.cpp
Normal file
|
@ -0,0 +1,62 @@
|
|||
/*
|
||||
Rafay Ahmad
|
||||
23I-2526
|
||||
*/
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
|
||||
class BasicShape{
|
||||
double area;
|
||||
public:
|
||||
double getArea(){
|
||||
return area;
|
||||
}
|
||||
virtual void calcArea() = 0;
|
||||
void setArea(double area){
|
||||
this->area = area;
|
||||
}
|
||||
};
|
||||
|
||||
class Circle : public BasicShape{
|
||||
long int centerX;
|
||||
long int centerY;
|
||||
double radius;
|
||||
public:
|
||||
Circle(long int centerX, long int centerY, double radius) : centerX(centerX), centerY(centerY){
|
||||
calcArea();
|
||||
}
|
||||
void calcArea() override{
|
||||
setArea(3.14159*radius*radius);
|
||||
}
|
||||
};
|
||||
|
||||
class Rectangle : public BasicShape{
|
||||
long int width;
|
||||
long int length;
|
||||
public:
|
||||
Rectangle(long int width, long int length) : width(width), length(length){
|
||||
calcArea();
|
||||
}
|
||||
long int getWidth(){
|
||||
return width;
|
||||
}
|
||||
long int getLength(){
|
||||
return length;
|
||||
}
|
||||
void calcArea() override{
|
||||
setArea(width*length);
|
||||
}
|
||||
};
|
||||
|
||||
int main(){
|
||||
|
||||
BasicShape **shapes = new BasicShape*[2];
|
||||
shapes[0] = new Circle(10, 10, 10);
|
||||
shapes[1] = new Rectangle(30, 50);
|
||||
|
||||
cout<<"Circle: "<<shapes[0]->getArea()<<endl;
|
||||
cout<<"Rectangle: "<<shapes[1]->getArea()<<endl;
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue