Which chunk of pseudocode has higher cohesion?
Example 1:
class MakeCar is
method makeWheels() is
return wheels
method makeEngine() is
return engine
method installEngine()
...
method installWheels()
...
Example 2:
class Wheels is
constructor of Wheels is ...
method installWheels() is ...
class Engine is
constructor of Engine is ...
method installEngine() is ...
class makeCar is
Engine eng = new Engine()
Wheels wh = new Wheels()
eng.installEngine()
wh.installWheels()