{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

CreditCard(2) - #include"CreditCard(2.h#include...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
#include "CreditCard(2).h" // provides CreditCard #include <iostream> #include <iomanip> // needed for formatting output using namespace std; // All of the required methods are stubbed out below. You should // complete the implementations. /** Construct a new credit card. * * @param no the credit card number (expressed as a string) * @param nm the card-holder's name * @param lim maximum limit for card (expressed in dollars) * @param rt A fraction which represents the monthly interest rate * @param bal Initial balance for this account (expressed in cents) */ CreditCard::CreditCard(string no, string nm, int lim, double rt, int bal) {number = no; name = nm; limit= lim; rate= rt; balance= bal; minPay=0; totalPayment=0; totalPrice=0; } ////////////////////////////////////// // accessors ////////////////////////////////////// /** Return the card number. * @return string representing the card number */ string CreditCard::getNumber() const { return number;} /** Return the name of the card holder. * @return person's name as a string */ string CreditCard::getName() const { return name;} /** Return the credit limit. * @return limit (expressed in dollars) */ int CreditCard::getLimit() const { return limit; } /** Return the interest rate.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}