Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I have a bunch of methods that are commonly used everywhere. Right now the codef

ID: 642845 • Letter: I

Question

I have a bunch of methods that are commonly used everywhere. Right now the codefile is named globals, to represent the fact that they are... in fact... global.

However, I do not like this.

I want to group these into a class and pass an interface around. I'll make only one instance, but I'm not falling into the singleton trap here.

First of all, what should I name the class. I want to avoid the globals name because I'm afraid maintainers would get the wrong idea.

Also, how should I consider splitting up such a set of methods so that behavior can change and adapt?

The set of methods contains stuff like:

Conversion tables
Clipboard interaction
Managing built fonts
Common drawing methods
Providing an interface with access to often used resources

Explanation / Answer

The namespace could be [application].Common.Shared

Classes could be named:

ConversionLookup
ClipboardCommunication
FontManager
DrawingUtility
I would break up the classes because it sounds like they do different things.