Question: i need code in java programing language Customer and Account classes (Composition) 'm' or 'F' Customer - ID:int -name:String -gender:char +Customer(ID: int, name: String, discount:int)

i need code in java programing language i need code in java programing language Customer and Account classes (Composition)

Customer and Account classes (Composition) 'm' or 'F' Customer - ID:int -name:String -gender:char +Customer(ID: int, name: String, discount:int) 1 +getID(): int +getName(): String +getGender():char +toString(): String "name (ID)" Account -id:int -customer:Customer -balance:double = 0.0 +Account(id:int, customer: Customer, balance: double) +Account(id:int, customer:Customer) +getID(): int +getCustomer(): Customer +getBalance(): double +setBalance (balance: double):void +toString(): String +getCustomerName():String +deposit(amount: double): Account +withdraw(amount:double): Account "name (ID) balance=$xxx.xx" balance rounded to 2 decimal places To reuse Customer's toString() Add amount to balance if (balance >= amount) subtract amount to balance else print "amount withdrawn exceeds the current balance

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!