Create a simple java program that connects to database

Assignment Help JAVA Programming
Reference no: EM131556703

Assignment: Java Database Program

Part 1

1. Create a file with your name as the data (Use the name Precious Benz). Save the file using your first initial and last name as part of the file name. Include code to copy the file. Check if the file exists first and throw a message if the file already exists. Include code to read the file using a data stream. Display the file's data on screen.

2. Using JFileChooser, build a dialog box to open and save files. The dialog box should allow you to browse directories and type in a file name. You need to consider what you will do with the file once you open it and code accordingly.

Part 2

Database Access

The objective of this assignment is to allow you to work with JDBC via an ODBC-connected Access database.

Your first task for this assignment is to locate and set up the "exampleMDB.mdb" file in the supplemental chapters section of the CD-rom that came with your Liang text. Copy this file to your hard drive. Next, create an ODBC connection to this database called "assignment8".

Next, create a simple Java program that connects to this database using JDBC. Your program should then query this database's "student" table and display a list of all the students' names in alphabetic order (based upon last name).

If you implement your program correctly, this is the output you should see:

Rick R. Carter

Frank E. Jones

Joy P. Kennedy

Toni R. Peterson

Josh R. Smith

Jean K. Smith

George K. Smith

Jacob R. Smith

John K. Stevenson

Patrick R. Stoneman

Josh R. Woo

Please do not waste my time if you do not know Java

Access database cannot be uploaded as file type is not allowed. Will email it separately.

Reference no: EM131556703

Questions Cloud

Importance of information technology and systems : Explain the importance of information technology and systems in businesses today. Include at least one (1) real-world industry example.
What is the required rate of return for rich company shares : FINA 202 Business Finance Exam. The Rich Company has a dividend growth rate of 14 percent, What is the required rate of return for Rich Company shares
Creating a training and development program : Imagine that you have been tasked with creating a training and development program for midlevel business managers in an organization.
How much less can they expect to pay over the life of loan : FINANCING A HOME The Sandersons are planning to refinance their home. The outstanding principal on their original loan is $100,000 and was to be amortized.
Create a simple java program that connects to database : create a simple Java program that connects to this database using JDBC. Your program should then query this database's "student" table.
How much larry should deposit each month : INVESTMENT ANALYSIS Since he was 22 years old, Ben has been depositing $200 at the end of each month into a taxfree retirement account earning interest.
Natural rate of unemployment : Potential GDP is $25 trillion; expectations are adaptive; the natural rate of unemployment is 5.5%; the 2010 inflation rate was 3.5%. The phillips curve is:
Warehouse management processes : Research at least 2 companies, and familiarize yourself with their warehouse management processes, and then discuss the following:
Which will provide the program user some basic information : DisplayApplicationInformation, which will provide the program user some basic information about the program.

Reviews

Write a Review

JAVA Programming Questions & Answers

  Write a program that creates a two-dimensional array

Write a program that creates a two-dimensional (2D) array initialized with test data (for instance, use Random method to prepare an array of integers).

  Write a java program to bill companys customers

Write a Java program that can be used by the company to bill its customers. The program should use system clock. One should not enter start time and end time.

  Find the errors in the javascript code

I get this error when running the Java Script above: JS Error: TypeError: Object # has no method 'error'

  Create a testing java program

Please create a testing Java program to use this RandomSeq class to create a random DNA sequence and then print it out in a formatted fashion with a specified length for each line.

  Write an application to calculate the salespersons salary

Write an application that prompts the user to enter the sales for each employee, then it calculates the salesperson's salary. The process repeats until the user finishes entering all employees' information.

  Write program with jframe to enter series of names

Write a program with JFrame which permits user to enter series of friends' names and phone numbers and creates file from entered data.

  Good idea to test a general class with a driver program

Question 1: Why is it a good idea to test a general class with a driver program before trying to use it? Question 2: What is the difference between black box and glass box debugging?

  Exchange the block of platinum for cash

You don't get any fractional part, as the division process rounds down the value. If you exchange the block of platinum for cash, you get m units of currency. You can do any number of exchanges for smaller blocks or currency.

  Compute the distance between the first two points

Compute the distance between the first two points and initialize the variable that represents the second shortest distance - Display the second shortest distance and the second closest two points.

  Obtain a collection of n small images in png or jpg format

Obtain a collection of n small images in PNG or JPG format, where n is an integer between 3 and 10. Index the images with numbers 1,. . . n.

  Write a program that can be used to gather statistical data

Write a program that can be used to gather statistical data about the number of movies college students see in a month. The program should ask the user how many students were surveyed and dynamically allocate an array of that size

  What happen if one servlet makes references to other servlet

With regard to automatic servlet reloading in Tomcat 3.1, what happens if one servlet makes references to other servlets in the same webapp?

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