param newUsername Users username public void setUserNameString newUsername set

Param newusername users username public void

This preview shows page 2 - 3 out of 3 pages.

* @param newUsername User's username */ public void setUserName(String newUsername) //set username { username = newUsername; } /** * Method to get user's username * @return username */ public String getUserName() // get username { return username; } /** * Method to set password * @param newPassword User's password */ public void setPassword(String newPassword) { password = newPassword; } /** * Method to get user's password * @return password */ public String getPassword() { return password; } /** * Method to set age * @param newAge User's age */ public void setAge(int newAge) { age = newAge; } /** * Method to get age * @return age */ public int getAge() // get age { return age; } /** * Method to set gender * @param newGender User's gender */ public void setGender(char newGender) { gender = newGender;
Image of page 2
} /** * Method to get user's gender * @return gender */ public char getGender() { return gender; } /** * Method to set income * @param newIncome User's income */ public void setIncome(double newIncome) { income = newIncome; } /** * Method to get user's income * @return income */ public double getIncome() { return income; } /** * Method to display customer information * @return customer's information */ public String display() { String info = ("Name: " + name + "\nUsername: " + username + "\nAge: " + age + "\nIncome: " + income + "\nGender: " + gender); return info; } }
Image of page 3

You've reached the end of your free preview.

Want to read all 3 pages?

  • Summer '17
  • Data Structures, Subroutine, ASCII, public class Customer, public Customer

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture