Apr-06-2017, 02:00 PM
Implement the following classes from the following UML class diagrams, instantiate some objects and show the functionality of the classes.
1. Person (5 marks)
Person
+Name:string
+Age:integer
+DisplayInfo():void
2. Fire Alarm (10 marks)
FireAlarm
-ringing:boolean
+StartTheAlarm():void
+StopAlarm():void
+IsAlarmRinging():boolean
3. Dice (10 marks)
Dice
-RolledNumber:integer
+RollTheDice():void
+GetDiceNumber():integer
4.
4. Employee (15 marks)
Employee
-FirstName:string
-LastName:string
-EmployeeNum:int
-Salary:integer
+SetFullName(string, string):void
+GetFullName():string
+GetFirstName():string
+GetLastName():string
+SetEmployeeNumber(integer)
+GetEmployeeNumber():integer
+SetSalary(integer):void
+GetSalary():integer
+GetMonthlyWage():float
1. Person (5 marks)
Person
+Name:string
+Age:integer
+DisplayInfo():void
2. Fire Alarm (10 marks)
FireAlarm
-ringing:boolean
+StartTheAlarm():void
+StopAlarm():void
+IsAlarmRinging():boolean
3. Dice (10 marks)
Dice
-RolledNumber:integer
+RollTheDice():void
+GetDiceNumber():integer
4.
4. Employee (15 marks)
Employee
-FirstName:string
-LastName:string
-EmployeeNum:int
-Salary:integer
+SetFullName(string, string):void
+GetFullName():string
+GetFirstName():string
+GetLastName():string
+SetEmployeeNumber(integer)
+GetEmployeeNumber():integer
+SetSalary(integer):void
+GetSalary():integer
+GetMonthlyWage():float
User has been warned for this post. Reason: Multiple threads posting homework without showing effort or asking a specific question.