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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started