Skip to content

Commit 6599654

Browse files
Fix spelling mistakes (#1)
* Fix spelling mistakes * fine-tine -> fine-tune * minor Human modifications
1 parent 85a9a1c commit 6599654

File tree

13 files changed

+43
-43
lines changed

13 files changed

+43
-43
lines changed

.coursecreator/course/course.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@
183183
"text" : "/X2QDlNc9uB3G8V0EQIIZ+R2PidFKOb+XekizarM/8p++eHOfg+T4GmsPEcIFi8zkahnCwW/LLJeOFDtL6ASYe/wUUFHOErJVfLVoEEbUKHTPxyGLkUcfF3zvBOr2Lf05EtqcCZYVTTmMnYDvfdvK/Im5d6DCFMVVrO3X8n0Z9kzIKkBvZimgsD/F0CafHcMDPeyAOYo+6wb4GES1Ti7/L7Jg6PieWPPo2DaP/fYmuU9qAZIB+6OnU6bgSC10DEQSr/0dVJQhlKS/7/vM0qfqafYaqxXIUU2vyuBD5RbcK77gnAM/rAtw59qpyWRDtyidikABYQI5N3lmAEzn0l56+vC7qHK7ODyiFVEW+mTzJkVwiu0Bl/WynN3B6Yoda0RJHswFB/W6a05wdppWuoBxRYjpXweK0URKzMnKhu121AeP0aOt4tGWTRX0L1J9lzl1xcUj/OeU00hPRdxiyM5tUiF6ztDj6d0IfIZoMPXJW8Ev/HsbxXxMMGGkDBP9hQirwJ71tK8Awi9+YJqq1jJKQdWF2e2CpLW21QfK9LBJg3CVVqnsk20Rke04MfN7cx6M4rwooQrJls2s5vZMssdSCn1hEOhLmp0Rr6YC8wmYVexJerKFKKsfMqXM1Tf62NrnyykMrxsdVgUDWj12yHwpr7c8qvaxJDgWSfTISz7IEuDDpVz45KS7VR5E3NENP4Q3zp+xmFiBBWM/KwcperZIiuYxTWf74ir2GBstWdY6onw/XuRfppK6/iYMK/Q3cGpv6xlnmXnNn4gGIfWfj9pTOwTBJNrO9hkNsbQIULcSTFmTWMJvZi4iDnlwM93HHXEWGf33gEO689JnbTOqte7Ru056cHLy776067FFDKNBSYVB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Bi0A0annF4yz8YLaIvqk3uHXXBUmhV2D9L8GWrDdUCXLlnpyZkEt8UnSDktfxjnrfp3wkpwbyY5SiGbzoB6HcuVQw11KcNFfN68MN894xUDSkYpgbTa2xoE8xmGnTZTg7gwS6tzTl7/FtjMngxabU9FlQz6Y4URj/3n8cdSWgygSeXQk92cuXQyb1xMODXIv1kYUt170SlpS6TcaCQQ3/NxeBJhjz/54/i717dRc4"
184184
}
185185
},
186-
"description_text" : "Your first task will be to create the basic models for this project.\n\nWe will need a [Human.java](course://Course/Models/src/org/togetherjava/event/elevator/humans/Human.java)\nfile, that represents the individual humans who want to use elevators to travel around.\n\nAnd an [Elevator.java](course://Course/Models/src/org/togetherjava/event/elevator/elevators/Elevator.java)\nfile, which will transport humans along the floors.\n\n## Human\n\nWe start with the [Human.java](course://Course/Models/src/org/togetherjava/event/elevator/humans/Human.java).\n\n### State\n\nBefore we begin with the class itself, we need an enum that represents the `State` of a human.\nHumans are supposed to be in either of the following states:\n\n* `IDLE`\n* `WAITING_FOR_ELEVATOR`\n* `TRAVELING_WITH_ELEVATOR`\n* `ARRIVED`\n\nPlease adjust the given enum accordingly to have those 4 states.\n\nAlso, a human will need to keep track of their `currentState`.\nPlease add such a **field** to the class. The `getCurrentState()` method is supposed to return this field.\nThe field itself can be kept on the `IDLE` state for now, but will eventually be able to change.\n\n### Floors\n\nNext up, humans need a `startingFloor` and a `destinationFloor`.\nFor this project, we will assume that the first floor in a building is floor `1` (and not `0`).\n\nThe human is supposed to take in those two values via constructor and remember them in fields,\nfrom where it can then serve them to users with `getStartingFloor()` and `getDestinationFloor()`.\n\n### Elevator ID\n\nA human needs to be able to keep track of the elevator they are currently in, if any.\nElevators have unique IDs and the `getCurrentEnteredElevatorID()` method is supposed to return\nthat respectively, or an empty optional if the human is on the corridor.\n\nThe logic for this method could be backed by a field, it is your choice how to implement it.\n\nFor now, we will not change the value of this yet though and the method can just\n`return OptionalInt.empty()`.\n\n### `toString`\n\nTo ease debugging, it is highly recommended that you add a `toString` method to your `Human` class.\n\n## Elevator\n\nThe next class to focus at is [Elevator.java](course://Course/Models/src/org/togetherjava/event/elevator/elevators/Elevator.java).\n\nSimilar to `Human`, you will have to add a couple of fields, set up by the constructor.\n\n### Floors\n\nAn elevator has a range of floors that it can serve. The range is defined by the\n`minFloor` (at least greater equals `1`), ranging up to the last supported floor, given by\n`minFloor + floorsServed - 1`.\n\nIn might sound complex at first, but is actually simple once we take a look at some examples.\nSuppose an elevator with:\n\n* `minFloor = 3`\n* `floorsServed = 4`\n\nThis elevator supports floors `3, 4, 5, 6`. So the range starts at `3` and the total\namount of floors served is `4`, making it end at floor `6`. We assume no gaps in this range,\nelevators support all floors on their range.\n\nOn top of that, an elevator also has a starting position, indicated by `currentFloor`.\n\nImplement the constructor and the corresponding methods.\n\n### ID\n\nEach elevator needs a unique ID. This ID is supposed to be returned by `getId()`.\n\nNot only will this be useful for debugging later on, but this ID will also be displayed later\nin the visualization. For the best experience, it should be positive and start small.\nFor example `0`, `1`, `2` and so on.\n\nHow you implement this, is up to you.\n\n### `toString`\n\nLikewise to `Human`, it is highly recommended that you add a `toString` method to your `Elevator` class.\n\n## Test\n\nLatest at this point, you should actually head over to [Main.java](course://Course/Models/src/org/togetherjava/event/elevator/Main.java)\nand try out your classes. See if everything works as expected, play around with it.\nFor example, write something like:\n\n```java\nHuman human = new Human(1, 4);\n\nSystem.out.println(human.getCurrentState());\nSystem.out.println(human.getStartingFloor());\nSystem.out.println(human);\n\nElevator elevator = new Elevator(3, 4, 6);\n\nSystem.out.println(elevator.getId());\nSystem.out.println(elevator.getFloorsServed());\nSystem.out.println(elevator);\n```\n\nAt this point, if you have done everything right, all tests should pass, and you can move on to\nthe next section \uD83D\uDC4D\n\nIf you have put your implementations into the highlighted placeholder-areas,\nyour code should carry over automatically.\n",
186+
"description_text" : "Your first task will be to create the basic models for this project.\n\nWe will need a [Human.java](course://Course/Models/src/org/togetherjava/event/elevator/humans/Human.java)\nfile, that represents the individual humans who want to use elevators to travel around.\n\nAnd an [Elevator.java](course://Course/Models/src/org/togetherjava/event/elevator/elevators/Elevator.java)\nfile, which will transport humans along the floors.\n\n## Human\n\nWe start with the [Human.java](course://Course/Models/src/org/togetherjava/event/elevator/humans/Human.java).\n\n### State\n\nBefore we begin with the class itself, we need an enum that represents the `State` of a human.\nHumans are supposed to be in either of the following states:\n\n* `IDLE`\n* `WAITING_FOR_ELEVATOR`\n* `TRAVELING_WITH_ELEVATOR`\n* `ARRIVED`\n\nPlease adjust the given enum accordingly to have those 4 states.\n\nAlso, a human will need to keep track of their `currentState`.\nPlease add such a **field** to the class. The `getCurrentState()` method is supposed to return this field.\nThe field itself can be kept on the `IDLE` state for now, but will eventually be able to change.\n\n### Floors\n\nNext up, humans need a `startingFloor` and a `destinationFloor`.\nFor this project, we will assume that the first floor in a building is floor `1` (and not `0`).\n\nThe human is supposed to take in those two values via constructor and remember them in fields,\nfrom where it can then serve them to users with `getStartingFloor()` and `getDestinationFloor()`.\n\n### Elevator ID\n\nA human needs to be able to keep track of the elevator they are currently in, if any.\nElevators have unique IDs and the `getCurrentEnteredElevatorID()` method is supposed to return\nthat respectively, or an empty optional if the human is on the corridor.\n\nThe logic for this method could be backed by a field, it is your choice how to implement it.\n\nFor now, we will not change the value of this yet though and the method can just\n`return OptionalInt.empty()`.\n\n### `toString`\n\nTo ease debugging, it is highly recommended that you add a `toString` method to your `Human` class.\n\n## Elevator\n\nThe next class to focus at is [Elevator.java](course://Course/Models/src/org/togetherjava/event/elevator/elevators/Elevator.java).\n\nSimilar to `Human`, you will have to add a couple of fields, set up by the constructor.\n\n### Floors\n\nAn elevator has a range of floors that it can serve. The range is defined by the\n`minFloor` (at least greater than or equals to `1`), ranging up to the last supported floor, given by\n`minFloor + floorsServed - 1`.\n\nIn might sound complex at first, but is actually simple once we take a look at some examples.\nSuppose an elevator with:\n\n* `minFloor = 3`\n* `floorsServed = 4`\n\nThis elevator supports floors `3, 4, 5, 6`. So the range starts at `3` and the total\namount of floors served is `4`, making it end at floor `6`. We assume no gaps in this range,\nelevators support all floors on their range.\n\nOn top of that, an elevator also has a starting position, indicated by `currentFloor`.\n\nImplement the constructor and the corresponding methods.\n\n### ID\n\nEach elevator needs a unique ID. This ID is supposed to be returned by `getId()`.\n\nNot only will this be useful for debugging later on, but this ID will also be displayed later\nin the visualization. For the best experience, it should be positive and start small.\nFor example `0`, `1`, `2` and so on.\n\nHow you implement this, is up to you.\n\n### `toString`\n\nLikewise to `Human`, it is highly recommended that you add a `toString` method to your `Elevator` class.\n\n## Test\n\nLatest at this point, you should actually head over to [Main.java](course://Course/Models/src/org/togetherjava/event/elevator/Main.java)\nand try out your classes. See if everything works as expected, play around with it.\nFor example, write something like:\n\n```java\nHuman human = new Human(1, 4);\n\nSystem.out.println(human.getCurrentState());\nSystem.out.println(human.getStartingFloor());\nSystem.out.println(human);\n\nElevator elevator = new Elevator(3, 4, 6);\n\nSystem.out.println(elevator.getId());\nSystem.out.println(elevator.getFloorsServed());\nSystem.out.println(elevator);\n```\n\nAt this point, if you have done everything right, all tests should pass, and you can move on to\nthe next section \uD83D\uDC4D\n\nIf you have put your implementations into the highlighted placeholder-areas,\nyour code should carry over automatically.\n",
187187
"description_format" : "MD",
188188
"task_type" : "edu"
189189
},
@@ -709,4 +709,4 @@
709709
],
710710
"version" : 13,
711711
"edu_plugin_version" : "2022.6-2022.1-569"
712-
}
712+
}

Contest/Assignment/src/org/togetherjava/event/elevator/elevators/Elevator.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ public final class Elevator implements ElevatorPanel {
2020
/**
2121
* Creates a new elevator.
2222
*
23-
* @param minFloor the minimum floor that the elevator can serve, must be greater equals 1
24-
* @param floorsServed the amount of floors served in total by this elevator, must be greater equals 2.
23+
* @param minFloor the minimum floor that the elevator can serve, must be greater than or equal to 1.
24+
* @param floorsServed the amount of floors served in total by this elevator, must be greater than or equal to 2.
2525
* Together with the minFloor this forms a consecutive range of floors with no gaps in between.
2626
* @param currentFloor the floor the elevator starts at, must be within the defined range of floors served by the elevator
2727
*/

Contest/Assignment/src/org/togetherjava/event/elevator/humans/Human.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
/**
1010
* A single human that starts at a given floor and wants to
11-
* reach a destination floor via using an elevator.
11+
* reach a destination floor via an elevator.
1212
* <p>
1313
* The class mainly acts upon given elevator events it listens to,
1414
* for example requesting an elevator, eventually entering and exiting them.
@@ -26,11 +26,11 @@ public final class Human implements ElevatorListener {
2626
/**
2727
* Creates a new human.
2828
* <p>
29-
* It is supported that starting and destination floor are equals.
29+
* It is supported that starting and destination floors are equal.
3030
* The human will then not travel with an elevator at all.
3131
*
32-
* @param startingFloor the floor the human currently stands at, must be greater equals 1
33-
* @param destinationFloor the floor the human eventually wants to reach, must be greater equals 1
32+
* @param startingFloor the floor the human currently stands at, must be greater than or equal to 1
33+
* @param destinationFloor the floor the human eventually wants to reach, must be greater than or equal to 1
3434
*/
3535
public Human(int startingFloor, int destinationFloor) {
3636
if (startingFloor <= 0 || destinationFloor <= 0) {
@@ -68,8 +68,8 @@ public void onElevatorArrivedAtFloor(ElevatorPanel elevatorPanel) {
6868
// TODO Implement. If the human is currently waiting for an elevator and
6969
// this event represents arrival at the humans current floor, the human can now enter the
7070
// elevator and request their actual destination floor. The state has to change to TRAVELING_WITH_ELEVATOR.
71-
// If the human is currently traveling with this elevator and the event represents the an
72-
// arrival at the humans destination floor, the human can now exit the elevator.
71+
// If the human is currently traveling with this elevator and the event represents
72+
// arrival at the human's destination floor, the human can now exit the elevator.
7373
System.out.println("Arrived-event received");
7474
}
7575

Contest/Assignment/task.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ Also, the automated tests will most likely fail otherwise.
7575
#### Termination
7676

7777
First and foremost, the main objective of the assignment is to ensure that everyone arrives at their destination.
78-
As simple as this sounds, this can already be a tough challenge on itself.
78+
As simple as this sounds, this can already be a tough challenge in itself.
7979

8080
To make your life easy, we abort your code if it seems to be stuck, and you will see an error message:
8181

@@ -180,14 +180,14 @@ You can also upload your files to _pastebin_ or the entire project to _GitHub_.
180180
We will accept any format, as long as it is clear what you have changed in the source code.
181181

182182
While the event is still ongoing, please do not promote your solution openly in the server
183-
though to not ruin the event for others.
183+
though, to not ruin the event for others.
184184

185185
## Need help
186186

187187
If you have trouble solving the tasks, or something is just unclear to you,
188188
feel free to openly ask in the server.
189189

190-
Besides being a contest, this is also meant as learning experience.
190+
Besides being a contest, this is also meant as a learning experience.
191191
So we will definitely provide you with assistance 👍
192192

193193
Enjoy and happy coding 🙌

Course/ElevatorSystem/src/org/togetherjava/event/elevator/elevators/Elevator.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ public final class Elevator implements ElevatorPanel {
1919
/**
2020
* Creates a new elevator.
2121
*
22-
* @param minFloor the minimum floor that the elevator can serve, must be greater equals 1
23-
* @param floorsServed the amount of floors served in total by this elevator, must be greater equals 2.
22+
* @param minFloor the minimum floor that the elevator can serve, must be greater than or equal to 1
23+
* @param floorsServed the amount of floors served in total by this elevator, must be greater than or equal to 2.
2424
* Together with the minFloor this forms a consecutive range of floors with no gaps in between.
2525
* @param currentFloor the floor the elevator starts at, must be within the defined range of floors served by the elevator
2626
*/

Course/ElevatorSystem/src/org/togetherjava/event/elevator/humans/Human.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ public final class Human implements ElevatorListener {
2828
* It is supported that starting and destination floor are equals.
2929
* The human will then not travel with an elevator at all.
3030
*
31-
* @param startingFloor the floor the human currently stands at, must be greater equals 1
32-
* @param destinationFloor the floor the human eventually wants to reach, must be greater equals 1
31+
* @param startingFloor the floor the human currently stands at, must be greater than or equal to 1
32+
* @param destinationFloor the floor the human eventually wants to reach, must be greater than or equal to 1
3333
*/
3434
public Human(int startingFloor, int destinationFloor) {
3535
if (startingFloor <= 0 || destinationFloor <= 0) {

Course/ElevatorSystem/task.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
In this section we will focus on creating the last core piece, the
1+
In this section, we will focus on creating the last core piece, the
22
[ElevatorSystem.java](course://Course/ElevatorSystem/src/org/togetherjava/event/elevator/elevators/ElevatorSystem.java) class.
33

44
This class will know all elevators and humans,

Course/Models/src/org/togetherjava/event/elevator/elevators/Elevator.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ public final class Elevator {
1919
/**
2020
* Creates a new elevator.
2121
*
22-
* @param minFloor the minimum floor that the elevator can serve, must be greater equals 1
23-
* @param floorsServed the amount of floors served in total by this elevator, must be greater equals 2.
22+
* @param minFloor the minimum floor that the elevator can serve, must be greater than or equals to 1.
23+
* @param floorsServed the amount of floors served in total by this elevator, must be greater than or equals to 2.
2424
* Together with the minFloor this forms a consecutive range of floors with no gaps in between.
2525
* @param currentFloor the floor the elevator starts at, must be within the defined range of floors served by the elevator
2626
*/

Course/Models/src/org/togetherjava/event/elevator/humans/Human.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ public final class Human {
2525
* It is supported that starting and destination floor are equals.
2626
* The human will then not travel with an elevator at all.
2727
*
28-
* @param startingFloor the floor the human currently stands at, must be greater equals 1
29-
* @param destinationFloor the floor the human eventually wants to reach, must be greater equals 1
28+
* @param startingFloor the floor the human currently stands at, must be greater than or equal to 1
29+
* @param destinationFloor the floor the human eventually wants to reach, must be greater than or equal to 1
3030
*/
3131
public Human(int startingFloor, int destinationFloor) {
3232
if (startingFloor <= 0 || destinationFloor <= 0) {

0 commit comments

Comments
 (0)