CustomerParser.java - import java.util.Scanner public class...

This preview shows page 1 out of 1 page.

import java.util.Scanner; public class CustomerParser { String customerInfo; public CustomerParser(String info) { customerInfo = info; } public static Customer parseStringToCustomer(String lineToParse) { Customer temp; Scanner Scan = new Scanner(lineToParse).useDelimiter("/"); String memberStatus = Scan.next(); String fName = Scan.next(); String lName = Scan.next(); double purAmount = Scan.nextDouble(); int purYear = Scan.nextInt(); int purMonth = Scan.nextInt(); int purDate = Scan.nextInt(); String member = "Member"; String nonMember = "NonMember"; int points = 0; double fee = 0.0; //System.out.println(memberStatus + " " + fName + " " + lName + " " + purAmount + " " + purYear + " " + purMonth + " " + purDate );//debug

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture