Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Part 1 : Create a User object. In its constructor's parameters take these values - id , first _ name, last _ name, birthday and

Part 1:
Create a User object. In its constructor's parameters take these values - id, first_name, last_name, birthday and phone number.
Override __str__ object to print values in this format:
`User ID: 0
Alex Anderson
03/18/1999
402-123-4567`
Part 2:
Prompt a user to input three options, A, S, L
--------------------------------------------------------------------------------------------------------------------------------------
if A is a entered then ask user to enter (you can assume user will always enter proper data, no need to do checking)
id - int
first name - string
last name - string
birthday (mm/dd/yyyy format)- string
phone number (xxx-xxx-xxxx format)- string
Once user enters data, convert data into a Python object User. Store all given data in your program. (You can store it to whatever you want, LIST, TUPLES or DICT, its up to you)
Do not accept data if id already exists. You can discard remaining entries if id is duplicate. Print an error message
Prompt user with options after data was collected.
----------------------------------------------------------------------------------------------------------------
if L is entered then print all entered data in this format
`User ID: 0
Alex Anderson
03/18/1999
402-123-4567`
Prompt user with options after printing all data.
----------------------------------------------------------------------------------------------------------------
if S is entered then save all data into a file and exit the program.
MUST include:
User.py
main.py - must have main function in it.

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

Step: 3

blur-text-image

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

Database Systems Introduction To Databases And Data Warehouses

Authors: Nenad Jukic, Susan Vrbsky, Svetlozar Nestorov

1st Edition

1943153191, 978-1943153190

More Books

Students also viewed these Databases questions

Question

8.1 Characterize the relationship between power and influence.

Answered: 1 week ago