From be6fc6c00174e88a367a0fc9d541ae4b5a95a077 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?201826030127=E6=9D=A8=E6=85=A7=E5=A7=97?= <56498911+201826030127@users.noreply.github.com> Date: Wed, 27 Nov 2019 18:41:10 +0800 Subject: [PATCH] Create Account.h --- 201826030127/Lab1/Account.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 201826030127/Lab1/Account.h diff --git a/201826030127/Lab1/Account.h b/201826030127/Lab1/Account.h new file mode 100644 index 0000000..a93e822 --- /dev/null +++ b/201826030127/Lab1/Account.h @@ -0,0 +1,15 @@ +// Lab 1: Account.h +// Definition of Account class. +#include +using namespace std; + +class Account +{ +public: + Account( int ); // constructor initializes balance + void credit( int ); // add an amount to the account balance + int debit(int); //member function debit + int getBalance() const; // return the account balance +private: + int balance; // data member that stores the balance +}; // end class Account