Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 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 suppliesStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started