Description

I have provided for you a database of made-up students with two tables. The first table is the students in the class, and the second tables are the grades for three assignments.

Student Data:
first name, last name, student ID (primary key)

CREATE TABLE `studentTable` (
`first_name` VARCHAR(20),
`last_name` VARCHAR(20),
`student_id` char(9)
);

Assignment Data:
assignment number, student ID, max points, earned points, letter grade

CREATE TABLE `assnTable` (
`student_id` CHAR(9),
`assn_num` SMALLINT,
`max_points` SMALLINT,
`earned_points` SMALLINT,
`letter_grade` CHAR(1)
);

Part 1 - JDBC and Queries

Write a Java Console program to do the following:

Provide a menu and appropriate input to run the following queries:

1. Run a Query to display all of the students on separate lines

2. Run a query to display all of the students and their grades in blocks like this:

Lastname, Firstname:
< Assn >: < points >/< max >
... repeat for each assignment

3. Run a query for a specific student and display their results in the same format as #2

  • This query should ask the user to search via name or student ID

4. Run a query that displays results like #2 that uses the SQL LIKE statement to match last names that start with a certain sequence. Show results for all students that match the LIKE

5. Calculate the class average for a specific assignment

  • Prompt the user for the assignment number and calculate the average

Part 2 - Getting OOP

Expand on the above program by creating a student and assignment class. Provide a menu option to calculate and show final grades.

The student should "has a" multiple assignments (an array or arrayList will do)

Load the data in the database into a collection of student objects.

Use those student objects to calculate the each individual student's grades in the class.

Use Java to create a final grades table that contains the student_id and the final grade in the database.

Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.