From 1ef262140bb5392c121455299366bbb4c58076e7 Mon Sep 17 00:00:00 2001 From: fdai7921 Date: Wed, 7 Feb 2024 17:08:37 +0100 Subject: [PATCH] refactoring: adding String for 'courseData.txt' file --- src/main/java/org/example/Main.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/example/Main.java b/src/main/java/org/example/Main.java index e6cf202..f796f26 100644 --- a/src/main/java/org/example/Main.java +++ b/src/main/java/org/example/Main.java @@ -2,6 +2,8 @@ package org.example; import java.util.Scanner; public class Main { + + public static final String courseData_file = "courseData.txt"; public static void main(String[] args) {System.out.println("Hello world!"); Administration administration = new Administration(); @@ -31,11 +33,11 @@ public class Main { break; case 3: System.out.println("Add Course selected"); - Course.addCourseFromUserInput("courseData.txt"); + Course.addCourseFromUserInput(courseData_file); break; case 4: System.out.println("Delete Course selected"); - Course.deleteCourse("courseData.txt"); + Course.deleteCourse(courseData_file); break; case 5: System.out.println("Assign Grade selected");