CompleteUML.docx

COMPLETE UML

Football IS A Athlete

-specialty : String

The football player’s specialty

+ Football (specialty : String)

+toString(specialty : String) : String

Constructs a football player with their specialty

Returns the football player’s stats

+dothis() : void

Prints out that the player did a tackle

+getSpeciality (): String

Returns the football player’s specialty

+setSpeciality (specialty : String) : void

Sets the football player’s specialty

Baseball IS A Athlete

-batPosition : String

The baseball player’s bat position

+ Baseball (batPosition: String)

+toString(batPosition: String) : String

Constructs a baseball player with their batting position

Returns the baseball player’s stats

+dothis() : void

Prints out that the player hit something

+getBatPosition (): String

Returns the baseball player’s bat position

+setBatPosition (batPosition: String) : void

Sets the baseball player’s bat position

Golf IS A Athlete

-mainSponsor : String

The golfer’s main sponsor

+ Golf (mainSponsor: String)

+toString(mainSponsor: String) : String

Constructs a golfer with their main sponsor

Returns the golfer’s stats

+dothis() : void

Prints out that the player putt it in the hole

+getMainSponsor (): String

Returns the golfer’s main sponsor

+setMainSponsor (mainSponsor: String) : void

Sets the golfer’s main sponsor

Hockey IS A Athlete

-stickBrand : String

The hockey player’s stick brand

+ Hockey (stickBrand: String)

+toString(stickBrand: String) : String

Constructs a hockey player with their stick brand

Returns the hockey player’s stats

+dothis() : void

Prints out that the player is in the penalty box

+getStickBrand (): String

Returns the hockey player’s stick brand

+setStickBrand (stickBrand: String) : void

Sets the hockey player’s stick brand

Athlete IS A Person

-team: String

-position: String

The player’s team

The player’s position

+ Athlete (team: String, position: String)

+toString(): String

Constructs an Athlete with their team and position

Returns the Athlete’s Team and Position

+getTeam (): String

Returns the Athlete’s team

+setTeam (team: String) : void

Sets the Athlete’s team

+getPosition (): String

Returns the Athlete’s position

+setPosition (position: String) : void

Sets the Athlete’s position

Person

-name: Name

-age: int

The person’s name

The person’s age

+Person (name: Name, age: int)

+toString(): String

Constructs a Person with a name and age

Returns the person’s name and Age

+getAge (): String

Returns the person’s age

+setAge (age: String) : void

Sets the person’s age

+getName (): Name

Returns the person’s Name

+setName(name: Name) : void

Sets the person’s Name

Name

-firstName: String

-lastName: String

The first name

The last name

+Name (firstName: String, lastName: String)

+toString(): String

Constructs a Person with a name and age

Returns the full name

+getFirstName (): String

Returns the first name

+setFirstName (firstName: String) : void

Sets the first name

+getLastName(): String

Returns the last name

+setLastName (LastName: String) : void

Sets the last name