added all past projects

This commit is contained in:
Hannes
2017-11-10 00:13:57 +01:00
parent 5f63f0c599
commit 8c94608805
1391 changed files with 109456 additions and 0 deletions

View File

@@ -0,0 +1,50 @@
package wettewerb_foto;
import java.util.ArrayList;
public class Camera {
private int id;
private String name;
private ArrayList<Image> images = new ArrayList();
public Camera(int id, String name) {
this.id = id;
this.name = name;
}
public int countImages() {
return getImages().size();
}
public String writeLine() {
String s = "";
short i = 0;
for (Image image : images) {
s = s + this.name + " " + this.id + i + ";";
s = s + image.getAbstand() + ";";
s = s + image.getStreuung() + ";";
s = s + System.getProperty("line.separator");
i++;
}
s = s.replace(".", ",");
return s;
}
public void AddImage(String path) {
Image tmp = new Image();
tmp.Load(path);
System.out.println(this.name + this.id + " loaded a new Image");
getImages().add(tmp);
}
@Override
public String toString()
{
return name + " " + id;
}
public ArrayList<Image> getImages() {
return images;
}
}