Skip to content

Commit 542c2d3

Browse files
committed
Merge branch 'main' of https://github.com/exercism/java into fix/deprecated-gradle
2 parents 98f342b + f2720d8 commit 542c2d3

File tree

17 files changed

+40
-40
lines changed

17 files changed

+40
-40
lines changed

config.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,8 @@
110110
"status": "active"
111111
},
112112
{
113-
"slug": "elons-toy-car",
114-
"name": "Elon's Toy Car",
113+
"slug": "jedliks-toy-car",
114+
"name": "Jedlik's Toy Car",
115115
"uuid": "2ae791e9-eb7a-4344-841d-0c4797e5106c",
116116
"concepts": [
117117
"classes"
-42.4 KB
Binary file not shown.
File renamed without changes.

exercises/concept/elons-toy-car/.docs/instructions.md renamed to exercises/concept/jedliks-toy-car/.docs/instructions.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,38 +15,38 @@ You have six tasks, each of which will work with remote controlled car instances
1515

1616
## 1. Buy a brand-new remote controlled car
1717

18-
Implement the (_static_) `ElonsToyCar.buy()` method to return a brand-new remote controlled car instance:
18+
Implement the (_static_) `JedliksToyCar.buy()` method to return a brand-new remote controlled car instance:
1919

2020
```java
21-
ElonsToyCar car = ElonsToyCar.buy();
21+
JedliksToyCar car = JedliksToyCar.buy();
2222
```
2323

2424
## 2. Display the distance driven
2525

26-
Implement the `ElonsToyCar.distanceDisplay()` method to return the distance as displayed on the LED display:
26+
Implement the `JedliksToyCar.distanceDisplay()` method to return the distance as displayed on the LED display:
2727

2828
```java
29-
ElonsToyCar car = ElonsToyCar.buy();
29+
JedliksToyCar car = JedliksToyCar.buy();
3030
car.distanceDisplay();
3131
// => "Driven 0 meters"
3232
```
3333

3434
## 3. Display the battery percentage
3535

36-
Implement the `ElonsToyCar.batteryDisplay()` method to return the battery percentage as displayed on the LED display:
36+
Implement the `JedliksToyCar.batteryDisplay()` method to return the battery percentage as displayed on the LED display:
3737

3838
```java
39-
ElonsToyCar car = ElonsToyCar.buy();
39+
JedliksToyCar car = JedliksToyCar.buy();
4040
car.batteryDisplay();
4141
// => "Battery at 100%"
4242
```
4343

4444
## 4. Update the number of meters driven when driving
4545

46-
Implement the `ElonsToyCar.drive()` method that updates the number of meters driven:
46+
Implement the `JedliksToyCar.drive()` method that updates the number of meters driven:
4747

4848
```java
49-
ElonsToyCar car = ElonsToyCar.buy();
49+
JedliksToyCar car = JedliksToyCar.buy();
5050
car.drive();
5151
car.drive();
5252
car.distanceDisplay();
@@ -55,10 +55,10 @@ car.distanceDisplay();
5555

5656
## 5. Update the battery percentage when driving
5757

58-
Update the `ElonsToyCar.drive()` method to update the battery percentage:
58+
Update the `JedliksToyCar.drive()` method to update the battery percentage:
5959

6060
```java
61-
ElonsToyCar car = ElonsToyCar.buy();
61+
JedliksToyCar car = JedliksToyCar.buy();
6262
car.drive();
6363
car.drive();
6464
car.batteryDisplay();
@@ -67,10 +67,10 @@ car.batteryDisplay();
6767

6868
## 6. Prevent driving when the battery is drained
6969

70-
Update the `ElonsToyCar.drive()` method to not increase the distance driven nor decrease the battery percentage when the battery is drained (at 0%):
70+
Update the `JedliksToyCar.drive()` method to not increase the distance driven nor decrease the battery percentage when the battery is drained (at 0%):
7171

7272
```java
73-
ElonsToyCar car = ElonsToyCar.buy();
73+
JedliksToyCar car = JedliksToyCar.buy();
7474

7575
// Drain the battery
7676
// ...
File renamed without changes.

exercises/concept/elons-toy-car/.meta/config.json renamed to exercises/concept/jedliks-toy-car/.meta/config.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,18 @@
77
],
88
"files": {
99
"solution": [
10-
"src/main/java/ElonsToyCar.java"
10+
"src/main/java/JedliksToyCar.java"
1111
],
1212
"test": [
13-
"src/test/java/ElonsToyCarTest.java"
13+
"src/test/java/JedliksToyCarTest.java"
1414
],
1515
"exemplar": [
16-
".meta/src/reference/java/ElonsToyCar.java"
16+
".meta/src/reference/java/JedliksToyCar.java"
1717
],
1818
"invalidator": [
1919
"build.gradle"
2020
]
2121
},
22-
"icon": "elons-toys",
22+
"icon": "jedliks-toys",
2323
"blurb": "Learn about classes by working on a remote controlled car."
2424
}
File renamed without changes.

exercises/concept/elons-toy-car/.meta/src/reference/java/ElonsToyCar.java renamed to exercises/concept/jedliks-toy-car/.meta/src/reference/java/JedliksToyCar.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
class ElonsToyCar {
1+
class JedliksToyCar {
22
private int batteryPercentage = 100;
33
private int distanceDrivenInMeters = 0;
44

@@ -21,7 +21,7 @@ public String batteryDisplay() {
2121
return "Battery at " + batteryPercentage + "%";
2222
}
2323

24-
public static ElonsToyCar buy() {
25-
return new ElonsToyCar();
24+
public static JedliksToyCar buy() {
25+
return new JedliksToyCar();
2626
}
2727
}

0 commit comments

Comments
 (0)