All Questions
5 questions
2
votes
2
answers
4k
views
Module with globals or Class with attributes?
Currently I'm working with a lot of modules where the original developers used global variables to control states and to exchange important information between functions, like so:
STATE_VAR = 0
def ...
0
votes
1
answer
234
views
Limitations of using classes as interface
I am an Electrical Engineer now training and working as an embedded software developer, so I have little formal computer science and software design training. I have until a few months ago only worked ...
50
votes
5
answers
62k
views
When and why to use Nested Classes?
Using Object Oriented Programming we have the power to create a class inside a class (a nested class), but I have never created a nested class in my 4 years of coding experience.
What are nested ...
1
vote
2
answers
140
views
When to store values in constants/finals
This might seem like an odd question, but I'm worried that I'm putting too many things as constants/finals at the top of my java class. I've started to put every value that is in my program into a ...
36
votes
5
answers
68k
views
Is it a good practice to create a ClassCollection of another Class?
Lets says I have a Carclass:
public class Car
{
public string Engine { get; set; }
public string Seat { get; set; }
public string Tires { get; set; }
}
Lets say we're making a system ...