Information Technology
Active Member
- تاريخ التسجيل
- 2 نوفمبر 2012
- المشاركات
- 38
- المجموعة
- أنثى
- الدفعة الدراسية
- معلومة خاصة
- الكلية
- كلية تقنية المعلومات
- التخصص
- ITCE
Write the definition of a class named BankAccount which includes data members and the
prototype of the function members as described below:
The data members of the class BankAccount are: AccountNumber (long), Name (string), and
Balance (float).
The class BankAccount contains the following member functions:
1. A Constructor with default values parameters where the default values are 999 for
AccountNumber, "" for Name, and 0.0 for Balance.
2. Set and get functions for all the data members.
3. Withdraw which is used to withdraw a certain amount X from the Account. It should
check that the balance in the account is at least equal to X (i.e. X or more) before it
allows the withdrawal and reduce the Balance by X.
4. Deposit which is used to Deposit a certain amount Y into the Account. It should of
course increase the Balance by Y.
5. IsAccountEmpty which returns true if the Balance is less than or equal to zero.
Otherwise it returns false.
6. DisplayAccountDetails that prints (on the screen) all the information about the Account.
7. A destructor.
بالنسبة لرقم 3 و 4و 5 شو الحل بالظبط
prototype of the function members as described below:
The data members of the class BankAccount are: AccountNumber (long), Name (string), and
Balance (float).
The class BankAccount contains the following member functions:
1. A Constructor with default values parameters where the default values are 999 for
AccountNumber, "" for Name, and 0.0 for Balance.
2. Set and get functions for all the data members.
3. Withdraw which is used to withdraw a certain amount X from the Account. It should
check that the balance in the account is at least equal to X (i.e. X or more) before it
allows the withdrawal and reduce the Balance by X.
4. Deposit which is used to Deposit a certain amount Y into the Account. It should of
course increase the Balance by Y.
5. IsAccountEmpty which returns true if the Balance is less than or equal to zero.
Otherwise it returns false.
6. DisplayAccountDetails that prints (on the screen) all the information about the Account.
7. A destructor.
بالنسبة لرقم 3 و 4و 5 شو الحل بالظبط

