Write a class that implements Employee class that is described in UML diagram given below. The method “ raiseSalary(percent) " increases the salary by the given percentage. Write a test program that will generate at least 3 accounts and test each method that you write.

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter11: Inheritance And Composition
Section: Chapter Questions
Problem 9PE
icon
Related questions
Question

Write in python language thank you

Write a class that implements Employee class that is described in UML diagram given below.
The method “ raiseSalary(percent) " increases the salary by the given percentage. Write a test program that
will generate at least 3 accounts and test each method that you write.
Employee
-id:int
-firstName:String
-lastName:String
-salary:int
+Employee(id:int, firstName:String,
lastName:String, salary:int)
+getID():int
+getFirstName():String
+getLastName():String
+getName():String
+getSalary():int
+setSalary(salary:int):void
+getAnnualSalary():int •
+raiseSalary(int percent):int
+tostring():String.
"firstName Llastname"
salary * 12
Increase the salary by the percent and
return the new salary
"Employee[id=?,name=firstName lastname,salary=?]"
Transcribed Image Text:Write a class that implements Employee class that is described in UML diagram given below. The method “ raiseSalary(percent) " increases the salary by the given percentage. Write a test program that will generate at least 3 accounts and test each method that you write. Employee -id:int -firstName:String -lastName:String -salary:int +Employee(id:int, firstName:String, lastName:String, salary:int) +getID():int +getFirstName():String +getLastName():String +getName():String +getSalary():int +setSalary(salary:int):void +getAnnualSalary():int • +raiseSalary(int percent):int +tostring():String. "firstName Llastname" salary * 12 Increase the salary by the percent and return the new salary "Employee[id=?,name=firstName lastname,salary=?]"
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Introduction to computer system
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning