Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Build a Customer Business Object . This class will have 6 properties, custId, custPassword, custFirstName, custLastName, custAddress and custEmail. Build an empty args Constructor in

Build a Customer Business Object. This class will have 6 properties, custId, custPassword, custFirstName, custLastName, custAddress and custEmail. Build an empty args Constructor in the Customer class that initializes all properties to 0 or . Also build a constructor that takes all 6 args and set the appropriate properties. Then build the following 3 methods:

selectDB(custID); //to find a customers info in the DB

To Test the selectDB() method use this code in the main():

Customer c1 = new Customer();

c1.selectDB(custId);

c1.display();

insertDB(custId, custPassword, custFirstName, custLastName, custAddress, custEmail) // to insert a new Customer in the DB

deleteDB(); //this method will delete the Customer from the DB

//so to check login execute the following code

Customer c1 = new Customer(); //creates empty object

c1.selectDB(id); //does the DB lookup to find Customer

String pwdb = c1.getPassword();

if (pwgui.equals(pwdb)) { //this compares pw(from gui to the

//password from the database

//login correct

}

else {

//login incorrect

}

Build an Account Business Object. This class will have 4 properties, acctNo, custId, type and balance. Build an empty args Constructor in the Customer class that initializes all properties to 0 or . Also build a constructor that takes all 4 args and set the appropriate properties. Then build the following 3 methods:

selectDB(acctNo); //to find a accounts info in the DB

insertDB(aNo, cid, ty, bal) // to insert a new Account into the DB

deleteDB(); //this method will delete the current Cust from the DB

To Test the selectDB() method use this code in the main():

Account a1 = new Account();

a1.selectDB(acctNo);

a1.display(); Send Screenshots of solution

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

Database Concepts

Authors: David Kroenke, David J. Auer

3rd Edition

0131986252, 978-0131986251

More Books

Students also viewed these Databases questions