Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Auto {
- private String znacka;
- private String typ;
- private int cena ;
- private double spotreba;
- public void setZnacka(String znacka) {
- this.znacka = znacka;
- }
- public String getZnacka() {
- return this.znacka;
- }
- public void setTyp(String typ) {
- this.typ = typ;
- }
- public String getTyp() {
- return this.typ;
- }
- public void setCena(int cena) {
- this.cena = cena;
- }
- public int getCena() {
- return this.cena;
- }
- public void setSpotreba(double spotreba) {
- this.spotreba = spotreba;
- }
- public Double getSpotreba() {
- return this.spotreba;
- }
- public Auto () {
- this.znacka = "NoName";
- this.typ = "NoThing";
- this.cena= 0;
- this.spotreba = 0;
- }
- public Auto(String znacka, String typ, int cena, double spotreba)
- {
- this.znacka = znacka;
- this.typ = typ;
- this.cena = cena;
- this.spotreba = spotreba;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement