final class SingletonMain {
    public static void main(String[] args) {
        System.out.println("Wzorzec Singleton: tylko jeden silnik"); 
        var engine = OnlyEngine.getInstance();  
        var vehicle = OnlyVehicle.getInstance();
    
        vehicle.move();
        System.out.println("""
            OnlyEngine:'%s', tożsamy z silnikiem pojazdu:'%s'"""
                .formatted(engine, (vehicle.getEngine().equals(engine))));
    }
}
