kit-programmieren-ws1920-fi.../src/edu/kit/informatik/ElectricalEngine.java
2020-02-15 15:17:23 +01:00

38 lines
1.1 KiB
Java

package edu.kit.informatik;
public class ElectricalEngine extends Engine {
public ElectricalEngine(final String series, final String name, final int length, final boolean couplingFront, final boolean couplingBack) {
super.name = name;
super.series = series;
super.length = length;
super.couplingFront = couplingFront;
super.couplingBack = couplingBack;
}
@Override
public String toString() {
return String.format("e %s %s %d %b %b", series, name, length, couplingFront, couplingBack);
}
private static final String[] ELECTRICAL_ENGINE_TEXT = new String[] {
" ___ ",
" \\ ",
" _______________/__ ",
" /_| ____________ |_\\ ",
"/ |____________| \\",
"\\ /",
" \\__________________/ ",
" (O)(O) (O)(O) ",
};
@Override
public String[] textRepresentation() {
return ELECTRICAL_ENGINE_TEXT;
}
@Override
public String description() {
return "electrical engine";
}
}