Add a new Shape base class to the area calculation program Solution

Assignment Overview

For this assignment, you will write a new version of the area calculation program from Unit 3 that makes use of inheritance in C++. Add a new Shape base class to the area calculation program that includes data members common to all shapes (such as a shape ID, a shape type, and a unit of measure). You will use the Code::Blocks software to write this application. Access this software via the Toolwire virtual desktop activity link in this unit.

Assignment Instructions

Part 1: Write the Application

Write a new version of the area calculation program from Unit 3 that makes use of inheritance in C++.

· Add a new Shape base class to the area calculation program that includes data members common to all shapes (such as a shape ID, a shape type, and a unit of measure).

· The Shape base class should also include a virtual getArea() member function.

· Revise the Circle and Square classes so that they inherit from the Shape base class.

· Add a third shape to the program that also inherits from the Shape class.

· The finished program should ask the user to enter the relevant information for each shape and then print the area and other information for each shape.

You will use the Code::Blocks software to write this application. Access this software via the Toolwire virtual desktop activity link in this unit. Be sure to organize the code correctly into header (.h) and implementation (.cpp) files. Your code should include meaningful comments and be correctly formatted.

Part 2: Describe the Application

Write a 3–5-page paper in which you complete the following:

· Define and document the requirements for the calcMortgage application.

· Describe the stakeholders needed to help further define the application.

· Describe a collaboration plan for working with stakeholders.

· Explain your object model and inheritance.

· Explain how your application works and any issues you encountered with the application.

· Include a screen shot of your application, using the Print Screen function, to show that your application works.

Submit all source code files and the Word document with the paper.

Submission Requirements

Refer to the Inheritance and Dynamic Memory Assignment Scoring Guide to ensure that you meet the grading criteria for this assignment.

Your completed assignment should include the following:

· Write a program that applies object-oriented programming constructs.

· Define the requirements for an application.

· Describe the stakeholders needed to further define an application.

· Describe the collaboration plan for working with stakeholders.

· Analyze the behavior of object-oriented programming constructs.

· Explain how an application works.

· Communicate effectively in a business environment.
Powered by