Here is the skeleton of the program that you MUST use#include io.docx

This preview shows page 1 - 4 out of 10 pages.

Background image
Here is the skeleton of the program that you MUST use:#include <iostream>#include <cmath>using namespace std;class Point{private:double px;��double py;��public:void setX(const double x);��void setY(const double y);��double getX() const;��double getY() const;��};class Triangle{private:Point blPoint;��double length, height;��public:// member functions��void setBottomLeftX(const double x);��void setBottomLeftY(const double y);��void setLength(const double inLength);��void setHeight(const double inHeight);��Point getBottomLeft() const;��
Point getBottomRight() const;��Point getTopLeft() const;��double getLength() const;��double getHeight() const;����double perimeter() const;��double hypotenuse() const;��void scaleLength(const double sx);��void scaleHeight(const double sy);��void write_out(const string fname) const;��};// FUNCTION PROTOTYPES GO HERE:string read_filename(const string prompt);void read_triangle(Triangle & tri);int main(){// Define local variables��string fname; // Output stream to file�����Triangle tri;��double sx, sy;����// Prompt the user for the name of the first file to write��fname = read_filename("Enter first file name: ");��cout << endl;����//Prompt the user for triangle information and fill Class��Triangle object, tri,//with this information��

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture