⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 account.java

📁 this is a relatively simple program.
💻 JAVA
字号:

public class Account
{
    private String loginId;
    private int pinCode;
    private double balance;
    private int accountNo;
    
    // account holder profile
    private String name;
    private String address;
    private String email;
    private String phoneNo;
    
    public Account( int accountNo, String loginId, int pinCode, double startingBalance, String name, 
            String address, String email, String phoneNo )
    {
        setAccountNo( accountNo );
        setLoginId( loginId );
        setPinCode( pinCode );
        setBalance( startingBalance );
        setName( name );
        setAddress( address );
        setEmail( email );
        setPhoneNo( phoneNo );
    }
    
    public void setAccountNo( int accountNo )
    {
        this.accountNo = accountNo;
    }
    
    public void setLoginId( String loginId )
    {
        this.loginId = loginId;
    }
    
    public void setPinCode( int pinCode )
    {
        this.pinCode = pinCode;
    }
    
    public void setBalance( double balance )
    {
        this.balance = balance;
    }
    
    public void setName( String name )
    {
        this.name = name;
    }
    
    public void setAddress( String address )
    {
        this.address = address;
    }
    
    public void setEmail( String email )
    {
        this.email = email;
    }
    
    public void setPhoneNo( String phoneNo ) 
    {
        this.phoneNo = phoneNo;
    }
    
    public int getAccountNo()
    {
        return accountNo;
    }
    
    public String getLoginId()
    {
        return loginId;
    }
    
    public int getPinCode()
    {
        return pinCode;
    }
    
    public double getBalance()
    {
        return balance;
    }
    
    public String getName()
    {
        return name;
    }
    
    public String getAddress()
    {
        return address;
    }
    
    public String getEmail()
    {
        return email;
    }
    
    public String getPhoneNo() 
    {
        return phoneNo;
    }    
    
    public void showProfile()
    {
        System.out.println("Account No: " + accountNo );
        System.out.println("Login ID: " + loginId );
        System.out.println("Balance: " + balance );
        System.out.println("Owner name: " + name );
        System.out.println("Owner address: " + address );
        System.out.println("Owner email: " + email );
        System.out.println("Owner phone no: " + phoneNo );
    }    
    
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -