Question: In C++ Problem #2 Implement a class Rectangle. Provide a constructor to construct a rectangle with a given width and height, member functions get perimeter
In C++
Problem #2 Implement a class Rectangle. Provide a constructor to construct a rectangle with a given width and height, member functions get perimeter and get area that compute the perimeter and area, and a member function void resize(double factor) that resizes the rectangle by multiplying the width and height by the given factor. Create restrictions in your setters, numbers may be set from 1-100 Separate your files and submit as a compressed folder titled Rectangle PART 2 Learning Objective: Practice creating a driver program and testing our functions For part two create a special driver program to test Problem #2 member functions Separate your files and submit as a compressed folder titled DriverProm Include a menu similar to this in your driver program: Choose an option from the menu below: 1. Press A to test getSample() for Problem 1 2. Press B to test Function() 3. Press C to test FunctionSample() 4. Press D to exit Since we do not want to test our functions all at once, options 2 and 3 are "dummies" and will not contain a function until we are ready to test them. Do not test a function in a program that contains untested functions
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
