Having trouble calling a subclass method
Right now I'm having trouble with 3 classes, the first one Teller is used to create new bank accounts, the second one is an abstract Account class, the third is a subclass of Account. I'm having problems inheriting the methods from my Account class to use in my subclasses. Here is the code:
Teller class:
publicboolean createNewAccount (String accountNumber,String accountType,String customerName, String customerPhone,double balance){
if (accountType.equals("sav")){
anAcct =new SavingsAccount(accountNumber, customerName, customerPhone, balance);
}
abstract Account class method which i'm attempting to invoke:
public Account(String accountNumber, String customerName,String customerPhone,double balance){
this.accountNumber = accountNumber;
this.customerName = customerName;
this.customerPhone = customerPhone;
this.balance = balance;
}
Account subclass:
publicvoid SavingsAccount(String accountNumber,String customerName, String customerPhone,double balance){
this.accountNumber = accountNumber;
this.customerName = customerName;
this.customerPhone = customerPhone;
this.balance = balance;
This is my first time using abstraction so I have no clue if this code is right or not, but an help would be greatly appreciated.

