diff options
author | Anton Luka Šijanec <anton@sijanec.eu> | 2023-12-17 23:17:03 +0100 |
---|---|---|
committer | Anton Luka Šijanec <anton@sijanec.eu> | 2023-12-17 23:17:03 +0100 |
commit | b0324289066876915efb84a133eca039d8e8c8ee (patch) | |
tree | 76b06718de422ed0e5aacbd76c611ee4f82ff526 /šola/p1/dn/7/Oseba.java | |
parent | aoc11 (diff) | |
download | r-b0324289066876915efb84a133eca039d8e8c8ee.tar r-b0324289066876915efb84a133eca039d8e8c8ee.tar.gz r-b0324289066876915efb84a133eca039d8e8c8ee.tar.bz2 r-b0324289066876915efb84a133eca039d8e8c8ee.tar.lz r-b0324289066876915efb84a133eca039d8e8c8ee.tar.xz r-b0324289066876915efb84a133eca039d8e8c8ee.tar.zst r-b0324289066876915efb84a133eca039d8e8c8ee.zip |
Diffstat (limited to 'šola/p1/dn/7/Oseba.java')
-rw-r--r-- | šola/p1/dn/7/Oseba.java | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/šola/p1/dn/7/Oseba.java b/šola/p1/dn/7/Oseba.java new file mode 100644 index 0000000..2477ee9 --- /dev/null +++ b/šola/p1/dn/7/Oseba.java @@ -0,0 +1,17 @@ +import java.util.*; +public class Oseba { + private String ip; + public char spol; + public int starost; + public Oseba(String ip, char spol, int starost) { + this.ip = ip; + this.spol = spol; + this.starost = starost; + } + public String toString() { + return String.format("%s, %c, %d", this.ip, this.spol, this.starost); + } + public boolean jeStarejsaOd(Oseba os) { + return this.starost > os.starost; + } +} |