Package core.components.factories
Class UserFactory
- java.lang.Object
 - 
- core.components.factories.UserFactory
 
 
- 
public class UserFactory extends java.lang.ObjectThe UserFactory class : This is the factory to create and add new users. We will always add users to a given system It is uses the simple factory design pattern 
- 
- 
Constructor Summary
Constructors Constructor Description UserFactory() 
- 
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ManageraddManager(MyVelibSystem system, java.lang.String name, int creditCardNumber)This method is responsible for adding a (new) manager to a system with some initial information.static ManageraddManager(MyVelibSystem system, java.lang.String name, java.awt.Point coordinate, int creditCardNumber, double money)This method is responsible for adding a (new) manager to a system with some initial information.static UseraddUser(MyVelibSystem system, java.lang.String name, int creditCardNumber)This method is responsible for adding a (new) user to a system with some initial information.static UseraddUser(MyVelibSystem system, java.lang.String name, java.awt.Point coordinate, int creditCardNumber, double money)This method is responsible for adding a (new) user to a system with some initial information. 
 - 
 
- 
- 
Method Detail
- 
addUser
public static User addUser(MyVelibSystem system, java.lang.String name, java.awt.Point coordinate, int creditCardNumber, double money)
This method is responsible for adding a (new) user to a system with some initial information.- Parameters:
 system- the system that the user is requesting to be inserted inname- the name of the new usercoordinate- the (initial) coordinate of the usercreditCardNumber- the credit card number of the new usermoney- the (initial) money of the user in the application- Returns:
 - the User instance
 
 
- 
addUser
public static User addUser(MyVelibSystem system, java.lang.String name, int creditCardNumber)
This method is responsible for adding a (new) user to a system with some initial information. It can be simpler in some cases.- Parameters:
 system- the system that the user is requesting to be inserted inname- the name of the new usercreditCardNumber- the credit card number of the new user- Returns:
 - the User instance
 
 
- 
addManager
public static Manager addManager(MyVelibSystem system, java.lang.String name, java.awt.Point coordinate, int creditCardNumber, double money)
This method is responsible for adding a (new) manager to a system with some initial information.- Parameters:
 system- the system that the user is requesting to be inserted inname- the name of the new usercoordinate- the (initial) coordinate of the managercreditCardNumber- the credit card number of the new usermoney- the (initial) money of the user in the application- Returns:
 - the Manager instance
 
 
- 
addManager
public static Manager addManager(MyVelibSystem system, java.lang.String name, int creditCardNumber)
This method is responsible for adding a (new) manager to a system with some initial information. It can be simpler in some cases.- Parameters:
 system- the system that the user is requesting to be inserted inname- the name of the new usercreditCardNumber- the credit card number of the new manager- Returns:
 - the Manager instance
 
 
 - 
 
 -