Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

- Design a class named information that holds the following personal data: - name, age, address (this attribute has a default value of unknown), and

image text in transcribed

- Design a class named information that holds the following personal data: - name, age, address (this attribute has a default value of "unknown"), and phone number. - All the attributes are defined as private. - Write appropriate accessor and mutator methods. - Complete the definition of the __str__ method such that it displays each Information object's data in the following format: - name: "Sarah Jones" - age: "21" - address: "2000 Simcoe North" - Create one instances of the class. - Create a function named display_info that accepts an Information object as an argument and displays the object's name, address, age, and phone number

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Readings In Database Systems

Authors: Michael Stonebraker

2nd Edition

0934613656, 9780934613651

More Books

Students also viewed these Databases questions