/
lemal
/
test
Обзор
Документация
Войти
/
lemal
/
test
Код
Запросы
0
Задачи
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
src/main/java/org/example/Card.java
30 строк
617 B
malenno
First steps: card, random card generator
22 авг 2024, 11:31
22 авг 2024, 11:31
f984b58
Код
Авторство
О чём код?
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 boolean isGreaterValThan(Card card) { return this.type.equals(card.getType()) && this.val > card.getVal(); } } //wierd. i now must add compare here