Sie sind auf Seite 1von 2

Java Assignment

A university grading system maintains number of tables to store, retrieve and manipulate
student marks. These tables reside in a centrally or locally located server known as
database server. Student_marks_ITC000 is one of the tables which contains following
information for all the students enrolled for ITC000: Student ID, Student Name, Marks
obtained in Assignment 1, Marks obtained in Assignment 2, Marks obtained in Assignment
3 and Marks obtained in Final. A sample of the table may look like as follows:

Student
ID
Name Assignment1 Assignment2 Assignment3 Final
1001 Janet 80 100 90 85
1002 Daniel 60 70 75 90
Write a JAVA program that would perform following tasks:
Create Table: Create a table that is capable to store above information.
Insert Record: If the user of your program wants to insert a record, your
program should ask for all the fields of the record and insert them in the table.
Search: The user of your program should be able to search a particular
record by ID or any other field.
Calculate final score: Take a students ID as input and displays his/her
score in each item. It also should calculate and display the final score where
final score = 10% (Assignment 1) + 20% (Assignment 2) + 20% (Assignment
3) + 50% (Final exam).
Requirements
The program should be able to connect to and update a relational database using the
Java Database Connectivity (JDBC);
The Database should be SQL server database (SQL 2005 or 2008). The database
name should be UniversityGrades and name of the table to be called Grades
The java application should be able to connect to the SQL server database through
the use of a DJBC connection: (you can create any user with password to connect
and authenticate)
The program should run perfectly and not crash because of unexpected
inputs/events.
All error/warning message is properly handled
All code should be commented appropriately
Formatting of the results should be presented neatly
Java Version to be used SE 7
Compile the java program using Netbeans 7.3
Each time the java program is launched, it should clear the contents of the SQL
table.
Provide the user with the options below when the application is launched as per the
requirements above (for formatting purposes, please use simple GUI)

1. Create new table
2. Insert records
3. Search
4. Calculate final score
5. Exit

The application should allow the user to select the option from the above when the
application is launched.

Das könnte Ihnen auch gefallen