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)
);
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
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
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.