Page 1 of 1

Part A) You will write a new concrete class: Credit Card which is also a subclass of BankAccount. Credit Card class' UML

Posted: Sun May 15, 2022 12:15 pm
by answerhappygod
Part A You Will Write A New Concrete Class Credit Card Which Is Also A Subclass Of Bankaccount Credit Card Class Uml 1
Part A You Will Write A New Concrete Class Credit Card Which Is Also A Subclass Of Bankaccount Credit Card Class Uml 1 (88.6 KiB) Viewed 53 times
Part A) You will write a new concrete class: Credit Card which is also a subclass of BankAccount. Credit Card class' UML diagram is given below. Credit Card -creditLimit:int +CreditCard(balance:int,interestRate:double, account Number:String, creditLimit: int) +getCreditLimit():int +setCreditLimit(fee:int):void +deposit(amount:int): int +withdraw(amount:int): int +applyinterest(): void +getInfo(): String 0 O O . The constructor calls super and also initializes the creditLimit. deposit method: adds the given amount to balance returns the balance. withdraw method: decrements the balance with respect to given amount calls applyinterest emthod returns balance applyinterest method calculate the new balance as: balance-=(balance*interestRate) O O O O