Class Skills

java.lang.Object
  |
  +--Skills
All Implemented Interfaces:
java.lang.Cloneable

public class Skills
extends java.lang.Object
implements java.lang.Cloneable

Represents an employee skill


Field Summary
private  java.lang.String abbreviation
          A skill's abbreviation
private  int color
          The color associated with the skill (stored as an int)
private  java.lang.String name
          A name of a skill
 
Constructor Summary
Skills(java.lang.String initName, java.lang.String initAbbreviation, int initColor)
          Construct a skill
 
Method Summary
 java.lang.Object clone()
          Create a copy of the current object
 java.lang.String GetAbbreviation()
          Get an abbreviaton for manipulation
 int GetColor()
          Check what color is assigned to this skill
 java.lang.String GetName()
          Get a name for manipulation
 void SetAbbreviation(java.lang.String newAbbreviation)
          Modify abbreviation
 void SetColor(int newColor)
          Modify the color
 void SetName(java.lang.String newName)
          Modify the name
 
Methods inherited from class java.lang.Object
, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

name

private java.lang.String name
A name of a skill

abbreviation

private java.lang.String abbreviation
A skill's abbreviation

color

private int color
The color associated with the skill (stored as an int)
Constructor Detail

Skills

public Skills(java.lang.String initName,
              java.lang.String initAbbreviation,
              int initColor)
Construct a skill

Preconditions: initColor is within valid range (0-255)
Postconditions: A new skill with the given name, abbreviation, and color is constructed

Parameters:
name - name of skill
abbreviation - skill's abbreviation
color - background color assigned to skill
Method Detail

GetName

public java.lang.String GetName()
Get a name for manipulation

Preconditions: (none)
Postconditions: The method will return the name of the skill

Returns:
name of the skill

GetAbbreviation

public java.lang.String GetAbbreviation()
Get an abbreviaton for manipulation

Preconditions: (none)
Postconditions: The method will return the name of the abbreviation of the skill

Returns:
abbreviation for the skill

GetColor

public int GetColor()
Check what color is assigned to this skill

Preconditions: (none)
Postconditions: The method will return the color that is associated with the skill

Returns:
color (0-255) that corresponds to the skill

SetName

public void SetName(java.lang.String newName)
Modify the name

Preconditions: (none)
Postconditions: The name of the skill will be set to the given newName

Parameters:
newName - new name for the skill

SetAbbreviation

public void SetAbbreviation(java.lang.String newAbbreviation)
Modify abbreviation

Preconditions: (none)

Parameters:
newAbbreviation - new abbreviation for the skill

SetColor

public void SetColor(int newColor)
Modify the color

Preconditions: newColor is within range (0-255)
Postconditions: The color associated with the skill will be set to the newColor

Parameters:
newColor - new color for the skill

clone

public java.lang.Object clone()
Create a copy of the current object

Preconditions: (none)
Postconditions: The method will make a copy of the current object, and return that copy

Overrides:
clone in class java.lang.Object
Returns:
the copy