Write C# equivalent statements for the following:
An “Account” class will be created having properties: accountName, accountNumber, accountType, totalBalance and methods: WithdrawAmount(), CheckBlance(), DepositAmount(). Derive child classes, that is, “SavingAccount” and “CurrentAccount” from the Account class and implement the following functionality.
While taking input from user, check whether the account type is Saving or Current. If user enters “Saving”, an object of Saving Account will be instantiated and while depositing amount in the account an extra 3% of the amount will be deposited (as an extra profit) with the actual amount entered by user. If user enters “Current”, an object of Current Account will be instantiated and while depositing amount in the account, no extra amount will be deposited. Only the actual amount will be deposited. Also implement all the methods mentioned above.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here