BankParser - Assignment 8 This file is given by the instructor Description The BankParser class contains a static method parseStringToBank that takes a

BankParser - Assignment 8 This file is given by the...

This preview shows page 1 out of 1 page.

// Assignment #: 8// This file is given by the instructor.// Description: The BankParser class contains a static// method parseStringToBank that takes a string// containing a bank's information and// create a bank object from it.public class BankParser {public static Bank parseStringToBank(String lineToParse){String bankName = new String("?");String id = new String("0");String city = new String("?");String state = new String("?");String[] tokens = lineToParse.split("/");//create a Bank object using extracted information.Bank bank = new Bank();//get the bankNameif (tokens[0].length() > 0)

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture