java - Picking a suitable class name for a randomiser -


i apologise firstly , foremost if have put in wrong place. believe inherent programming design decision, hence why here.

i working on android game has various classes related via inheritance.

i have coin object, , die object (as in single dice), die object has subclass, customdie (which allows user define die many faces, i.e. 7 sided dice).

since both coin , die have similar functions, coin picks random number between 1 , 2, , die between 1 , 6 , custom die between (n,m) or whatever range user has defined. thinking putting of functionality in parent class.

i not sure class called, perhaps along lines of randomgenerator or randompicker. suggests welcome.

i agree of answers based on opinions, there degree of knowledge required, i.e. use of verbs/nouns; pick class name. later affect choice of method names , other classes/variables used in project. , software architects converge on 1 or 2 of best suggestions, please dont write question off 1 cannot answered.

imagine has never seen code before, , have understand , fix bug. clearest possible name can give it, express , suggest parent class of coin , die?

i'd suggest avoiding verb-like names in case, since die or coin produce number - coin doesn't proactively generate numbers; must number. ending in -er, me @ least, doesn't suggest "parent class of coin or die".

tossable? randomvalued?


Comments

Popular posts from this blog

javascript - DIV "hiding" when changing dropdown value -

Does Firefox offer AppleScript support to get URL of windows? -

android - How to install packaged app on Firefox for mobile? -