Question: Write a code in Java of the following class diagram. I guess it is fine to include extra methods not mentioned in the diagram to

Write a code in Java of the following class diagram. I guess it is fine to include extra methods not mentioned in the diagram to make the package logically sound as long as they are identified in bold letters.

comment by expert: Can I include extra methods not mentioned in the diagram in order to make the package logically sound?For example, the calculateBalance() should be abstract in Account, there should be setters for initialAmount in Loan and creditLimt in CreditCardAccount, etc.

Write a code in Java of the following class diagram. I guess

pkg A negative deposit is called a withdrawal Account accounts Deposit amount : double deposited Date: Date deposits BankCustomer Name : String + getName(): String + setName(name : String): void account Number : String + deposit(amount : double, depositedDate : Date) void + calculateBalance(): double + number OfDeposits(): int + Deposit(amount: double, deposited Date: Date) + getAmount(): double + getDepositedDate() : Date Loan Creditcard Account - initialAmount: double + deposit(amount : double, depositedDate : Date) : void creditLimit: double + deposit(amount : double, deposited Date : Date) : void + getCreditCard(): Creditcard You cannot make withdrawals from a loan Creditcard number : String validTo: Date Use java util.Date + Creditcard(number : String, validTo: Date) copy(): Creditcard

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!