Class Wallet
Object
Wallet
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintGets the amount of FazCoin you owndoubleGets the amount of USD you havevoidsetFazCoin(int fazCoin) Sets FazCoin in your walletvoidsetUSDollars(double USDollars) Sets USD in your wallet
-
Field Details
-
fazCoin
private int fazCoin -
USDollars
private double USDollars
-
-
Constructor Details
-
Wallet
public Wallet()Default constructor for the Wallet. Sets FazCoin to 500 and USDollars to 5. -
Wallet
public Wallet(int fazCoin, double USDollars) Overloaded constructor for the Wallet. Sets Wallet's FazCoin amount to argument fazCoin and Wallet USDollars to argument USDollars.- Parameters:
fazCoin- Amount of FazCoin to start off with in WalletUSDollars- Amount of USD to start off with in Wallet
-
-
Method Details
-
getFazCoin
public int getFazCoin()Gets the amount of FazCoin you own- Returns:
- FazCoin amount
-
setFazCoin
public void setFazCoin(int fazCoin) Sets FazCoin in your wallet- Parameters:
fazCoin- Amount of FazCoin to put in your wallet
-
getUSDollars
public double getUSDollars()Gets the amount of USD you have- Returns:
- USD amount
-
setUSDollars
public void setUSDollars(double USDollars) Sets USD in your wallet- Parameters:
USDollars- Amount of USD to put in your wallet
-