wiki:BuildInstructions

Version 1 (modified by 216009, 3 weeks ago) ( diff )

--

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)
  • 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

  1. Clone the project from your Git repository:
    git clone <repository_url>
    
  1. Open the project in your IDE.
  1. Add PostgreSQL JDBC jar (postgresql-42.6.0.jar) to the project libraries.
  1. Compile all .java files.
  1. 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

  1. Ensure PostgreSQL is running and accessible.
  1. Update JDBC connection settings in JDBC.getConnection() method with:
  • Host
  • Port
  • Database name
  • Username
  • Password
  1. Run the main class:
    java University
    

or via IDE Run Configuration.

  1. 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

  1. Launch program, select Administrator (1).
  1. Add a university.
  1. 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.

Note: See TracWiki for help on using the wiki.