I\'m new to OOP and just wanted to know, within a class, when should you pass parameters to the constructor as opposed to methods other than the constructor?
Closed. This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing th
I\'ve got an outline of a HashTable class I\'m trying to make.I\'m getting 3 errors output from Visual Studio, but I can\'t see the problem here.I\'m fairly new to OO in C++ so it\'s probably somethin
public MyClass(Integer userId, Integer otherId) { if(!userId.equals(otherId)){ this.userId = userId; this.otherId = otherId;
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references,or expertise, but this question will likely solicit debate, a
I was going through code samples of Begining C# 3.0 and followed the sample code along. When I have created a public/protected method then I was able to access that method using the object of derived
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references,or expertise, but this question will likely solicit debate, a
I know there is no late binding for class attributes. But i need a good pattern to do this: #include <cstdlib>
I want to have a typedef in my base class to be specialized to each class derived from this base class. code:
Let\'s say I have two classes, A and B, in turn have some methods, something() and nothing() and an instance of B is created in A, as