Bank Account program….solved




5/5 - (2 votes)

Write a code in C# for a form with these:

Bank Account
• A member that stores an integer for the account number.
• A constructor that takes an integer for the account number (Make the default constructor private so that all accounts have an associated account number)
• Initialize the account balance to 0.0

Create the following methods:
• Deposit (takes the amount to deposit)
• Withdraw (takes the amount to withdraw and can’t check a negative balance)

Create the following properties:
• AccountBalance – get; only
• AccountNumber– get; only