Your task is to write a program that will allow students to complete a test via the console. We will use the database described in
the second homework assignment.
However, the students table needs to be extended with a login name , i.e. some text identifier for the student (we will ignore the password for simplicity). Your program can use any SQL database system (i.e. you can use PostgreSQL or SQLLite, or other standard database systems (MySQL, MariaDB, ...))
Please use the following table definitions:
- student(studentid, firstname, lastname, login_name)
- teacher(teacherid, firstname, lastname)
- test(testid, teacherid_author, name)
- question(questionid , testid, text, correct, incorrect1, incorrect2, incorrect3)
- assignment(assignmentid, testid, studentid, teacherid, assignment_time)
- result(resultid, assignmentid, score, completion_time)< /li>
- answer(resultid, questionid, text_answer)
Program behavior (everything runs in the console):
-
After starting, the program will request the student's login. If the entered login is not found, the program will ask for it again. Please ensure that the login name is not case-sensitive.
-
After entering the correct login name, the program will print on the console a list of tests assigned to the given student (cf. number, test name, teacher name, assignment time, best result of the given student from this assignment) and the student selects which test he wants to run by entering the sequence number.
-
The program will then give the questions of the selected test one by one.
I.e. the program will print the text of the question and the options A-D to the console and the student has to choose the correct option (by typing letters a/b/c/d).
Each answer to a question is also stored in the database (in the answer table).
-
After answering all the questions, the program prints the percentage of success and stores the result in the database (in the result table).
The program then ends.
< li>Bonus task for 5 points: analyze whether the described database is in 3NF and BCNF. Justify your claims in detail.
All source files (.java) along with the compiled version please send in one .zip file to
rjasko (at) dcs.fmph.uniba.sk no later than
10.1.2025 23:59:59.