Question: In JAVA and using Eclipse. Please post code that can be copy/psasted into Eclipse. Thank you. Create a 3 layer application in Java, where the
In JAVA and using Eclipse.
Please post code that can be copy/psasted into Eclipse. Thank you.
Create a 3 layer application in Java, where the top layer is the User Interface, the middle layer is the business layer, and the bottom layer is the database connectivity.
The user interface will present a GUI to the user, asking them to enter some information, and to interact with the stored data. Have the retrieved data print to the console. The retrieved data only has to be queried once then re-run the program to query a second time and so on. Please show interaction between the GUI information typed and what is printed out on the console below.
Create a connection to a relational database using SQLite.
Create a single database table to hold information. Recall that you will create the DB only once.
This time the user is to be presented with a GUI that allows these things to be done. the user will fill in a GUI click a button to interact with the DB. When you retrieve the data from the database it should populate the GUI to demonstrate that it is working.
Demonstrate the insertion of a record into the database. Create a method in the Data layer that takes a Person as a parameter, and puts that data in the database. Insert several records.
Demonstrate the retrieval of information from the database. Use SQL Select statements.
Write a method called getPerson that returns a Person object. This method retrieves the data for a Person from the database. We also need to pass a parameter to identify what person. You can use name if you like, or if you find it easier to use the database generated ID thats fine too. This method returns the object that represents that person. This will require that you extract the data that is returned from the database, and call the Person constructor. Note that this is the data-exchange between the relational database and the business layer.
Write a method called findAllPeople that returns an ArrayList of objects containing all the people in the database.
Write a method called deletePerson that removes a person from the database. The parameters will be first name and last name. Print out on the console the data from the record that is being deleted. Use your findAllPeople method to verify that that person has been removed from the database. Consider what this method should return. Suppose the person is not found, should the method return that information somehow?
Please show a sample of output of data being retrieved on the console.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
