Create a UML diagram for the Employee class

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

Create a UML diagram for the Employee class. Screenshot provided

Attribute@
Туре
Definition
employee_id
str
ID: "E" + 5 digits
name
str
Employee name - "<last name>, <first name>"
birth_month
int
Integer in range 1 to 12
birth_year
int
Integer, 4 digits, range 1800 and above
job_des
str
Is this a currently enrolled student? {"y", "n"}
annual_salary
Int
Annual salary: integer in range 0 to 1000000
Method Name
Purpose
Input
Output/returns
Constructor - sets initial values for all
See
below@
init
None
object attributes.
str
Displays a readable version of the
Employee object
None
Employee data as a
printable string
Calculates and returns the employee's
hourly rate of pay – divides salary by
Hourly rate (float)
hourly_rate
None
2080
Returns the employee's current age in
years - subtracts today's year from birth
year, but accounts for month differences and today's
(i.e. if birth month occurs before today's
month, age is current year minus birth
year, otherwise that minus 1)
age (int)
Today's
month (int)
age
year(int)
Today's
month (int)
and today's
year(int)
retire
If age > 70, returns 'True' - employee is
eligible to retire. Otherwise, 'False
True or False
Transcribed Image Text:Attribute@ Туре Definition employee_id str ID: "E" + 5 digits name str Employee name - "<last name>, <first name>" birth_month int Integer in range 1 to 12 birth_year int Integer, 4 digits, range 1800 and above job_des str Is this a currently enrolled student? {"y", "n"} annual_salary Int Annual salary: integer in range 0 to 1000000 Method Name Purpose Input Output/returns Constructor - sets initial values for all See below@ init None object attributes. str Displays a readable version of the Employee object None Employee data as a printable string Calculates and returns the employee's hourly rate of pay – divides salary by Hourly rate (float) hourly_rate None 2080 Returns the employee's current age in years - subtracts today's year from birth year, but accounts for month differences and today's (i.e. if birth month occurs before today's month, age is current year minus birth year, otherwise that minus 1) age (int) Today's month (int) age year(int) Today's month (int) and today's year(int) retire If age > 70, returns 'True' - employee is eligible to retire. Otherwise, 'False True or False
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY