Answered step by step
Verified Expert Solution
Question
1 Approved Answer
help I want a python code that includes functions Week 2 - Make and test more behaviors: Person: - yearlySalary() - calculate and return the
help I want a python code that includes functions
Week 2 - Make and test more behaviors: Person: - yearlySalary() - calculate and return the person's yearly salary - increaseSalary(amount) - increase salary by amount - returns nothing - decreaseSalary(amount) - change salary by amount if it will not be negative - return nothing \begin{tabular}{|l|} \hline \multicolumn{1}{|c|}{ Person } \\ \hline nameagemonthlySalary \\ \hline printPerson()yearlySalaryl)increaseSalary()decreaseSalary()haveBirthday() \\ \hline \end{tabular} Output: - haveBirthday() - you decide which attribute to change - return nothing Team: - fireManager() - change name to "none" - returns nothing Testing Person behaviors: Paul earns 24000 yearly. Paul is 20 years old and earns 2500 per month. Can't decrease because monthly salary would be negative. Paul is 20 years old and earns 2000 per month. Paul is 21 years old and earns 2000 per month. - hireManager(newName) - only allow if team has no manager - otherwise prints an error message - returns nothingStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started