CreditCard(2) - #ifndef CREDIT_CARD_H #define CREDIT_CARD_H...

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

View Full Document Right Arrow Icon
#ifndef CREDIT_CARD_H // avoid repeated expansion #define CREDIT_CARD_H #include <string> // provides string #include <iostream> // provides ostream /** Represents a credit card record with a monthly billing cycle */ class CreditCard { // PLEASE DO NOT MAKE ANY CHANGES TO THE PUBLIC PORTION. // ALL OF YOUR MODIFICATIONS SHOULD BE KEPT PRIVATE (see end) public: /** 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(std::string no, std::string nm, int lim, double rt, int bal=0); ////////////////////////////////////// // accessors functions ////////////////////////////////////// /** Return the card number. * @return string representing the card number */ std::string getNumber() const; /** Return the name of the card holder. * @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 / 3

CreditCard(2) - #ifndef CREDIT_CARD_H #define CREDIT_CARD_H...

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