Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

CSC234 Advanced C++ Lab 3: Inheritance and Composition 2. Define the derived classes Premium Card and Business Card from class Credit Card with the following

image text in transcribed

image text in transcribed

CSC234 Advanced C++ Lab 3: Inheritance and Composition 2. Define the derived classes Premium Card and Business Card from class Credit Card 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; If the chargeBalance of the Premium Card 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() { Business Card businessCardi ("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); premiumCard1.charge(2100); premiumCard2.charge (250); business Cardi.calculateMonthlyInterest(); businessCard2.calculateMonthlyInterest(); premiumCard1.calculateMonthlyInterest(); premiumCard2.calculateMonthlyInterest(); #include #include "PremiumCard.h" #include "BusinessCard.h" using namespace std; int main() { BusinessCard businessCardi ("Happy Reading Bookstore LLC"); Business Card businessCard2(Triangle Florist LLC"); PremiumCard premiumCardi ("Charlie Brown); PremiumCard premiumCard2("Lucy Van Pelt"); businessCardi.charge (6000); business Card2.charge (2500); premiumCard1.charge (2100); premiumCard2.charge (250); businessCard1.calculateMonthlyInterest(); businessCard2.calculateMonthlyInterest(); premiumCard1.calculateMonthlyInterest(); premiumCard2.calculateMonthlyInterest(); **********" #include #include "PremiumCard.h" #include "BusinessCard.h" using namespace std; int main() { Business Card businessCardi ("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); premiumCard1.charge(2100); premiumCard2.charge (250); business Cardi.calculateMonthlyInterest(); businessCard2.calculateMonthlyInterest(); premiumCard1.calculateMonthlyInterest(); premiumCard2.calculateMonthlyInterest(); #include #include "PremiumCard.h" #include "BusinessCard.h" using namespace std; int main() { BusinessCard businessCardi ("Happy Reading Bookstore LLC"); Business Card businessCard2(Triangle Florist LLC"); PremiumCard premiumCardi ("Charlie Brown); PremiumCard premiumCard2("Lucy Van Pelt"); businessCardi.charge (6000); business Card2.charge (2500); premiumCard1.charge (2100); premiumCard2.charge (250); businessCard1.calculateMonthlyInterest(); businessCard2.calculateMonthlyInterest(); premiumCard1.calculateMonthlyInterest(); premiumCard2.calculateMonthlyInterest(); **********"

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

From Zero To Data Hero With Chatgpt

Authors: Andrew Wu

1st Edition

B0CQRJPXD9, 979-8989523009

More Books

Students also viewed these Databases questions