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. * @return
Background image of page 1

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

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

This note was uploaded on 05/03/2011 for the course CSCI 180 taught by Professor Goldwasser,m during the Fall '08 term at Saint Louis.

Page1 / 4

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

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online