diff options
author | Jonas Smedegaard <dr@jones.dk> | 2025-03-28 14:31:02 +0100 |
---|---|---|
committer | Jonas Smedegaard <dr@jones.dk> | 2025-03-28 16:07:32 +0100 |
commit | 86920fcd21ea2631a809041e786abd851d1bd0e4 (patch) | |
tree | 3302b57e16f9700e8f8a25713f72ed9b472518c0 /dk/abcdefghijklmnopqrstuvxyzæøå | |
parent | 1c288cd7be40c4be43373fbf4ceaefeb86337c03 (diff) |
use namespace dk.abcdefghijklmnopqrstuvxyzæøå.bachelorizer
Diffstat (limited to 'dk/abcdefghijklmnopqrstuvxyzæøå')
-rw-r--r-- | dk/abcdefghijklmnopqrstuvxyzæøå/bachelorizer/Main.java | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/dk/abcdefghijklmnopqrstuvxyzæøå/bachelorizer/Main.java b/dk/abcdefghijklmnopqrstuvxyzæøå/bachelorizer/Main.java new file mode 100644 index 0000000..ee52b0a --- /dev/null +++ b/dk/abcdefghijklmnopqrstuvxyzæøå/bachelorizer/Main.java @@ -0,0 +1,56 @@ +package dk.abcdefghijklmnopqrstuvxyzæøå.bachelorizer; + +import java.util.Arrays; + +/// Bachelorizer - bachelor programme registrar +/// +/// SPDX-License-Identifier: GPL-3.0-or-later +/// SPDX-FileCopyrightText: 2025 Jonas Smedegaard <dr@jones.dk> +/// +/// Tool for registering students +/// for activities in their bachelor programme. +/// +/// Core class usable in several ways +/// * as self-contained executable via method main() +/// * embedded in a larger system by instantiating Bachelorizer() +/// +/// * v0.0.1-draft +/// * initial release, as part of delivery "Portfolio 1" +/// +/// @version 0.0.1-draft +/// @see <https://moodle.ruc.dk/mod/assign/view.php?id=523186> +public class Main { + + public String name; + public String[] activities; + + /// Main constructor + /// + /// @param name name of student as String + /// @param activities chosen activities as String array + public Main( + final String name, + final String[] activities + ) { + this.name = name; + this.activities = activities; + } + + /// JVM entry point + /// + /// @param args command-line arguments (ignored) + public static void main(final String[] args) { + + // Instantiation as dictated by assignment + final int population = 10; + final int[] observationpoint = new int[] {5, 5}; + Main session = new Main( + "Jonas Smedegaard", + new String[] {"CS-SMC2", "CS-SMC3"}); + + // minimal viable product + System.out.printf("Hi %s%nYou chose these activities: ", + session.name); + System.out.println(Arrays.toString(session.activities)); + } +} |