Skip to content

Commit 32281e4

Browse files
committed
format
1 parent 4b4881d commit 32281e4

3 files changed

Lines changed: 11 additions & 5 deletions

File tree

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,7 @@
3030
*.exe
3131
*.out
3232
*.app
33+
34+
# misc
35+
source/chpt_1_ACppPrimer/vectorProd/*
36+
source/chpt_1_ACppPrimer/writeTypos/*

source/chpt_1_ACppPrimer/creditCard/CreditCard.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ CreditCard::CreditCard(const string& no, const string& nm, int lim, double bal)
77
balance = bal;
88
limit = lim;
99
}
10+
1011
bool CreditCard::chargeIt(double price) {
1112
if (price + balance > double(limit))
1213
return false;
@@ -25,4 +26,4 @@ ostream& operator<<(ostream& out, const CreditCard& c) {
2526
<< "Balance = " << c.getBalance() << "\n"
2627
<< "Limit = " << c.getLimit() << "\n";
2728
return out;
28-
}
29+
}

source/chpt_1_ACppPrimer/creditCard/CreditCard.h

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,14 @@
77
class CreditCard {
88
public:
99
CreditCard(const std::string& no, const std::string& nm, int lim, double bal = 0); // constructor
10-
std::string getNumber() const { return number; }
11-
std::string getName() const { return name; }
12-
double getBalance() const { return balance; }
13-
int getLimit() const { return limit; }
10+
std::string getNumber() const { return number; }
11+
std::string getName() const { return name; }
12+
double getBalance() const { return balance; }
13+
int getLimit() const { return limit; }
1414

1515
bool chargeIt(double price); // make a charge
1616
void makePayment(double payment); // make a payment
17+
1718
private: // private member data
1819
std::string number; // credit card number
1920
std::string name; // card owner's name

0 commit comments

Comments
 (0)