Answered step by step
Verified Expert Solution
Link Copied!
Question
1 Approved Answer

Assigned 9/15/2017-Due 9/18/2017 at NOON Introduction: In this in class assignment, you will program a basic class for a rectangle. Here is what your class

image text in transcribed
image text in transcribed
Assigned 9/15/2017-Due 9/18/2017 at NOON Introduction: In this in class assignment, you will program a basic class for a rectangle. Here is what your class should include Private members length and width. Use the data type of double. . Default Constructor Overloaded constructor to accept length and width as arguments Public methods for . o Setting the length o Setting the width o Getting the length o Getting the width o Getting the area o Getting the perimeter In order to test your code, write a main function that Creates a first rectangle using the default constructor Sets the length and width of the first rectangle using the methods Displays the length, width, area, and perimeter of the first rectangle Creates a second rectangle using the overloaded constructor Displays the length, width, area, and perimeter of the second rectangle. Displays the sum of the perimeters Displays the difference between the areas . This submission MUST be done with 3 different files. Put the class definition in rectangle.h, the implementation of the methods in rectangle.cpp, and the main function in main.cpp. WRITE A MAKEFILE THAT WILL COMPILE THIS. In rectangle.h and rectangle.cpp, use comments to label your methods as either Constructors, Accessors or Mutators. Recommendations: .Get the class and implementations of the methods working in main.cpp. Once when your code is working, then worry about separating them into the different files

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_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

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

Get Started

Students explore these related Databases questions