package edu.kit.informatik.model; import edu.kit.informatik.ui.InvalidInputException; public class FreightCoach extends Coach { /** * ASCII art representation of a freight coach. */ private static final String[] FREIGHT_TEXT = new String[] { "| |", "| |", "| |", "|__________________|", " (O) (O) " }; /** * Construct a new freight coach. * @param identifier identifier to use * @param length length of coach * @param couplingFront whether the coach should have a front coupling * @param couplingBack whether the coach should have a back coupling * @throws InvalidInputException on invalid user input (zero-sized coach) */ public FreightCoach(int identifier, int length, boolean couplingFront, boolean couplingBack) throws InvalidInputException { super(identifier, length, couplingFront, couplingBack); } @Override public String description() { return "freight coach"; } @Override public String[] textRepresentation() { return FREIGHT_TEXT; } @Override public String getType() { return "f"; } }