កំណែលំហាត 6.4.1 - បង្កើត BankAccount class នោក្នុងមេរៀន Instance Variables
#រៀនសរសេរកូដជាមួយចិត្រា #javaprogramming #javabasics #codingwithchitra #sololearncoding
JAVA ថ្នាក់ទី១ | JAVA For Beginner
Exercise:
Create a BankAccount class with the following instance variables:
accountNumber (int)
accountHolderName (String)
balance (double)
1. Create getter and setter methods for each instance variable.
2. Implement a method deposit(double amount) that adds the specified amount to the account balance.
3. Implement a method withdraw(double amount) that deducts the specified amount from the account balance if sufficient funds are available.
4. Create a Main class with the main method to demonstrate the usage of the BankAccount class. Create instances of BankAccount, perform deposits and withdrawals, and display the updated account information.
កម្រងវីដេអូមេរៀន|Play List 👉 https://youtube.com/playlist?list=PLSJTJj3gU6qhkjSEUmgBKGJnn0ob1NZSu&si=rcvL8CwF_5EGx_2n
YouTube Channel 👉 https://www.youtube.com/@codingwithchitra
Facebook Page 👉 https://www.facebook.com/khmshared
Telegram Channel 👉 https://t.me/codingwithchitra