Answer to Question #254861 in Java | JSP | JSF for pvv

Question #254861
Class named BankCustomer Create the following properties.  -customerid : int  -name : String  -baseamount : double -accounttype : String Use parameterized constructor for initializing values Methods . withdrawAmount(int amount) - reduce amount from baseamount . addAmount(int amount)  add amount with baseamount
1
Expert's answer
2021-10-21T15:35:48-0400
public class BankCustomer {
    private int customerId;
    private String name;
    private double baseAmount;
    private String accountType;

    public BankCustomer(int customerId, String name, double baseAmount, String accountType)
    {
        this.customerId = customerId;
        this.name = name;
        this.baseAmount = baseAmount;
        this.accountType = accountType;
    }

    public void widthdrawAmount(int amount)
    {
        if(amount > 0 && baseAmount >= amount)
            baseAmount-=amount;
    }

    public void addAmount(int amount)
    {
        if(amount > 0)
            baseAmount += amount;
    }
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS