summaryrefslogtreecommitdiffstats
path: root/šola/p1/dn/7/Oseba.java
diff options
context:
space:
mode:
Diffstat (limited to 'šola/p1/dn/7/Oseba.java')
-rw-r--r--šola/p1/dn/7/Oseba.java17
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;
+ }
+}