Question: Need help to create the following program, (Language is C++) Create a creditCardType class with the following private data members. card number (i.e. 1234 5678
Need help to create the following program, (Language is C++)


Create a creditCardType class with the following private data members. card number (i.e. "1234 5678 1234 5678") name on card (i.e. "Professor Rich Pockets") expiration (i.e. "12/22") public static functions getCount), returns count getCreditLimit), returns credit limit getBalance(), returns balance private static variable count (i.e. 5 would mean 5 credits created) credit limit balance Create the appropriate amount of constructors, getters, and setters. Constructors . default one that takes all 3 data members Setters . setter that takes all 3 data members . setter for card # . setter for name on card setter expiration date Getters getter that returns all 3 data members . getter that returns card # getter that returns name on card getter that returns expiration date Print0, print all data members, excluding static variables Equals fn: Purchase fn:(float amount). Must check to ensure that purchase does not cause balance to exceed credit limit. Create 3 credit cards that are tied to the same account. Every time you create a card, increment the count by one (in the constructor(s). After each card creation, print out count. Set credit limit to $10000.00 (inside creditCardType.cpp) In your driver: call static fn's getLimit0. getBalance0, getCount0. Then.... Make 3 purchases (i.e. $500, i.e. $5000, i.e $20000) using the 3 different cards After each purchase, call the credit cards' print method and call the static fn getBalance0
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
