Question
Write a program please help , Note: please write program in Java ----------------------- Lab 3 Interface: Create an interface called Account, which contains the following
Write a program please help , Note: please write program in Java
-----------------------
Lab 3 Interface:
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 ,TypeOfCard as String. This filed can be assigned one of the options: Black card, Debit cards ,Credit card. ,NumberOfAccounts as integer ,Add getLaon(double colorectal) method and make it abstract ,Take the default methods (deposit-debit-transFeeActions) from the client class and place it here Create an abstract class named SpecialPrivilege ,Make this class inherit the TypeAccount abstract class ,Add the following attributes ,Assistance as String. This filed can be assigned with either low or high priority.,TypeOfClient as String. This field can be assigned with either Normal or Golden Client. ,Include the body of the getLaon() in this class. This method contains the following conditions : ,If the account is high priority and: ,a biasness account, then allow a loan of 40% revenue ,an income account, then allow loan of 50000 Riyal ,If the account is low priority and: a saving account, then do not allow a loan until user provide a colorectal of the same amount ,an income account , then allow loan of 1000 Riyal
Normal class: Make the client class inherit the SpecialPrivilege interface
- Override equal method, Only include comparison of 4 attributes : ID ,Name ,TypeOfAccount ,TypeOfClient
- Override compareTo 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 currently and previously created, then sort the array . Print the result before and after sorting.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started