Question: you'll be using object oriented programming to create a user _ account class. You'll then use this class to create objects for some user accounts.
you'll be using object oriented programming to create a useraccount class. You'll then use this class to create objects for some user accounts. This program will also need to have good unit testing coverage
Details:
Create a class called useraccount
Your class should have three methods:
deposit
Accepts an amount and adds this amount to the accountbalance
withdrawal
Accepts an amount and deducts this amount from the accountbalance
If the withdrawal amount would cause the account to go negative, print that this transaction can't be completed and don't deduct from accountbalance
display
This method should output all information about the useraccount object
Now that your class is created, create two objects
account should be a checking account any accountowner, accountnum is fine
add a balance of $ to this account
withdraw $ from this account
display the information about this account
account should be a savings account any accountowner, accountnum is fine
add a balance of $ to this account
attempt to withdraw $
display the information about this account
Ensure that your unit tests cover these scenarios SetUp and TearDown should be used
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
