コード例 #1
0
 public Expense(User user, string comment, decimal amount, Category category, DateTime date)
 {
     Comment = comment;
     Amount = amount;
     User = user;
     Category = category;
     Date = date;
     User.WithdrawCash(amount);
 }
コード例 #2
0
 public Saving(User user, string goalName, string description, decimal goalAmount, decimal initialAmount)
 {
     User = user;
     GoalName = goalName;
     Description = description;
     GoalAmount = goalAmount;
     InitialAmount = initialAmount;
     User.WithdrawCash(initialAmount);
     DepositCash(initialAmount);
 }