Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OCC metric realization issue #518

Open
iMaks99 opened this issue Apr 22, 2021 · 0 comments
Open

OCC metric realization issue #518

iMaks99 opened this issue Apr 22, 2021 · 0 comments

Comments

@iMaks99
Copy link

iMaks99 commented Apr 22, 2021

OCC implemented in jpeek returns results that do not correspond to theoretical definition in A proposal of class cohesion metrics using sizes of cohesive parts. In example class, metric returns 0.1667 instead of 1, because setters in jPeek do not relate to the getResult method.

class CarManualBuilder implements Builder{
	private CarType type;
	private int seats;
	private Engine engine;
	private Transmission transmission;
	private TripComputer tripComputer;
	private GPSNavigator gpsNavigator;
 
	@Override
	public void setCarType(CarType type) {
    	    	this.type = type;
	}
 
	@Override
	public void setSeats(int seats) {
    	    	this.seats = seats;
	}
 
	@Override
	public void setEngine(Engine engine) {
    	    	this.engine = engine;
	}
 
	@Override
	public void setTransmission(Transmission transmission) {
    	    	this.transmission = transmission;
	}
 
	@Override
	public void setTripComputer(TripComputer tripComputer) {
    	    	this.tripComputer = tripComputer;
	}
 
	@Override
	public void setGPSNavigator(GPSNavigator gpsNavigator) {
    	    	this.gpsNavigator = gpsNavigator;
	}
 
	public Manual getResult() {
    	    	return new Manual(type, seats, engine, transmission, tripComputer, gpsNavigator);
	}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants