Question: this is a visual basic program. Lab 9 1. Create a class called Square using separate h and cpp fles. Squares look something like this

 this is a visual basic program. Lab 9 1. Create a

this is a visual basic program.

Lab 9 1. Create a class called Square using separate h and cpp fles. Squares look something like this when drawn: 2. Add a constructor that takes the size as a parameter. Store the size in a class variable. 3. Add a Draw method that draws the square. The draw method does not take any parameters. 4. Create a main0 that instantiates a square of size 5 and draws it. 5. Also instantiate a square of size 8 and draw it Optional Challenge: Create a class called Triangle that draws triangles of a specified height. Here is a triangle of height 4: Checklist 1. Project/solution named correctly 2. Correct commenits at top 3. Consistent indentation (Use Edit/Advanced/Format Document) 4. Good variable names 5. Overall neat organization 6. Comments in code explain what's being done 7. Correct division of code into .h and cpp files 8. use of #pragma once in.h files (or. *ifndef, 9. Ninclude 'stdafx.h in cpp files (or, suppress pch)

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!