Please answer this question properly must attach output screenshot IN PYTHON create a User class with with 2 attributes : first_name, last_name, hireDate, age, job_title . create a method named describe_user() that prints all the info for the user create a 'great_user() method that prints a personalized greeting to the user add an attribute named login_attempts to the user class from 1 above write a method called increment_login_attempts() that increments the login_attempts value by 1 write another method called reset_login_attempts () that resets the value of login_attempts to 0 Make an instance of the User class and call increment_login_attempts() several times. Print the value of login_attempts to make sure it was incremented properly. Make an instance of the User class and call reset_login_attempts(). Print the value of login_attempts to make sure it was reset to 0. Write a class called Admin that inherits from from User class you wrote above Add an attribute, privileges, that stores a list of strings like "can add post", "can delete post", "can block user". write a method called show_privileges() that lists the administrator's privileges create an instance of Admin and invoke show_privileges() method on it. write a separate Privileges class . The class should have one attribute, privileges, that stores a list of strings. Move the show_privileges() method from 11 above to this class. Make a Privileges instance as an attribute in the Admin class . Create a new instance of Admin and use your method to show privileges

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter3: Using Methods, Classes, And Objects
Section: Chapter Questions
Problem 12PE
icon
Related questions
Question

Please answer this question properly must attach output screenshot

IN PYTHON

create a User class with with 2 attributes : first_name, last_name, hireDate, age, job_title .

create a method named describe_user() that prints all the info for the user

create a 'great_user() method that prints a personalized greeting to the user

add an attribute named login_attempts to the user class from 1 above

write a method called increment_login_attempts() that increments the login_attempts value by 1

write another method called reset_login_attempts () that resets the value of login_attempts to 0

Make an instance of the User class and call increment_login_attempts() several times. Print the value of login_attempts to make sure it was incremented properly.

Make an instance of the User class and call reset_login_attempts(). Print the value of login_attempts to make sure it was reset to 0.

Write a class called Admin that inherits from from User class you wrote above

Add an attribute, privileges, that stores a list of strings like "can add post", "can delete post", "can block user".

write a method called show_privileges() that lists the administrator's privileges

create an instance of Admin and invoke show_privileges() method on it.

write a separate Privileges class . The class should have one attribute, privileges, that stores a list of strings.

Move the show_privileges() method from 11 above to this class.

Make a Privileges instance as an attribute in the Admin class .

Create a new instance of Admin and use your method to show privileges

Expert Solution
steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Unreferenced Objects
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
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning