Answered step by step
Verified Expert Solution
Link Copied!

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]

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Modern Database Management

Authors: Jeff Hoffer, Ramesh Venkataraman, Heikki Topi

12th edition

133544613, 978-0133544619

More Books

Students also viewed these Databases questions

Question

Does it have at least one-inch margins?

Answered: 1 week ago

Question

What does the elimination process accomplish?

Answered: 1 week ago

Question

6. What is process reengineering? Why is it relevant to training?

Answered: 1 week ago