You should only ever override methods if you want to add/change something to/in them. To me it looks like you’re overriding methods because you want to use them in other objects?
If you want to access the methods from other objects you should either 1) make the class that has them static 2) make the methods static 3) give a reference of that object to the objects that need to use the methods.
#1 and #2 are for lazy people (me). (Try to make as little static classes as possible).
#3 is true clean good OOP design. I.e:
UtilityObj util = new UtilityObject();
LittleObject lilObj = new LittleObject( util ); // pass the lilObj a reference to your utility object so that it can access the "util" objects public method
E.g:
// LittleObject's constructor
public lilObj( UtilityObject ob ) {
this.ob = ob; // save the reference for use in other methods of this class.
myName = ob.getRandomName();
}
There’s also another option #4 where you create a non-static class (because you want to avoid creating static classes) but you give the class a static method for accessing the objects reference. (My description is bad, search google for “Singleton” for more detail).
#4 e.g:
public class MySingleton {
private MySingleton mySelf = null;
private MySingleton() {
// Make constructor private =
// nobody else can create a new MySingleton but itself
}
public static MySingleton get() {
if (mySelf == null) {
mySelf = new MySingleton();
}
return mySelf; // So that other classes can get a reference to this object
}
}