aboutsummaryrefslogtreecommitdiff

Bachelor programme processor (Bachelorizer)

Bachelorizer is a command-line tool to validate course compositions for bachelor programmes at Roskilde University.

It was initially created as a Computer Science mini project assignment for the bachelor course in Computer Science "Subject Module Course 2: Software Development F2025" at Roskilde University, done by Jonas Smedegaard.

Bachelorizer is publicly available as source.

Database creation

The database file identifier.sqlite needed by the program can be created on a linux system using the command-line tool sqlite3 with the following command:

sqlite3 identifier.sqlite < database.txt

Since Intellij executes from a different directory than from commandline, the generated database file is then copied into the directory src/dk.biks.bachelorizer.

Code execution

The code has only been verified to work from command-line (it is unknown if it works in IDEs other than Intellij, such as Eclipse or NetBeans).

GNUMake files are provided for building, packaging and running the code.

For those not using GNUMake, a concrete example command is provided below, executing on build 20 of OpenJDK 25.

Execution succeeds with OpenJDK 17, 21, 22, 23, 24 and build 20 of 25, except JavaFX/OpenJFX code fails with OpenJDK 17 and 21, and fails with OpenJDK 17, 21, 22 and 23 when executed from source. These failures are likely limitations to "source code mode" (i.e. JEP 330 since OpenJDK 11 and JEP 458 since OpenJDK 22).

OpenJDK versions before 23 emit many errors due to not recognizing the Markdown-flavored javadoc comments.

Code has been tested only against the following library releases:

Executing from class files

The command make runclass-dk.biks.bachelorizer is equivalent to these five commands:

rm -rf mods/com.example.portfolio2
javac --module-path /usr/share/java/sqlite-jdbc.jar \
 -Xlint -Xdoclint -implicit:none -Xlint -Xdoclint -implicit:none \
 -d mods/com.example.portfolio2 \
 src/com.example.portfolio2/module-info.java \
 src/com.example.portfolio2/com/example/portfolio2/MyDB.java
rm -rf mods/com.example.portfolio3
javac -Xlint -Xdoclint -implicit:none -Xlint -Xdoclint -implicit:none \
 -d mods/com.example.portfolio3 \
 src/com.example.portfolio3/module-info.java \
 src/com.example.portfolio3/com/example/portfolio3/AbstractGraph.java \
 src/com.example.portfolio3/com/example/portfolio3/AdjListGraph.java \
 src/com.example.portfolio3/com/example/portfolio3/AdjMapGraph.java \
 src/com.example.portfolio3/com/example/portfolio3/Edge.java \
 src/com.example.portfolio3/com/example/portfolio3/EdgeGraph.java \
 src/com.example.portfolio3/com/example/portfolio3/GraphAlgorithms.java \
 src/com.example.portfolio3/com/example/portfolio3/Graph.java \
 src/com.example.portfolio3/com/example/portfolio3/Graphs.java \
 src/com.example.portfolio3/com/example/portfolio3/MatrixGraph.java \
 src/com.example.portfolio3/com/example/portfolio3/Vertex.java
rm -rf mods/dk.biks.bachelorizer
javac --module-path \
 /usr/share/openjfx/lib:/usr/share/java/sqlite-jdbc.jar\
:mods/com.example.portfolio2\
:mods/com.example.portfolio3 \
 --add-modules javafx.base,javafx.controls,javafx.graphics \
 -Xlint -Xdoclint -implicit:none -Xlint -Xdoclint -implicit:none \
 -d mods/dk.biks.bachelorizer \
 src/dk.biks.bachelorizer/module-info.java \
 src/dk.biks.bachelorizer/dk/biks/bachelorizer/Main.java \
 src/dk.biks.bachelorizer/dk/biks/bachelorizer/Graph.java \
 src/dk.biks.bachelorizer/dk/biks/bachelorizer/Window.java \
 src/dk.biks.bachelorizer/dk/biks/bachelorizer/Controller.java \
 src/dk.biks.bachelorizer/dk/biks/bachelorizer/Database.java \
 src/dk.biks.bachelorizer/dk/biks/bachelorizer/GUI.java \
 src/dk.biks.bachelorizer/dk/biks/bachelorizer/Person.java \
 src/dk.biks.bachelorizer/dk/biks/bachelorizer/Storage.java \
 src/dk.biks.bachelorizer/dk/biks/bachelorizer/UI.java
java --module-path mods/dk.biks.bachelorizer\
:/usr/share/openjfx/lib\
:/usr/share/java/sqlite-jdbc.jar\
:mods/com.example.portfolio2\
:mods/com.example.portfolio3 \
 --add-modules javafx.base,javafx.controls,javafx.graphics \
 --enable-native-access=javafx.graphics \
 --enable-native-access=sqlite.jdbc \
 --sun-misc-unsafe-memory-access=allow \
 -m dk.biks.bachelorizer/dk.biks.bachelorizer.Main

When compiled like above, the class Graph may be executed as well:

java --module-path mods/dk.biks.bachelorizer\
:/usr/share/openjfx/lib\
:/usr/share/java/sqlite-jdbc.jar\
:mods/com.example.portfolio2\
:mods/com.example.portfolio3 \
 --add-modules javafx.base,javafx.controls,javafx.graphics \
 --enable-native-access=javafx.graphics \
 --enable-native-access=sqlite.jdbc \
 --sun-misc-unsafe-memory-access=allow \
 -m dk.biks.bachelorizer/dk.biks.bachelorizer.Graph

License

Copyright © 2025 Jonas Smedegaard

Except when otherwise noted, this work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License (CC-BY-SA-4.0).