type.lib
Class Client

java.lang.Object
  extended by type.lib.Contact
      extended by type.lib.Client
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<Contact>

public class Client
extends Contact
implements java.io.Serializable

This class encapsulates a client. A client is a contact but it has a credit rating.

Version:
7.1 - Summer 2011
Author:
H. Roumani, roumani@cse.yorku.ca
See Also:
Serialized Form

Field Summary
 
Fields inherited from class type.lib.Contact
FIRST_NUMBER
 
Constructor Summary
Client(java.lang.String name, java.lang.String address, java.lang.String rating)
          Construct a client having the given name, address, and credit rating; and assign a unique number to it.
 
Method Summary
 java.lang.String getRating()
          Determine the credit rating of this client.
 void setRating(java.lang.String rating)
          Change the rating of this client.
 
Methods inherited from class type.lib.Contact
compareTo, equals, getAddress, getLastContactNumber, getName, getNumber, hashCode, setAddress, setName, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Client

public Client(java.lang.String name,
              java.lang.String address,
              java.lang.String rating)
Construct a client having the given name, address, and credit rating; and assign a unique number to it. Number assignment is handled by the superclass Contact.

Parameters:
name - the name of the contact.
address - the address of the client.
rating - the credit rating of the client.
Throws:
java.lang.RuntimeException - if any of the parameters is null.
Method Detail

getRating

public java.lang.String getRating()
Determine the credit rating of this client.

Returns:
the credit rating of this client.

setRating

public void setRating(java.lang.String rating)
Change the rating of this client.

Parameters:
rating - the new credit rating.
Throws:
java.lang.RuntimeException - if the parameters is null.


Java by Abstraction: A Client-View Approach