Review the code and test the application

Assignment Help JAVA Programming
Reference no: EM131591843

Review the code and test the application

1. Open the project named ch2l_ex2_ProductMaint that's in the ex_starts directory.

2. Open the DAOFactory class. Note that the getProductDAO method has been changed so this application uses the methods in the ProductDB class to work with the Derby database.

3. Open the ProductDB class and review its code. This is the code that's presented in this chapter.

4. Open the ProductMaintApp class and review its code. Then, run this application. It should work the same as it did earlier in this book, but now it stores the data in a Derby database.

Add a disconnect method to the ProductDB class

5. Add a public method to the ProductDB class named disconnect that shuts down the Derby database engine and returns a boolean value that indicates if the shutdown was successful.

6. Switch to the ProductMaintApp class and try to add a statement that calls the disconnect method from the ProductDB class when the application ends. Note that you can't access this method because it's being called from a static context.

7. Now, try to call the disconnect method from the ProductDAO object. This time, you won't be able to access this method because it isn't available from the ProductDAO interface.

8. Create an interface named EmbeddedDB and add a method named disconnect to it.

9. Modify the ProductDAO interface so it inherits the EmbeddedDB interface.

10. Modify the ProductMaintApp class so it calls the disconnect method from the ProductDAO object when the application ends. Then, test the application to make sure it works correctly.

Reference no: EM131591843

Questions Cloud

What is the number of units that must be sold to breakeven : what is the number of units that must be sold to breakeven?
What other factors should marvin and his team consider : What other factors should Marvin and his team consider?Should they bid on the job?
How given accounts reported in guillen balance sheet : Guillen, Inc. began work on a $7,000,000 contract in 2014 to construct an office building. Guillen uses the completed-contract method.
Explain the nature of stress at work : Explain the nature of stress at work? Describe the health consequences of stressful work?
Review the code and test the application : Review the code and test the application - Create an interface named EmbeddedDB and add a method - Create an interface named EmbeddedDB
Transactions will increase the company current ratio : XYZ healthcare organization had a current ratio of 1.40. Which of the following transactions will increase the company's current ratio ?
List the treatmentsthat you would perform for each treatment : List treatmentsthat you would perform for each treatment session in order that you would perform them. If you are combining treatments, place them in same box.
Critically analyze one leadership situation : Critically analyze one leadership situation? List environmental and organizational trends?
What is the value of the yearly interest payment : What is the value of the YEARLY interest payment ABC will make on the 2-year bond.

Reviews

Write a Review

JAVA Programming Questions & Answers

  Recursive factorial program

Write a class Array that encapsulates an array and provides bounds-checked access. Create a recursive factorial program that prompts the user for an integer N and writes out a series of equations representing the calculation of N!.

  Hunt the wumpus game

Reprot on Hunt the Wumpus Game has Source Code listing, screen captures and UML design here and also, may include Javadoc source here.

  Create a gui interface

Create GUI Interface in java programing with these function: Sort by last name and print all employees info, Sort by job title and print all employees info, Sort by weekly salary and print all employees info, search by job title and print that emp..

  Plot pois on a graph

Write a JAVA program that would get the locations of all the POIs from the file and plot them on a map.

  Write a university grading system in java

University grading system maintains number of tables to store, retrieve and manipulate student marks. Write a JAVA program that would simulate a number of cars.

  Wolves and sheep: design a game

This project is designed a game in java. you choose whether you'd like to write a wolf or a sheep agent. Then, you are assigned to either a "sheep" or a "wolf" team.

  Build a graphical user interface for displaying the image

Build a graphical user interface for displaying the image groups (= cluster) in JMJRST. Design and implement using a Swing interface.

  Determine the day of the week for new year''s day

This assignment contains a java project. Project evaluates the day of the week for New Year's Day.

  Write a java windowed application

Write a Java windowed application to do online quiz on general knowledge and the application also displays the quiz result.

  Input pairs of natural numbers

Java program to input pairs of natural numbers.

  Create classes implement java interface

Interface that contains a generic type. Create two classes that implement this interface.

  Java class, array, link list , generic class

These 14 questions covers java class, Array, link list , generic class.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd