I need to create a program consisting of two classes; a "person" class and a "friend" class.
The person class must have the attributes( first_name, last_name, phone_number ). The "friend" class must have birth date and email.
The application will present a main menu to the user that will allow the user to add a contact, lookup a contact by name, or exit the application.
I have found a great guide here
I am not sure how to accomplish this with multiple classes. I am in a 5 week course, with a textbook that is no help. If someone could please walk me though this, I would appreciate it!
Here is what I have now:
class person:
def information:
first = print(input("first: ")
last = print(input("last: ")
number = print(input("phone number: ")
class friend:
def friendinfo:
email = print(input("email: ")
birthday = print(input("birthday: ")
When the user chooses to add a contact, the application will ask the user if they want to add a regular person or a friend. If the user wants to add a new regular person contact then the application will ask for the first name, last, name and phone number for that person.
If the user wants to add a new friend contact then the application will ask the user for the first name, last name, phone number, email address, and birth date.
When the user chooses to lookup a contact by name, the application will ask the user for the last name, and then the application will display the full information for all contacts with that last name.