Skip to content
Snippets Groups Projects
Commit eadea292 authored by Johanne Fixdal's avatar Johanne Fixdal
Browse files

made getters and setters for TrainDeparture

parent 46764555
No related branches found
No related tags found
No related merge requests found
...@@ -4,10 +4,10 @@ ...@@ -4,10 +4,10 @@
<option name="autoReloadType" value="SELECTIVE" /> <option name="autoReloadType" value="SELECTIVE" />
</component> </component>
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="885012ef-f9bd-49ba-ae4a-3de0b4c477fd" name="Changes" comment="Initialized repo and made hello world"> <list default="true" id="885012ef-f9bd-49ba-ae4a-3de0b4c477fd" name="Changes" comment="Test gitlab push">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/edu/ntnu/stud/TrainDeparture.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/edu/ntnu/stud/TrainDeparture.java" afterDir="false" /> <change beforePath="$PROJECT_DIR$/src/main/java/edu/ntnu/stud/TrainDeparture.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/edu/ntnu/stud/TrainDeparture.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/target/classes/edu/ntnu/stud/Main.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/edu/ntnu/stud/Main.class" afterDir="false" /> <change beforePath="$PROJECT_DIR$/target/classes/edu/ntnu/stud/Main.class" beforeDir="false" />
</list> </list>
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" /> <option name="HIGHLIGHT_CONFLICTS" value="true" />
...@@ -38,22 +38,35 @@ ...@@ -38,22 +38,35 @@
<option name="hideEmptyMiddlePackages" value="true" /> <option name="hideEmptyMiddlePackages" value="true" />
<option name="showLibraryContents" value="true" /> <option name="showLibraryContents" value="true" />
</component> </component>
<component name="PropertiesComponent">{ <component name="PropertiesComponent"><![CDATA[{
&quot;keyToString&quot;: { "keyToString": {
&quot;RunOnceActivity.OpenProjectViewOnStart&quot;: &quot;true&quot;, "RunOnceActivity.OpenProjectViewOnStart": "true",
&quot;RunOnceActivity.ShowReadmeOnStart&quot;: &quot;true&quot;, "RunOnceActivity.ShowReadmeOnStart": "true",
&quot;WebServerToolWindowFactoryState&quot;: &quot;false&quot;, "WebServerToolWindowFactoryState": "false",
&quot;git-widget-placeholder&quot;: &quot;master&quot;, "git-widget-placeholder": "master",
&quot;last_opened_file_path&quot;: &quot;C:/Users/johan/OneDrive - NTNU/Dokumenter/programmering1/Train dispatch system/IDATT1003-2023-Mappe-TrainDispatchSystem-Template&quot;, "last_opened_file_path": "C:/Users/johan/OneDrive - NTNU/Dokumenter/programmering1/Train dispatch system/IDATT1003-2023-Mappe-TrainDispatchSystem-Template",
&quot;node.js.detected.package.eslint&quot;: &quot;true&quot;, "node.js.detected.package.eslint": "true",
&quot;node.js.detected.package.tslint&quot;: &quot;true&quot;, "node.js.detected.package.tslint": "true",
&quot;node.js.selected.package.eslint&quot;: &quot;(autodetect)&quot;, "node.js.selected.package.eslint": "(autodetect)",
&quot;node.js.selected.package.tslint&quot;: &quot;(autodetect)&quot;, "node.js.selected.package.tslint": "(autodetect)",
&quot;settings.editor.selected.configurable&quot;: &quot;editor.preferences.completion&quot;, "settings.editor.selected.configurable": "preferences.pluginManager",
&quot;vue.rearranger.settings.migration&quot;: &quot;true&quot; "vue.rearranger.settings.migration": "true"
} }
}</component> }]]></component>
<component name="RunManager"> <component name="RunManager" selected="Application.LocalTime">
<configuration name="LocalTime" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
<option name="MAIN_CLASS_NAME" value="edu.ntnu.stud.LocalTime" />
<module name="TrainDispatchSystem" />
<extension name="coverage">
<pattern>
<option name="PATTERN" value="edu.ntnu.stud.*" />
<option name="ENABLED" value="true" />
</pattern>
</extension>
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
<configuration name="Main" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true"> <configuration name="Main" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
<option name="MAIN_CLASS_NAME" value="edu.ntnu.stud.Main" /> <option name="MAIN_CLASS_NAME" value="edu.ntnu.stud.Main" />
<module name="TrainDispatchSystem" /> <module name="TrainDispatchSystem" />
...@@ -82,6 +95,7 @@ ...@@ -82,6 +95,7 @@
</configuration> </configuration>
<recent_temporary> <recent_temporary>
<list> <list>
<item itemvalue="Application.LocalTime" />
<item itemvalue="Application.Main" /> <item itemvalue="Application.Main" />
</list> </list>
</recent_temporary> </recent_temporary>
...@@ -98,6 +112,7 @@ ...@@ -98,6 +112,7 @@
<workItem from="1697277327863" duration="1087000" /> <workItem from="1697277327863" duration="1087000" />
<workItem from="1697278462833" duration="2550000" /> <workItem from="1697278462833" duration="2550000" />
<workItem from="1697281569682" duration="334000" /> <workItem from="1697281569682" duration="334000" />
<workItem from="1697437763932" duration="6737000" />
</task> </task>
<task id="LOCAL−00001" summary="Initialized repo and made hello world"> <task id="LOCAL−00001" summary="Initialized repo and made hello world">
<option name="closed" value="true" /> <option name="closed" value="true" />
...@@ -113,7 +128,14 @@ ...@@ -113,7 +128,14 @@
<option name="presentableId" value="LOCAL−00002" /> <option name="presentableId" value="LOCAL−00002" />
<updated>1697281162307</updated> <updated>1697281162307</updated>
</task> </task>
<option name="localTasksCounter" value="3" /> <task id="LOCAL−00003" summary="Test gitlab push">
<option name="closed" value="true" />
<created>1697437845699</created>
<option name="number" value="LOCAL−00003" />
<option name="presentableId" value="LOCAL−00003" />
<updated>1697437845699</updated>
</task>
<option name="localTasksCounter" value="4" />
<servers /> <servers />
</component> </component>
<component name="TypeScriptGeneratedFilesManager"> <component name="TypeScriptGeneratedFilesManager">
...@@ -121,6 +143,7 @@ ...@@ -121,6 +143,7 @@
</component> </component>
<component name="VcsManagerConfiguration"> <component name="VcsManagerConfiguration">
<MESSAGE value="Initialized repo and made hello world" /> <MESSAGE value="Initialized repo and made hello world" />
<option name="LAST_COMMIT_MESSAGE" value="Initialized repo and made hello world" /> <MESSAGE value="Test gitlab push" />
<option name="LAST_COMMIT_MESSAGE" value="Test gitlab push" />
</component> </component>
</project> </project>
\ No newline at end of file
package edu.ntnu.stud; package edu.ntnu.stud;
import java.time.LocalTime;
public class TrainDeparture { public class TrainDeparture {
private int depatureTime = 00:00; private LocalTime departureTime = LocalTime.MIN;
private String line = ""; private String line = "";
private String trainNumber = ""; private String trainNumber = "";
private String destination = ""; private String destination = "";
private int track = 0; private int track = 0;
private int delay = 00:00; private LocalTime delay = LocalTime.MIN;
// delay-method is not final, due to changes // delay-method is not final, due to changes
private TrainDeparture(int depatureTime, String line, String trainNumber, String destination, int private TrainDeparture(LocalTime depatureTime, String line, String trainNumber, String destination, int
track, int delay) { track, LocalTime delay) {
this.departureTime = depatureTime;
this.line = line;
this.trainNumber = trainNumber;
this.destination = destination;
this.track = track;
this.delay = delay;
}
public LocalTime getDepartureTime(){
return departureTime;
}
public String getLine() {
return line;
}
public String getTrainNumber() {
return trainNumber;
}
public String getDestination() {
return destination;
}
public int getTrack() {
return track;
}
public LocalTime getDelay() {
return delay;
} }
public void setTrack(int tracknumber){
this.track = tracknumber;
}
public void setDelay(LocalTime delay) {
this.delay = delay;
}
} }
No preview for this file type
File added
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment