Question: Need help creating this program. Please follow all the direction and use C++ to code this. name the different files. Problem Definition Create a class

Need help creating this program. Please follow all the direction and use C++ to code this. name the different files.

Need help creating this program. Please follow all the direction and useC++ to code this. name the different files. Problem Definition Create a

Problem Definition Create a class called Rectangle. This class stores only the Cartesian coordinates of the four coordinates of the rectangle. P2(9,3) P1(3,3) P4(3,0) P3(9,0) Use integer variables to represent the data of the class: the x and y coordinates of the four corners of the rectangle. Provide a constructor that enables an object of this class to be initialized when it is declared. The constructor should contain default corner values in case no initializers are provided Provide member functions that: Calculate the perimeter . Calculate the area Calculate the width (Dimension along the horizontal line) Calculate the length (The larger of the two dimensions) Print the rectangle corners The implementation of the class rectangle is divided in two steps: Part 1: Class Definition Implement the class definition for class Rectangle in a file called Rectangle.h. The class definition should contain only the prototypes of the member functions Rectangle, setCorners, getPerimemter, getArea, getWidth, getLength and printCorners. You can define more member functions if it is necessary. You also need to include the coordinates of the corners as integer data members. Determine if the functions and the data members should be private or public. You can find an example of the class definition for the class Time in the file Time.h - also available in Chapter 9.2 (page 379 of the Deitel book, ninth edition). Part 2.1: Member-function definition

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!