Build Instructions
Development Environment Description
- Programming Language: Java 17
- IDE: IntelliJ IDEA / Eclipse / VS Code (Java support)
- Database: PostgreSQL 15 (or compatible version)
- JDBC Driver: PostgreSQL JDBC Driver 42.6.0 (postgresql-42.6.0.jar)
- Download from: https://jdbc.postgresql.org/download.html
- Add to project classpath or IDE libraries
- Operating System: Windows / Linux / macOS
- Build Tool: None required (plain Java compilation via IDE or javac)
Software Required
- Java JDK 17 installed and configured (java -version to check).
- PostgreSQL installed and running.
- PostgreSQL JDBC driver included in the project classpath.
- IDE (IntelliJ/Eclipse/VS Code) or command line compiler to build Java project.
Build Instructions
- Clone the project from your Git repository:
git clone <repository_url>
- Open the project in your IDE.
- Add PostgreSQL JDBC jar (postgresql-42.6.0.jar) to the project libraries.
- Compile all .java files.
- Ensure database schema is created in PostgreSQL:
- Run create_tables.sql to generate all tables.
- Optionally, run insert_sample_data.sql for test data.
Launch Instructions
- Ensure PostgreSQL is running and accessible.
- Update JDBC connection settings in JDBC.getConnection() method with:
- Host
- Port
- Database name
- Username
- Password
- Run the main class:
java University
or via IDE Run Configuration.
- The CLI menu will appear:
- Administrator: manage universities, add professors/students
- Professor: assign grades to students
- Student: enroll in subjects
Testing Instructions
Administrator Use-case Test
- Launch program, select Administrator (1).
- Add a university.
- Verify in the database that table University contains the new entry:
SELECT * FROM University;
Professor Use-case Test
- Launch program, select Professor (2).
- Assign a grade to a student for a subject.
- Verify that table Student_Subject has updated Final_Grade and Status = 'PASSED':
SELECT * FROM Student_Subject WHERE Student_Id = <id> AND Subject_Id = <id>;
Student Use-case Test
- Launch program, select Student (3).
- Enroll in a subject.
- Verify that table Student_Subject has a new row with Status = 'ENROLLED':
SELECT * FROM Student_Subject WHERE Student_Id = <id> AND Subject_Id = <id>;
Usernames and Passwords
- Database: Use your local PostgreSQL credentials.
- Application CLI: No usernames/passwords required for the prototype (IDs are selected from lists).
Step-by-Step Mini Guide
- Launch application.
- Choose actor from main menu: Administrator / Professor / Student.
- Follow on-screen menus:
- Admin: Add University → Add Professor → Add Student
- Professor: Assign Grade → select professor → subject → student → grade
- Student: Enroll in Subject → select student → select subject
- Verify actions in the database using SELECT queries.
Last modified
3 weeks ago
Last modified on 02/05/26 19:49:07
Note:
See TracWiki
for help on using the wiki.
