public class Kjøretøy { // Egenskaper: id (String), merke (String), modell (String), år (int) protected final String id; protected String merke; protected String modell; protected int år; // Konstruktør public Kjøretøy(String id, String merke, String modell, int år) { this.id = id; this.merke = merke; this.modell = modell; this.år = år; } // Hent metoder public int hentÅr() { return år; } public String hentId() { return id; } public String hentMerke() { return merke; } public String hentModell() { return modell; } // Sett metoder public void settÅr(int nyttÅr) { år = nyttÅr; } public void settMerke(String merke) { this.merke = merke; } public void settModell(String modell) { this.modell = modell; } }