Java Programming
Details
Download and unzip IA03.zip
Like we did in the labs, the goal of this assignment will be to take fully
concrete classes, and modify them to use either an interface or
abstract class
There are many TODOs for you to complete
Do NOT delete the TODO comments. I use them when grading, and will
deduct points if you delete them.
You can assume that the user enters valid menu choices
You can assume the user enters positive decimal values as the payments
Output before your changes
This is what you output will look like before your coding begins
You’ll see farther below, that when you’re done, the output will be a
little more descriptive with the error messages given to the user
Choose card
1) Visa
2) MasterCard
Enter choice: 1
Choose bank
1) PNC
2) Bank Of America
Enter choice: 1
Card Balance: 123.45
Bank Balance: 100.0
Enter amount to pay: 101
Error: -1
New Card Balance: 123.45
New Bank Balance: 100.0
Process finished with exit code 0
Choose card
1) Visa
2) MasterCard
Enter choice: 1
Choose bank
1) PNC
2) Bank Of America
Enter choice: 1
Card Balance: 123.45
Bank Balance: 100.0
Enter amount to pay: 99
New Card Balance: 24.450000000000003
New Bank Balance: 1.0
Process finished with exit code 0
Choose card
1) Visa
2) MasterCard
Enter choice: 2
Choose bank
1) PNC
2) Bank Of America
Enter choice: 2
Card Balance: 135.79
Bank Balance: 200.0
Enter amount to pay: 200
New Card Balance: -64.21000000000001
New Bank Balance: 0.0
Process finished with exit code 0
Output after your changes
The output will be a little more descriptive with the error messages
given to the user
Choose card
1) Visa
2) MasterCard
Enter choice: 1
Choose bank
1) PNC
2) Bank Of America
Enter choice: 1
Card Balance: 123.45
Bank Balance: 100.0
Enter amount to pay: 101
Error: INSUFFICIENT_FUNDS
New Card Balance: 123.45
New Bank Balance: 100.0
Process finished with exit code 0
Choose card
1) Visa
2) MasterCard
Enter choice: 1
Choose bank
1) PNC
2) Bank Of America
Enter choice: 1
Card Balance: 123.45
Bank Balance: 100.0
Enter amount to pay: 99
New Card Balance: 24.450000000000003
New Bank Balance: 1.0
Process finished with exit code 0
Choose card
1) Visa
2) MasterCard
Enter choice: 2
Choose bank
1) PNC
2) Bank Of America
Enter choice: 2
Card Balance: 135.79
Bank Balance: 200.0
Enter amount to pay: 200
New Card Balance: -64.21000000000001
New Bank Balance: 0.0
Process finished with exit code 0
Collepals.com Plagiarism Free Papers
Are you looking for custom essay writing service or even dissertation writing services? Just request for our write my paper service, and we'll match you with the best essay writer in your subject! With an exceptional team of professional academic experts in a wide range of subjects, we can guarantee you an unrivaled quality of custom-written papers.
Get ZERO PLAGIARISM, HUMAN WRITTEN ESSAYS
Why Hire Collepals.com writers to do your paper?
Quality- We are experienced and have access to ample research materials.
We write plagiarism Free Content
Confidential- We never share or sell your personal information to third parties.
Support-Chat with us today! We are always waiting to answer all your questions.