/
lemal
/
test
Обзор
Документация
Войти
/
lemal
/
test
Код
Запросы
0
Задачи
Пакеты
0
Релизы
0
Аналитика
Безопасность
feature
src/main/java/org/example/Card.java
40 строк
827 B
malenno
Im stuck stepmentor
05 сен 2024, 21:43
05 сен 2024, 21:43
7fbaac4
Код
Авторство
О чём код?
package org.example; public class Card { private int val; private String type; public Card(){} public Card (int val, String type){ this.val = val; this.type = type; } public int getVal(){ return val; } public String getType(){ return type; } public void setVal(int val){ this.val = val; } public void setType(String type){ this.type = type; } public static Card makeCard(int val, String type){ Card c = new Card(5, "clubs"); c.setType(type); c.setVal(val); return c; } private boolean isGreaterValThan(Card card) { return this.type.equals(card.getType()) && this.val > card.getVal(); } public void beat(Card card2) { } } //wierd. i now must add compare here