/
anton.buldygin
/
Contacts_Java
Обзор
Документация
Войти
/
anton.buldygin
/
Contacts_Java
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
Contacts (Java)/First contact/task-info.yaml
77 строк
2 KB
AntonBuldygin
Initial commit
19 дек 2023, 15:38
19 дек 2023, 15:38
bed9366
Код
Авторство
О чём код?
type: edu files: - name: src/contacts/Main.java visible: true text: | package contacts; public class Main { public static void main(String[] args) { System.out.println("Hello World!"); } } learner_created: false - name: test/ContactsTest.java visible: false text: | import org.hyperskill.hstest.stage.StageTest; import org.hyperskill.hstest.testcase.CheckResult; import org.hyperskill.hstest.testcase.TestCase; import java.util.List; class TestClue { String feedback; TestClue(String feedback, String outFile, Double[] answers) { } } public class ContactsTest extends StageTest<TestClue> { @Override public List<TestCase<TestClue>> generate() { return List.of( new TestCase<TestClue>() .setInput("John\nSmith\n1-234-567-890") ); } @Override public CheckResult check(String reply, TestClue clue) { reply = reply.toLowerCase(); if (!reply.contains("enter the name") && !reply.contains("enter a name")) { return new CheckResult(false, "I don't see a place to enter the name."); } if (!reply.contains("enter the surname") && !reply.contains("enter a surname")) { return new CheckResult(false, "I don't see a place to enter the surname."); } if (!reply.contains("enter the number") && !reply.contains("enter a number")) { return new CheckResult(false, "I don't see a place to enter the number."); } return CheckResult.correct(); } } learner_created: false - name: src/contacts/Contact.java visible: true learner_created: true feedback_link: https://hyperskill.org/learn/step/5324#comment status: Solved feedback: message: Congratulations! time: "Mon, 18 Dec 2023 10:05:19 UTC" record: 1