2 * To change this template, choose Tools | Templates
3 * and open the template in the editor.
11 public class Zakaznik
{
14 private String prijmeni
;
17 public Zakaznik(String jmeno
, String prijmeni
, int vek
) {
19 this.prijmeni
= prijmeni
;
23 public String
getJmeno() {
27 public void setJmeno(String jmeno
) {
31 public String
getPrijmeni() {
35 public void setPrijmeni(String prijmeni
) {
36 this.prijmeni
= prijmeni
;
43 public void setVek(int vek
) throws Exception
{
47 throw new Exception("Nespraavny vek");
53 public boolean equals(Object obj
) {
54 if (obj
instanceof Zakaznik
) {
55 Zakaznik z
= (Zakaznik
) obj
;
56 if (this.prijmeni
.equalsIgnoreCase(z
.getPrijmeni())
57 && this.jmeno
.equalsIgnoreCase(z
.getJmeno())
58 && this.vek
== z
.getVek()) {
66 public String
toString() {
67 return String
.format("Zakaznik: prijmeni: %s,jmeno: %s, vek: %d;", this.getPrijmeni(), this.getJmeno(), this.getVek());
This page took 1.171747 seconds and 4 git commands to generate.