Questions tagged [class]

A template for declaring a type of object.

9 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
3
votes
0answers
246 views

How to build child classes as parent configuration?

I'm using Codeigniter PHP Framework for developing a web application, and when developing an admin zone, I've ended building a generic parent class called AdminController which is extended by the ...
1
vote
0answers
60 views

Program and Class Design

I am hoping you may be able to give me some advice on class design and what would be best for the program I'm currently writing. This is being done in Java and the goal is to generate letter data ...
1
vote
0answers
824 views

Should I use a closure instead of a class when I only have one method?

Lets say I have a JavaScript class that takes a whole lot of settings in the constructor, and then only have one method that the user of the class might want to call multiple times. Here's an example: ...
1
vote
0answers
122 views

Should all classes and interfaces ultimately derive from one Class, and how does this affect type safety?

If I have "Object" as the top level class, then I have various interfaces, ISomething, ISomethingB, ISomethingC, then I have Class x,y,z, all ultimately deriving from the class Object (these ...
1
vote
0answers
4k views

ASP.NET: Creating an interface for a controller

Would creating a controller's interface a bad idea? I have a controller that derived from ApiController, so knowing that you can only derived one class to a class but able to derived one or more ...
0
votes
0answers
831 views

Class design for Token, TokenType and regex constants

For use in a lexer class a have a class Token which represents a token of a specific type and its value, while the types are defined by the enum TokenType in which every token holds its own regular ...
0
votes
0answers
52 views

Internal class variables convention

When I see some open source projects, specifically classes, I see that its variables starts with a 'm' minuscule. What does it mean? What means the 'm'?
0
votes
1answer
393 views

Instantiate a class from a config file. Where should the parse function go?

I have a class in python that is instantiated from the values of a (json) config file. I was wondering what is the best practise to do that (if there is a best practise and is not just a matter of ...
-1
votes
1answer
131 views

Memory override using classes when using lists in python

I am trying to create a new variable with class Lamb (called hold) using a variable (main), which also has class Lamb. Lamb has two parameters (x and y). I create a variable called main with class ...