Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Time Series Databases New Ways To Store And Access Data

Authors: Ted Dunning, Ellen Friedman

1st Edition

1491914726, 978-1491914724

More Books

Students also viewed these Databases questions

Question

Describe Table Structures in RDMSs.

Answered: 1 week ago