Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please show full code in C++ . thank you (1 point) Create a base class named Point. consisting of x and y data members representing
Please show full code in C++ . thank you
(1 point) Create a base class named Point. consisting of x and y data members representing point coordinates Also create a class named Rectangle with two members of type Point (1 point). These members represent opposite vertices making up the rectangle, with sides parallel to the x and y axis. The class Rectangle shall have member functions to 1. (1 point) calculate and return the widt length of the side parallel to the x axis 2. (1 point) calculate and return the height as the length of as the the side paraliel to the y axis 3. (1 point) calculate and return the area of the rectangle. 4. (1 point) calculate and return the perimeter of the rectangle. The class Rectangle shall also have appropriate mutator (1 point) and accessor (1 point) functions as well as appropriate constructors (i.e. default constructor (1 point), constructor for one set of coordinates (1 point), two sets(1 point), one (1 point) and two Point (1 point) parameters) Use these classes in a test program that exercises every constructor and function (5 points). Provide a screenshot (1 point) of the results of thl test run, do not prompt the user for values, use hardcoded values instead Also provide the source file (1 point) with a comment with your name, course code and date, for example: ! Miguel Long MAC102 August 3, 2017 Attach File Browse My Computer Browse Content CollectionStep 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