0
Wap to find distance between two points when the distance is represented as feet:inches system.it should use the concept of oops
code plz
2 Respostas
0
class Distance{
public:
int pointAx;
int pointAy;
int pointBx;
int pointBy;
void setPointA(int x, int y) {
pointAx = x;;
pointAy = y;
}
void setPointB(int x, int y) {
pointBx = x;;
pointBy = y;
}
double getDistance(){
// calculate distance and return a double value
}
};
0
Would also create a struct for points. Much more readability and thus, professionalism.