Question: IT-162 Java 2 Passing Arguments Exercise Apply your knowledge of passing args (parameters) into a java program. Submit the project.zip via Blackboard. Load the Database
IT-162 Java 2
Passing Arguments Exercise
Apply your knowledge of passing args (parameters) into a java program. Submit the project.zip via Blackboard.
Load the Database with Args using Run Configurations in Eclipse
Create Java project Week02DBProcess. Create DBProcessPart1.java to demonstrate a console data display by passing args into a program. The project must include the Database folder in your project. Do this by copying using file explorer and refreshing the project in Eclipse. The program needs the database import statements (as shown in DBExamples1): import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.Statement;
DBProcessPart1.java must have the following methods: main, LoadListFromDatabase, and OpenDatabaseConnection. (25 points)
main: This accepts the incoming args, checks for missing args, and calls other methods.
LoadListFromDatabase: This loads the data from the table. Load table TEmployees from the dbHCM database. You need to pass args using Run Configurations in Eclipse. Be sure to provide documentation in the comments on the args you are passing. Console output must look like this:
Table: TEmployees ID: 1 FirstName: Jill
Table: TEmployees ID: 2 FirstName: Jack
Table: TEmployees ID: 3 FirstName: Jerry
Yes! We processed the list
OpenDatabaseConnection: This opens the database connection for dbHCM.
Be sure the program checks for error processing. (20 points) Send errors for at least the following:
if the user cannot connect to the database
if the table does not exist
if the user does not pass parameters into the program/if the program does not receive the correct number of args (The args are getting passed in the Run Configuration for testing purposes. However, the program still needs to check the number of args.) The error message must be this: Since you did not pass your table, primary key, and column cannot process.
The program must follow proper naming conventions of this course. (10 points)
Test the program and provide a print-screen of the test results. (10 points)
Be sure to have the proper program documentation/comments. All methods must have the proper JavaDoc comments. (10 points)
Generate a JavaDoc for your Project. You do this by selecting your project folder, select Project, Generate JavaDoc. You can refresh your project to see the doc folder that contains your index.html. Select Open With, Web Browser, navigate to annotations and provide a print-screen with your submission. (25 points)
Refer to the practice exercise for tips on how to create this application.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
