blob: cf2fe915afa6e54d81b1fe18c661f69efeab6920 (
plain)
- // SPDX-FileCopyrightText: 2025 Jonas Smedegaard <dr@jones.dk>
- // SPDX-License-Identifier: GPL-3.0-or-later
- package dk.abcdefghijklmnopqrstuvxyzæøå.bachelorizer.model;
- import com.example.portfolio3.AdjListGraph;
- import com.example.portfolio3.Graph;
- import com.example.portfolio3.GraphAlgorithms;
- /// Combi - static sample dataset of course combinations
- ///
- /// Slurps and parses data from upstream-provided comma-separated file.
- ///
- /// @version 0.0.1
- /// @see <https://moodle.ruc.dk/mod/assign/view.php?id=523186>
- public final class Combi {
- /// data about combinations as a Graph
- private Graph g;
- /// Default constructor
- ///
- /// @param path path to data file
- private Combi(final String path) {
- g = new AdjListGraph();
- GraphAlgorithms.readGraph(g, path);
- GraphAlgorithms.printGraph(g);
- }
- /// JVM entry point
- ///
- /// @param args command-line arguments
- public static void main(final String[] args) {
- // first argument, if provided, is the data file path;
- // else use upstream named file in current directory.
- String path = (args.length > 0)
- ? args[0]
- : "combi.txt";
- Combi combi = new Combi(path);
- }
- }
|