Calling a method in a utility class
Hey guys, total java noob here. I'm having some real trouble getting this homework assignment done here.
I have multiple classes, Assignment holds my main method, BankAccount is the parent class of Saving, MoneyMarket, and Checking. BankAccountParser is a class in a separate file, and the description I am given is this:
The BankAccountParser class is a utility class that will be used to create a bank account object (one of a saving object, a checking object, and a money market object) from a parsable string. The BankAccountParser class object will not be instantiated. It must have the following method:
public static BankAccount parseStringToAccount(String lineToParse)
Now, I think I know how to set up the method just fine, but I'm unsure of how I call the method from my main method. I know if I had an object of the class named b it would be b.parseStringToAccount(....), correct? But how can I call the method without instantiating a BankAccountParser class object? Thanks in advance.