Question: Using JAVA Create an Account class. The account class should have a type attribute for Checking or Savings, use an enum for this. The account

Using JAVA

Create an Account class. The account class should have a type attribute for Checking or Savings, use an enum for this. The account class should have a balance attribute. In the constructor it should take a User object and the initial balance. It should maintain a reference to the user class as a property on the class. Give it a method called credit that adds money to the balance and a method called debit which removes money from the balance.

In the NewCustomerServlet, where you create the new customer, also create a savings account object for them with an initial balance of 25.00 and a checking account object with a 0.00 initial balance.

Create an AccountDB class, with an insert method that takes an Account object and persists it in the database. In the NewCustomerServlet, use this AccountDB class to save the Checking and Savings account objects.

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!