Find Us On: Facebook Twitter Rss Feed Blog
Need To Register? Sign Up Login

Java - Customer, Employee, Person

josh2013
josh2013 


Attach file has requirements Attachments Tags Clarifications

Answers

Java - Customer, Employee, Person - Solution

dickersonka
dickersonka 



Attached is the solution including source and comments to the Java - Customer, Employee, Person assignment Attachments
Person.zip (2 K) Download
Preview
Person Tester application"); String cont = ""; //keep looping until user chooses quit while(!cont.equalsIgnoreCase("n")){ //get customer or employee String choice = Validator.getCOrE(input, "\nCreate customer or employee? (c/e): "); //get person fields String firstName = Validator.getRequiredString(input, "\nEnter first name: "); String

Preview
false; while (isValid == false) { System.out.print(prompt); answer = sc.nextLine(); //validate email with regex if (answer.matches("[a-zA-Z_0-9]+@[a-zA-Z_0-9]+\\.[a-zA-Z_0-9]+")) { isValid = true; } else { System.out.println("Error! Please enter valid email address *@*.*, such as jack@yahoo.com"); } }

Preview
Get customer number * @return customer number */ public String getCustomerNumber() { return customerNumber; } /** * Set customer number * @param customerNumber customer

Preview
private String socialSecurityNumber; /** * Create employee */ public Employee(){ super(); } /** * String representation of employee */ @Override

Preview
first name */ public String getFirstName() { return firstName; } /** * Set first name * @param firstName first name */ public void setFirstName(String firstName) { this.firstName = firstName; } /** * Get last name

Screenshots
Purchase Answer