Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create the Following : Interface: 1. Create an interface called Account, which contains the following methods: deposit( ) debit( ) transFeeAction( ) Abstract : Create

image text in transcribed
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.
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 SpecialPrivilege abstract class
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.
Create the following 1 Create an interface ed Account which contain the wing methods depo debel transfection Abstract Cresterectomedy Maecence Type Accounts String Thon bernede i come Number Type anting The hede and Debit cards and Type String. This can be one of the Tack cat Debt de credit card Add gentle corect method male Date the default methods to detection from the clients and place it here 2. Create an attracted Sevige Make this as inherit the contract Add the following Typellent. This file can be made the form or Golden Client Asistance this can be with the High priority clude the body of the inte den This method com the conditions of the Ancestry and proces an income account than 1000 ang count the door Colorectal of them of the Aconity and an income account, the moral account the owner Normations Main the cient cohere the propriilegeabhrach Onde qual method Onty nude comparison of 4 O Name Type Account TypeOfCent Oreide compromethod Only include TypeOfClient Type Account Balance In the man Bank Add another normalt at the end pe count of one of the wingly created Check this yet to your object conditions Crayon Guide and comments + in the man das BankSystem Add another normal cient object that has the same name, idad type account of one of the created the Check this bect is equal to the one you created and put both objects are equart this condition is Create an array of cuts and add God normal Currently and previously created the sort thenay Putthult before and after sorting

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_2

Step: 3

blur-text-image_3

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

MFDBS 89 2nd Symposium On Mathematical Fundamentals Of Database Systems Visegrad Hungary June 26 30 1989 Proceedings

Authors: Janos Demetrovics ,Bernhard Thalheim

1989th Edition

3540512519, 978-3540512516

More Books

Students also viewed these Databases questions

Question

8. Demonstrate aspects of assessing group performance

Answered: 1 week ago