Skip to content
/ Ginger Public

The assignment is to implement a simple address book library in Python.

License

Notifications You must be signed in to change notification settings

aki263/Ginger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The assignment is to implement a simple address book library in Python.

Overview

  • Assignment version: 1.0

  • Language: Python

  • Type: Library

  • Estimated effort needed: 3-4 hours

Requirements

Facts:

  • A person has a first name and a last name. DONE

  • A person may have one or more street addresses. DONE

p=PersonOperation()
p.create_person("aakash","tewari")
p.add_address_for_user("Some place in world")

  • A person may have one or more email addresses. DONE

p.add_email_for_user("Some place in world")

  • A person may have one or more phone numbers. DONE

p.add_phone_for_user(['1111111111','2222222222'])

  • A person can be a member of one or more groups. DONE

  • An address book is a collection of persons and groups. DONE But considered database as single addressbook

Required features (these need to be unit tested):

  • Add a person to the address book. DONE

p=PersonOperation()
p.create_person("aakash","tewari")

  • Add a group to the address book. DONE

p.add_user_to_group('group1')
p.add_user_to_group('group2')

  • Given a group we want to easily find its members.DONE

grp=GroupOperations() grp.get_group_member('group1')

  • Given a person we want to easily find the groups the person belongs to.DONE

p.get_person_groups()

  • Find person by name (can supply either first name, last name, or both).DONE

p.find_person('aakash tewari')
p.find_person('aakash')
p.find_person('tewari')

  • Find person by email address (can supply either the exact string or a prefix string, ie. both "[email protected]" and "alex" should work).DONE

p.find_person_by_email('[email protected]')
p.find_person_by_email('alex')

Design-only questions:

  • Find person by email address (can supply any substring, ie. "comp" should work assuming "[email protected]" is an email address in the address book) - discuss how you would implement this without coding the solution.DONE I have used SQL LIKE in this and it works perfectlr=y

p.find_person_by_email_design('comapny')

About

The assignment is to implement a simple address book library in Python.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages