Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please write it on java Create the following: Interface: 1. Create an interface called Account, which contains the following methods: deposit() debit() transFeeAction() Abstract: Create

image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
please write it on java
Create the following: Interface: 1. Create an interface called Account, which contains the following methods: deposit() debit() transFeeAction() Abstract: Create an abstract class named TypeAccount Make the class inherit/implement this interface Add the following attributes: TypeOfAccount as String . This filed can be assigned one of the options: saving account, income accounts, business account NumberOfAccounts as integer TypeOfCard as String. This filed can be assigned one of the options: Black card, Debit cards Credit card. TypeOfCard as String. This filed can be assigned one of the options: Black card, Debit cards Credit card Add getlaon(double colorectal) method and make it abstract Take the default methods (deposit-debit-transfeeActions) from the client class and place it here 2. Create an abstract class named SpecialPrivilege Make this class inherit the TypeAccount abstract class Add the following attributes TypeOfClient as String. This field can be assigned with either Normal or Golden Client Assistance as String. This filed can be assigned with either low or high priority Include the body of the getLaon() in this class. This method contains the following conditions: If the Assistance is low priority and TypeOfAccount is: an income account, then allow loan of 1000 Riyal a saving account, then do not allow a loan until user provide a colorectal of the same amount If the Assistance is high priority and TypeOfAccount is: an income account then allow loan of 50000 Riyal a biasness account then allow a loan of 40% revenue Normal class: Make the client class inherit the Special Privilege abstract class Override equal method, Only include comparison of 4 attributes : . 1 ID Name TypeOfAccount TypeOfClient . Override compare To method, Only include comparison of 3 attributes : TypeOfClient TypeOfAccount Balance . In the main class BankSystem Add another normal client object that has the same name, id, and type account of one of the existing/previously created clients Check if this object is equal to the one you created and print "both objects are equal" if this condition is satisfied Create an array of clients and add all Golden and normal clients In the main class BankSystem Add another normal client object that has the same name, id, and type account of one of the existing/previously created clients Check if this object is equal to the one you created and print "both objects are equal" if this condition is satisfied Create an array of clients and add all Golden and normal clients currently and previously created, then sort the array . Print the result before and after sorting 10:00 PM

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Graph Databases In Action

Authors: Dave Bechberger, Josh Perryman

1st Edition

1617296376, 978-1617296376

More Books

Students also viewed these Databases questions