Question: i. ii. We propose to develop a program for the banking system for account management. Each account has the following attributes: 1. AccountID: a positive

i. ii. We propose to develop a program for the banking system for account management. Each account has the following attributes: 1. AccountID: a positive integer value that identifies the Account 2. HolderName: the name of the holder of type String 3. AccountBalance: specifies the balance of the account and is of type double. Part 1- Write the declaration of class Account with the following properties Declare the three attributes (AccountID, HolderName, AccountBalance) and use the concept of data hiding. Declare one constructor with three parameters that initialize the three attributes to some default values. Attributes mutators must perform data validation AccountBalance must be greater than or equal to zero. If not, it is set to zero. 2. AccountID must be between 1000 and 9999. If not, it is set to -1 to indicate that it is a bad value. Note. Use the name setAccountBalance (...) to modify account balance. Part 2- Write one method Credit to deposit money into the account. The method should return the new balance after money deposit. Part 3- Write a class VIPAccount that inherits from class Account. The VIPAccount class overrides the method setAccountBalance (...) such that the Balance can be negative but no less than - 10000 TL. The constructor of the VIPAccount class must call the constructor of the Account class III. 1. b. c
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
