0
How can I create a bank account id that will store name, account number, amount, phone and save them to an array list and approach will be the best so other classes can't access my inner workings of the class
advanced
3 Antworten
+ 1
class bankAccount{
private string name = "";
private string accountNum = "";
private float amount = 0;
private string phoneNum = "";
public array data = arr(name, accountNum, amount, phoneNum);
}
I don't know much about Java, but this pseudocode should be of some use, I hope.
0
you have tried your best I already know how to. code it for d amount is best to use double and for the array it's best to implement it on a new class to store the data from the calling class then set your rols on the deposit and withdrawal methods and then getters and setters to check or initialize customer details
- 1
if you need the syntax let me know will write it