Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Given the Code in (Visual Studio) C++ (2 files their links are posted below) all you have to do is implement the functions as declared

Given the Code in (Visual Studio) C++ (2 files their links are posted below) all you have to do is implement the functions as declared

Question) Implement the functions as declared in the header file Rectangle.h in a new file Rectangle.cpp and submit only this new file. The implementation should include all of the following here (links would be provided scroll down please) Read the question carefully a snapshot of the question is provided.

image text in transcribed

image text in transcribed

Main file link - https://www.dropbox.com/s/7exoapaozabsxq8/HW3Main.txt?dl=0

Rectangle file link - https://www.dropbox.com/s/1diu46k0cz8j1mh/RECTANGLE_H.txt?dl=0

Once you are done paste your code here with a screenshot of the output as the answer to this question. Must be in C++

Homework 3 Classes: Constructors, Accessors and Mutators In this homework, you will use a class to draw simple rectangles on the screen. You will use constructors to set the dimensions and print character for the rectangles Problem: In your first programming job, you are asked to construct a class that represents a rectangle. It will contain a width and height as well as a character to be used in drawing the rectangle. You are given a header file that contains the declarations for the rectangle class and a file that contains the main function you will need to test your implementation Requirements You are required to implement the functions as declared in the header file "Rectangle.h" in a new file "Rectangle.cpp" and submit only this new file. The implementation should include Rectangle() A default constructor for the rectangle class that sets the width and height of the rectangle to zero(0) and the print character to a blank space, Rectangle (int width. int height, char printCharacter) A constructor for the rectangle class that sets the width, height, and print character for the rectangle. The constructor should check the width and height and change negative values to zero (0) Rectangle() A destructor for the class, that doesn't do anything at this point, but is included for completeness. void Print 0 A method that prints the rectangle to the screen using the print character in the class

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

Beyond Big Data Using Social MDM To Drive Deep Customer Insight

Authors: Martin Oberhofer, Eberhard Hechler

1st Edition

0133509796, 9780133509793

More Books

Students also viewed these Databases questions

Question

=+c. Now rewrite the sales message. The daily

Answered: 1 week ago