Question: In NetBeans create a project. 3.) Build an Account class. The Account class should have 3 Properties: balance, owner and acctNo. The Account class should

In NetBeans create a project. 3.) Build an Account class. The Account class should have 3 Properties: balance, owner and acctNo. The Account class should have 2 constructors, one that takes all 3 properties in the order shown and one that takes no data(the default constructor). The Account class should have set and get methods as well as deposit and withdraw methods. See the UML diagram (note the getters and setters are assumed in the diagram). The method signatures need to look like the ones in the diagram. 4.) Create a JUnit tester to test out this class. 5.) Substitute the provided AccountTest.java class for the tester you created. 6.) Build an InsufficientFundsException class. Have this class extend from the Exception class. Also modify your Account class. Make it so that when the withdraw method or this setBalance method attempts to set the balance below zero, the InsufficientFundsException will be thrown. 7.) Now in your JUnit tester modify the withdraw() test method that will attempt to withdraw more than the current balance has available. Change the setBalance() test method too. What happens now? 8.) Lastly modify your JUnit test for overdrawing the account so that it catches exceptions, and catch the InsufficientFundsException. Retest. What happens now?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!