Hello, when I started this I was thinking I Was doing it right, but then as I contineud to read instructions I honestly dont know how to even begin using the other code. send help. Here's the instructions. Please, I don't know what to do.   Write a class named employee that has three attributes: name, age and rank_ID. Define a class constructor that initializes these attributes when creating an object of this class. Next, create four employee objects with the following attributes: “Michael”, 45, 12345 “Dwight”, 40, 23456 “Pam”, 30, 34567 “Jim”, 35, 12345 Print the employee data in any format you like for all four employees. You must use the special class method __repr__() for doing this. Next, define a function named is_higher_rank() that takes as input two employee objects. If the employees are equal (you have to use the special class method __eq__() to see if the employees are equal or not), which means that their rank_IDs are the same, this function returns the string “These employees are both at the same rank”. If one employee’s (let’s say employee1) rank_ID is less than the other’s (let’s say employee2), this function returns a string “ is senior in rank than ” (make sure your code prints the actual employee names when you do this). Otherwise, this function returns a string “ is senior in rank than ”. 1. Manually test your is_higher_rank() function with different combinations of four employees. 2. Write at least 4 automated unit test case

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
100%

Hello, when I started this I was thinking I Was doing it right, but then as I contineud to read instructions I honestly dont know how to even begin using the other code. send help. Here's the instructions. Please, I don't know what to do.

 

Write a class named employee that has three attributes: name, age and rank_ID. Define a class constructor that initializes these attributes when creating an object of this class. Next, create four employee objects with the following attributes:
“Michael”, 45, 12345
“Dwight”, 40, 23456
“Pam”, 30, 34567
“Jim”, 35, 12345
Print the employee data in any format you like for all four employees. You must use the special class method __repr__() for doing this.
Next, define a function named is_higher_rank() that takes as input two employee objects. If the employees are equal (you have to use the special class method __eq__() to see if the employees are equal or not), which means that their rank_IDs are the same, this function returns the string “These employees are both at the same rank”. If one employee’s (let’s say employee1) rank_ID is less than the other’s (let’s say employee2), this function returns a string “<employee1.name> is senior in rank than <employee.name2>” (make sure your code prints the actual employee names when you do this). Otherwise, this function returns a string “<employee2.name> is senior in rank than <employee.name1>”.
1. Manually test your is_higher_rank() function with different combinations of four employees.
2. Write at least 4 automated unit test cases to test your is_higher_rank() function.

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Class
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
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education