Design a class in Python that holds the following personal information: name, address, age, and phone number. Write appropriate accessor and mutator methods. Also design a program that creates three instances of the class and prompts the user to enter the name, address, age and phone number of three imaginary people. This data should be stored in the objects. Use the objects' accessor methods to retrieve the information and display the data on the screen.

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter5: Making Decisions
Section: Chapter Questions
Problem 8PE
icon
Related questions
Question

Design a class in Python that holds the following personal information: name, address, age, and phone number. Write appropriate accessor and mutator methods.

Also design a program that creates three instances of the class and prompts the user to enter the name, address, age and phone number of three imaginary people. This data should be stored in the objects. Use the objects' accessor methods to retrieve the information and display the data on the screen.

AI-Generated Solution
AI-generated content may present inaccurate or offensive content that does not represent bartleby’s views.
steps

Unlock instant AI solutions

Tap the button
to generate a solution

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
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781305480537
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning