| | 1 | = Build Instructions |
| | 2 | |
| | 3 | == Development Environment Description |
| | 4 | |
| | 5 | - Programming Language: Java 17 |
| | 6 | |
| | 7 | - IDE: IntelliJ IDEA / Eclipse / VS Code (Java support) |
| | 8 | |
| | 9 | - Database: PostgreSQL 15 (or compatible version) |
| | 10 | |
| | 11 | - JDBC Driver: PostgreSQL JDBC Driver 42.6.0 (postgresql-42.6.0.jar) |
| | 12 | |
| | 13 | - Download from: https://jdbc.postgresql.org/download.html |
| | 14 | |
| | 15 | - Add to project classpath or IDE libraries |
| | 16 | |
| | 17 | - Operating System: Windows / Linux / macOS |
| | 18 | |
| | 19 | - Build Tool: None required (plain Java compilation via IDE or javac) |
| | 20 | |
| | 21 | == Software Required |
| | 22 | |
| | 23 | - Java JDK 17 installed and configured (java -version to check). |
| | 24 | |
| | 25 | - PostgreSQL installed and running. |
| | 26 | |
| | 27 | - PostgreSQL JDBC driver included in the project classpath. |
| | 28 | |
| | 29 | - IDE (IntelliJ/Eclipse/VS Code) or command line compiler to build Java project. |
| | 30 | |
| | 31 | == Build Instructions |
| | 32 | |
| | 33 | 1. Clone the project from your Git repository: |
| | 34 | {{{ |
| | 35 | git clone <repository_url> |
| | 36 | }}} |
| | 37 | |
| | 38 | 2. Open the project in your IDE. |
| | 39 | |
| | 40 | 3. Add PostgreSQL JDBC jar (postgresql-42.6.0.jar) to the project libraries. |
| | 41 | |
| | 42 | 4. Compile all .java files. |
| | 43 | |
| | 44 | 5. Ensure database schema is created in PostgreSQL: |
| | 45 | |
| | 46 | - Run create_tables.sql to generate all tables. |
| | 47 | |
| | 48 | - Optionally, run insert_sample_data.sql for test data. |
| | 49 | |
| | 50 | == Launch Instructions |
| | 51 | |
| | 52 | 1. Ensure PostgreSQL is running and accessible. |
| | 53 | |
| | 54 | 2. Update JDBC connection settings in JDBC.getConnection() method with: |
| | 55 | |
| | 56 | - Host |
| | 57 | |
| | 58 | - Port |
| | 59 | |
| | 60 | - Database name |
| | 61 | |
| | 62 | - Username |
| | 63 | |
| | 64 | - Password |
| | 65 | |
| | 66 | 3. Run the main class: |
| | 67 | {{{ |
| | 68 | java University |
| | 69 | }}} |
| | 70 | |
| | 71 | or via IDE Run Configuration. |
| | 72 | |
| | 73 | 4. The CLI menu will appear: |
| | 74 | |
| | 75 | - Administrator: manage universities, add professors/students |
| | 76 | |
| | 77 | - Professor: assign grades to students |
| | 78 | |
| | 79 | - Student: enroll in subjects |
| | 80 | |
| | 81 | == Testing Instructions |
| | 82 | |
| | 83 | === Administrator Use-case Test |
| | 84 | |
| | 85 | 1. Launch program, select Administrator (1). |
| | 86 | |
| | 87 | 2. Add a university. |
| | 88 | |
| | 89 | 3. Verify in the database that table University contains the new entry: |
| | 90 | {{{ |
| | 91 | SELECT * FROM University; |
| | 92 | }}} |
| | 93 | |
| | 94 | === Professor Use-case Test |
| | 95 | |
| | 96 | Launch program, select Professor (2). |
| | 97 | |
| | 98 | Assign a grade to a student for a subject. |
| | 99 | |
| | 100 | Verify that table Student_Subject has updated Final_Grade and Status = 'PASSED': |
| | 101 | |
| | 102 | SELECT * FROM Student_Subject WHERE Student_Id = <id> AND Subject_Id = <id>; |
| | 103 | |
| | 104 | |
| | 105 | === Student Use-case Test |
| | 106 | |
| | 107 | Launch program, select Student (3). |
| | 108 | |
| | 109 | Enroll in a subject. |
| | 110 | |
| | 111 | Verify that table Student_Subject has a new row with Status = 'ENROLLED': |
| | 112 | |
| | 113 | SELECT * FROM Student_Subject WHERE Student_Id = <id> AND Subject_Id = <id>; |
| | 114 | |
| | 115 | |
| | 116 | == Usernames and Passwords |
| | 117 | |
| | 118 | Database: Use your local PostgreSQL credentials. |
| | 119 | |
| | 120 | Application CLI: No usernames/passwords required for the prototype (IDs are selected from lists). |
| | 121 | |
| | 122 | == Step-by-Step Mini Guide |
| | 123 | |
| | 124 | Launch application. |
| | 125 | |
| | 126 | Choose actor from main menu: Administrator / Professor / Student. |
| | 127 | |
| | 128 | Follow on-screen menus: |
| | 129 | |
| | 130 | Admin: Add University → Add Professor → Add Student |
| | 131 | |
| | 132 | Professor: Assign Grade → select professor → subject → student → grade |
| | 133 | |
| | 134 | Student: Enroll in Subject → select student → select subject |
| | 135 | |
| | 136 | Verify actions in the database using SELECT queries. |