Abstract Class and Interface
PartI
Using Abstract Class
- Write a Banking application that will do simple transactions.
- Create an abstract class called Bank
- Define two void methods withdraw and deposite inside the abstract class
- Print the message "amount withdraw" and "amount deposited" on withdraw and deposit class respectively.
- Define an abstract void method calculateinterest inside abstract class
- Create a class PNC that inhertis abstract class (Bank)
- Override the claculateInterest method inside the subclass(PNC)
- Print a message ("PNC interest rate is 5%") from the calculateInterest method.
- Create a class AMT that inhertis abstract class (Bank)
- Override the claculateInterest method inside the subclass(PNC)
- Print a message ("PNC interest rate is 3%") from the calculateInterest method.
PartII
Using Interface
- Write the same Program using Interface
- Use BOA(Bank of America) and Chase for the class name
On the Main Method
- Initialize the correct Class
- Call all the methods from the main class
- Follow the examples from github.
- Expected output
Due Date : 6/14/2023 12:00 PM
How to submit lab?
-
Add your full name and email at the top of the file using a comment tag.
-
Compile and run your program, entering the required inputs.
-
Take a screenshot of the result.
-
Zip your project with the source code, then upload it on Blackboard.
-
Upload screenshot on Blackboard.
-
Note: Submit the assignment on Blackboard by the due date. Email and late submissions will not be accepted.