From 42e7cc5daa01d6ddef9922b5f7882786ec1d810c Mon Sep 17 00:00:00 2001 From: Selim Eser <2211482@stud.hs-mannheim.de> Date: Sun, 9 Jun 2024 02:52:50 +0200 Subject: [PATCH] System.java constructor with api_key, removed getter and setter methods --- src/main/java/de/hs_mannheim/domain/System.java | 8 +------- src/main/java/de/hs_mannheim/facade/Application.java | 4 ++-- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/src/main/java/de/hs_mannheim/domain/System.java b/src/main/java/de/hs_mannheim/domain/System.java index 9b843e0..0a453e0 100644 --- a/src/main/java/de/hs_mannheim/domain/System.java +++ b/src/main/java/de/hs_mannheim/domain/System.java @@ -1,8 +1,6 @@ package de.hs_mannheim.domain; -import java.io.IOException; import java.net.URI; -import java.net.URISyntaxException; import java.net.http.HttpClient; import java.net.http.HttpRequest; import java.net.http.HttpResponse; @@ -17,11 +15,7 @@ public class System { private User current_user; private String api_key; - public String getApi_key() { - return api_key; - } - - public void setApi_key(String api_key) { + public System(String api_key) { this.api_key = api_key; } diff --git a/src/main/java/de/hs_mannheim/facade/Application.java b/src/main/java/de/hs_mannheim/facade/Application.java index b98778f..14d3c20 100644 --- a/src/main/java/de/hs_mannheim/facade/Application.java +++ b/src/main/java/de/hs_mannheim/facade/Application.java @@ -8,8 +8,8 @@ public class Application { private System running_system; - public Application(){ - this.running_system = new System(); + public Application(String api_key){ + this.running_system = new System(api_key); } public boolean sign_in_user(String username, String password){