remove duplicate code

This commit is contained in:
2020-05-04 19:34:12 +02:00
parent c6246aade2
commit d30589c5ad
19 changed files with 12 additions and 280 deletions

5
java/Instances.md Normal file
View File

@ -0,0 +1,5 @@
# Java Example
Relevant Files:
- [main.java](./classes/main.java)

View File

@ -1,18 +0,0 @@
/*
Basic Car class
just here to make the demonstration in the main file possible
explanation of the code here will be given in later lessons
*/
public class Car {
public String model = "";
public String manufacturer = "";
public void print_info() {
System.out.println("Car Information:");
System.out.println("- manufacturer: " + this.manufacturer);
System.out.println("- model: " + this.model);
}
}

View File

@ -1,5 +0,0 @@
# Java Example
Relevant Files:
- [main.java](./main.java)

View File

@ -1,18 +0,0 @@
public class main {
public static void main(String[] args) {
// create a new car and store it in the variable 'a'
Car a = new Car();
// set some data for that car
a.manufacturer = "Benz";
a.model = "Velo";
// do the same for a second car
Car b = new Car();
b.manufacturer = "Ford";
b.model = "Model T";
// use a function of the car class to print out the information
a.print_info();
b.print_info();
}
}