Question: please create the following in C++ 5. Any class you create must not have any public data members. Create the following classes: (a) [1 point]

 please create the following in C++ 5. Any class you create

please create the following in C++

5. Any class you create must not have any public data members. Create the following classes: (a) [1 point] A point class to represent x and y coordinates of a point on the coordinate system. You can assume that x and y can only have integer values. Provide a get and a set function for each data member. Create a default constructor to initialize x and y to 0 . Create a parameter constructor to initialize x and y to user supplied integers. Test the point class by creating objects and using its public functions. (b) [1 point] A triangle class to represent a triangle on the integer coordinate system. Figure 1: Triangle ABC Refer to Figure 1 above. The data to represent this triangle consists of values for coordinates of A, B, C, and area and perimeter of the triangle. Create a parameter constructor to initialize the coordinates of points A, B, and C, when the user supplies

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!