Question: SC234 Advanced CH Lab 3: Inheritance and Composition 2. Define the derived classes PremiumCard and Business Card from class CreditCard with the following annual interest

 SC234 Advanced CH Lab 3: Inheritance and Composition 2. Define the

derived classes PremiumCard and Business Card from class CreditCard with the following

SC234 Advanced CH Lab 3: Inheritance and Composition 2. Define the derived classes PremiumCard and Business Card from class CreditCard with the following annual interest rates and credit card charge limits: const double DEFAULT_INTEREST_RATE_PREMIUM = 0.12; const double DEFAULT_INTEREST_RATE_BUSINESS = 0.10; const double PREMIUM_CHARGE_LIMIT = 2000.00; const double BUSINESS CHARGE_LIMIT 5000.00; I If the chargeBalance of the PremiumCard or Business Card object exceeds the credit card limit then the following fees will be charged: const double DEFAULT_FEE_PREMIUM = 150.0; //PremiumCard Fee const double DEFAULT_FEE_BUSINESS = 50.0; //BusinessCard Fee A. Use the following driver to validate your program: #include #include #include "PremiumCard.h" #include "BusinessCard.h" using namespace std; int main() { BusinessCard businessCard1("Happy Reading Bookstore LLC); BusinessCard businessCard2("Triangle Florist LLC"); PremiumCard premiumCard1("Charlie Brown); PremiumCard premiumCard2 ("Lucy Van Pelt"); businessCardi.charge(6000); businessCard2.charge (2500); premiumCardi.charge(2100); premiumCard2.charge (250); businessCardi.calculateMonthlyInterest, business Card2.calculateMonthlyInterest premiumCardi.calculateMonthlyInterest(); premiumCard2.calculateMonthlyInterest(); BusinessCard businessCard1("Happy Reading Bookstore LLC"); Business Card businessCard2("Triangle Florist LLC"); PremiumCard premiumCardi ("Charlie Brown); PremiumCard premiumCard2("Lucy Van Pelt"); businessCardi.charge(6000); businessCard2.charge (2500); premiumCardi.charge (2100); premiumCard2.charge (250); businessCardi.calculateMonthlyInterest(); businessCard2.calculateMonthlyInterest(); premiumCardi.calculateMonthlyInterest(); premiumCard2.calculateMonthlyInterest(); #include #include "PremiumCard.h" #include "BusinessCard.h" using namespace std; int main() { BusinessCard businessCard1("Happy Reading Bookstore LLC); BusinessCard businessCard2("Triangle Florist LLC"); PremiumCard premiumCard1("Charlie Brown); PremiumCard premiumCard2 ("Lucy Van Pelt"); businessCardi.charge(6000); businessCard2.charge (2500); premiumCardi.charge(2100); premiumCard2.charge (250); businessCardi.calculateMonthlyInterest, business Card2.calculateMonthlyInterest premiumCardi.calculateMonthlyInterest(); premiumCard2.calculateMonthlyInterest(); BusinessCard businessCard1("Happy Reading Bookstore LLC"); Business Card businessCard2("Triangle Florist LLC"); PremiumCard premiumCardi ("Charlie Brown); PremiumCard premiumCard2("Lucy Van Pelt"); businessCardi.charge(6000); businessCard2.charge (2500); premiumCardi.charge (2100); premiumCard2.charge (250); businessCardi.calculateMonthlyInterest(); businessCard2.calculateMonthlyInterest(); premiumCardi.calculateMonthlyInterest(); premiumCard2.calculateMonthlyInterest();

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!