Skip to content
Snippets Groups Projects
Commit 470e599b authored by magnus's avatar magnus
Browse files

Add boilerplate for exercise lecture 2

parent 19be0008
Branches
No related tags found
No related merge requests found
package of2.kode;
public class Car {
// Felter / intern tilstand:
private String model;
private String brand;
private String regNum;
private int productionYear;
private double weight;
private double kmDriven;
// Konstruktører:
public Car(String model, String brand, String regNum, int productionYear, double weight) {
this.model = model;
this.brand = brand;
this.regNum = regNum;
this.productionYear = productionYear;
this.weight = weight;
this.kmDriven = 0;
}
public static void main(String[] args) {
/*
* // Modell, Produsent, Registeringsnummer, Produksjonsår, Kilometerstand, Vekt
* Car car = new Car("S-MAX", "Ford", "AQ12345", 2019, 356.0);
*/
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment