Hi, I need help for this C++ programming problem. I know this can be.docx

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

Background image
Hi, I need help for this C++ programming problem. I know this can be very long for you to read so I appreciate your time and work. However, please show the work clearly and please check your outputs first before you post. I will give you the 2sample solutions so that you can check your codes with them. I really need to understand how the codes work, so it would be the best if you can comment on important steps (for example, steps with loops and functions). Last but not least, please go through all the directions carefully. Here is the problem:Write a program that will represent an axis-aligned right triangle in the x-y plane as a Class. A right triangle has a right angle (90-degree angle) and two sides adjacent to the right angle, called legs. See for a complete definition. In addition, an axis-aligned right triangle has one leg parallel with the x-axis and the other leg parallel with they-axis. The location of the triangle is the vertex that connectsthe two legs, called the bottom left vertex. This vertex is located at the right angle and represented with the Class Point. The length of the triangle is the length of the leg parallel with the x-axis. The height of the triangle is the length of the leg parallel with the y-axis.Please use the template of this coding problem for your own help. It is easier for you to put in your codes given the template.#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);��

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture