Advertisement
Guest User

Untitled

a guest
Apr 19th, 2018
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.63 KB | None | 0 0
  1. class Profile:
  2.     def __init__(self, address, phone):
  3.         self.address = address
  4.         self.phone = phone
  5.        
  6.     def save_in_db(self):
  7.         pass
  8.  
  9.  
  10. class User:
  11.     def __init__(self, username, password):
  12.         self.username = username
  13.         self.password = password
  14.    
  15.     def save_in_db(self):
  16.         pass
  17.    
  18.    
  19. class Account:
  20.     @staticmethod
  21.     def new_account(username, password, address, phone):
  22.         new_user = User(username=username, password=password)
  23.         new_user.save_in_db()
  24.        
  25.         new_profile = Profile(address=address, phone=phone)
  26.         new_profile.save_in_db()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement