Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Main {
- class Engine{
- private int cylinders, horsepower, torque;
- private String manufacturer;
- }
- class Transport {
- protected String brand, model, color, interior, ownerName, modifications, specifications;
- protected int seats, startYear, mileage, mass;
- }
- class AirTransport extends Transport {
- protected int maxHeight, maxDistance;
- }
- class Helicopter extends AirTransport {
- private int blades;
- private String rotorsType;
- private Engine engine;
- }
- class Airplane extends AirTransport {
- private String airplaneClass;
- private Engine[] engines;
- private int landings;
- }
- class SeaTransport extends Transport {
- protected int volumeDisplacement, massDisplacement, normalDisplacement, fullDisplacement;
- protected Engine engine;
- }
- class Trailer extends Transport {
- private String trailerType;
- }
- class GroundTransport extends Transport {
- protected int wheels, fuelTankVolume, highwayConsumption, cityConsumption, gears;
- protected String wheelDrive, gearboxType, gearboxManufacturer, soundSystem;
- protected Engine engine;
- protected boolean leftSided;
- }
- class PassengerCar extends GroundTransport {
- private String bodyType, rimsType, tyresType, assembly, equipment;
- private int rimsRadius, acceleration;
- private Trailer trailer;
- }
- class Truck extends GroundTransport {
- private Trailer trailer;
- private String trailerConnection;
- }
- public static void main(String[] args) {
- System.out.println("Hello world!");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment