User: Make a class called User. Create two attributes called first_name and last_name, and then create several other attributes that are typically stored in a user profile. Make a method called describe_user() that prints a summary of the user's information. Make another method called greet_user() that prints a personalized greeting to the user. Then Create several instances representing different users, and call both methods for each user.

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter10: Introduction To Inheritance
Section: Chapter Questions
Problem 3PE
icon
Related questions
Question

User: Make a class called User. Create two attributes called first_name and last_name,

and then create several other attributes that are typically stored in a user profile. Make
a method called describe_user() that prints a summary of the user's information. Make

another method called greet_user() that prints a personalized greeting to the user.
Then

- Create several instances representing different users, and call both methods for

each user.

Admin: write a class called Admin that inherits from the User class. Add an attribute,
privileges, that stores a list of strings like "can add post”, "can delete post”, "can ban
user”, and so on. Write a method called show_privileges() that lists the administrator's
set of privileges. Then

- Create an instance of Admin, and call your method.

User: Make a class called User. Create two attributes called first_name and last_name,
and then create several other attributes that are typically stored in a user profile. Make
a method called describe_user() that prints a summary of the user's information. Make
another method called greet_user() that prints a personalized greeting to the user.
Then
Create several instances representing different users, and call both methods for
each user.
Transcribed Image Text:User: Make a class called User. Create two attributes called first_name and last_name, and then create several other attributes that are typically stored in a user profile. Make a method called describe_user() that prints a summary of the user's information. Make another method called greet_user() that prints a personalized greeting to the user. Then Create several instances representing different users, and call both methods for each user.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps

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