Skip to content

Commit 7860a0d

Browse files
authored
it shall be in thy mouth sweet as honey
And I went unto the angel, and said unto him, Give me the little book. And he said unto me, Take it, and eat it up; and it shall make thy belly bitter, but it shall be in thy mouth sweet as honey. (Revelation 10:9)
1 parent 677d0ec commit 7860a0d

1 file changed

Lines changed: 34 additions & 0 deletions

File tree

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
2+
//And I went unto the angel, and said unto him, Give me the little book. And he said unto me, Take it, and eat it up; and it shall make thy belly bitter, but it shall be in thy mouth sweet as honey. (Revelation 10:9)
3+
4+
package com.javarush.task.task36.task3609;
5+
6+
public class SpeedometerView {
7+
public void printCarDetails(String brand, String model, int speed) {
8+
System.out.println("Car: \nBrand: " + brand + "\nModel: " + model + "\nCurrent Speed: " + speed + "\n");
9+
}
10+
}
11+
12+
/*
13+
Рефакторинг MVC
14+
15+
Перемести некоторые методы в нужные классы, что бы получить паттерн MVC. Если необходимо - внеси изменения в метод main, которые отражают внесенные тобой изменения. Поведение программы при этом не должно измениться.
16+
17+
НЕ изменяй названия классов, методов и полей.
18+
19+
20+
21+
22+
23+
Требования:
24+
25+
1. Вывод программы должен остаться без изменений.
26+
27+
2. Необходимо переместить метод void speedUp(int) из класса CarModel в класс CarController.
28+
29+
3. Необходимо переместить метод void speedDown(int) из класса CarModel в класс CarController.
30+
31+
4. В методе main класса Solution метод speedUp необходимо вызывать у контроллера, а не у модели.
32+
33+
5. В методе main класса Solution метод speedDown необходимо вызывать у контроллера, а не у модели.
34+
*/

0 commit comments

Comments
 (0)