Question: CSC234 Advanced C++ Lab 4: Pointers, Classes, Virtual Functions, and Abstract Classes Grading: Be sure to follow the Coding Standard Guidelines. You must properly indent


CSC234 Advanced C++ Lab 4: Pointers, Classes, Virtual Functions, and Abstract Classes Grading: Be sure to follow the Coding Standard Guidelines. You must properly indent and comment your code. This program is worth 100 points. Grading rubric: Indent code and insert comments to document your program. (10%) Program must be implemented and run as instructed. [80%] Source file and executable are placed in a folder. The folder is zipped up into a file. The zipped file is submitted to Blackboard. [10%] 1. There are many types of financial investments available, such as real estate, bank savings, stock and commodity for creating wealth. Each of these types have various attributes which may restrict liquidation. For example, you may have a savings account that requires a minimum balance or a real estate investment which may require you to sell a property if sufficient cash reserve is not available. In this lab, you should use abstract class and pure virtual functions to design classes to manipulate various types of investments. For simplicity, assume that there are only four derived investment types: savings, real estate, stock and commodity. Investment: This is the base abstract class with a unique account number, total investment value, an annual interest rate and the pure virtual functions: liquidate(amount withdrawn), createMonthlyStatement and print() member functions. [20 pts) Savings Account: Suppose that this investment type has a service charge if it falls below a minimum balance. [20 pts) RealEstate: Suppose that this investment type has N= number of properties and cash reserve percentage. Each property value is determined as follows: [20 pts) Property value = (total investment value - cash reserve)/(N = number of properties) rtain of shares and Stoc Suppose his investment type has the value of each share is determined as follows: Share value = (total investment value) / (number of shares) 2 CSC234 Advanced C++ Lab 4: Pointers, Classes, Virtual Functions, and Abstract Classes Commodity: Suppose that this investment type has the commodity unit value determined as follows: (20 pts] Unit value = (total investment value) / (number of units), A. Assume i. Investment: Assume default investment value = $5000.00 ii. RealEstate: Assume number of properties = 10 (of equal value), annual appreciation rate = 15% and percent of reserves = 10% of investment balance. iii. Stock: Assume number of shares is 100 and annual appreciation rate = 10% iv. SavingsAccount: Assume Service Charge = 2% if customer balance falls below minimum balance = $1000 and annual interest rate = 1% v. Commodity: Assume number of units is 100 and annual appreciation rate = 1%. enum COMMODITY_TYPE = { GOLD, SILVER,SOLAR,LIVESTOCK); vi. print member function displays a summary of ALL the attributes of the object. Assume annual appreciation rate is the same as annual interest rate. . All data members MUST be private. . All common attributes must be declared in the Investment base class. B. Use the following driver to validate your program: #include
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
