public class Customer
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected int |
age
The age of the customer.
|
protected java.lang.String |
gender
The gender of the customer ('male' or 'female').
|
protected boolean |
married
The marital state of the customer.
|
protected java.lang.String |
name
The name of the customer.
|
Constructor and Description |
---|
Customer(java.lang.String name,
java.lang.String gender,
int age,
boolean married)
Create a new customer with initial values.
|
Modifier and Type | Method and Description |
---|---|
boolean |
isRiskTaking()
Check if the customer is risk adverse
or willing to take risks.
|
java.lang.String |
toString()
Get a text representation of the customer.
|
protected java.lang.String name
protected java.lang.String gender
protected int age
protected boolean married