Advertisement
OlenaB

User

Oct 29th, 2016
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.25 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace ConsoleApplication3
  8. {
  9.     class User
  10.     {
  11.         private String username;
  12.         private string password;
  13.         private int bankAccount;
  14.         private double balance;
  15.  
  16.         public string Username
  17.         {
  18.             get { return username; }
  19.            
  20.             set { username = value; }
  21.         }
  22.  
  23.         public string Password
  24.         {
  25.             get { return password; }
  26.  
  27.             set { password = value; }
  28.         }
  29.  
  30.         public int BankAccount
  31.         {
  32.             get { return bankAccount; }
  33.  
  34.             set { bankAccount = value; }
  35.         }
  36.  
  37.         public double Balance
  38.         {
  39.             get { return balance; }
  40.  
  41.             set { balance = value; }
  42.         }
  43.  
  44.         public User(string username)
  45.         {
  46.             this.username = username;
  47.         }
  48.  
  49.         public User(string username, string password) : this(username)
  50.         {
  51.             this.password = password;
  52.         }
  53.  
  54.         public User(string username, string password, int bankAccount) : this(username, password)
  55.         {
  56.             this.bankAccount = bankAccount;
  57.         }
  58.     }
  59. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement