Professional Documents
Culture Documents
Lab Goal: This lab is designed to give you more practice writing Objects and using String methods.
Lab Description: Write a program that will create Customer and Object, following the UML diagram
below. Write CustomerRunner.java to test the methods in your Customer object.
Files Needed:
You will find additional information about each method inside the Customer.java
source code files to the right. CustomerRunner.java
LoginInfo.java
LoginInfo class
LoginInfo(String, String)
String loginID; String getLoginID()
String password;
String getPassword()
Customer class void setPassword(String)
String
genDefaultPassword() void setLoginID(String)
LoginInfo myInfo; String getInitials()
int acctNumber; String getDisplayName()
String toString()
static int totalCustomers;
Customer()
Customer(String, String)
LoginInfo getLoginInfo()
int getAcctNumber()
void setName(String, String)
String toString()
Follow the description of each method in the JavaDoc comments inside each file.
Notice:
Customer name should be entered by the operator as first last with a space between the first and last
names.
If the default constructor is used to instantiate the Customer, the loginID should be set to "Info Needed"
All customers begin with a default password (3 random characters from A-Z).
Account numbers start at 1 and increase by one for each new Customer.
Sample Input/Output:
Input Name: mary standifer
Account #: 1 ==> Mary Standifer (MS) Login ID: standifer_mary, Password: RTQ