Problem I’ve created some controller for handling clicked links statistics. Does this class meet Single Responsibility Principle? class StatisticsController { […]
Tag: constructor
Should I set a license in the constructor or a static constructor?
Problem We are using the Aspose PDF library to work with PDF files. Aspose requires the license to be set […]
Review of three constructors for a String class
Problem I have the following declaration in my String.h file: private: char* nstring; int nlength; }; The following are three […]
Cleaning up PHP object constructors
Problem I have this annoying problem in PHP with faking overloading constructors. I understand the concept, but the code I […]
Workaround for overloaded constructor in PHP
Problem I have a class whose purpose is to display a comment. I’d like to be able to instantiate it […]
Count PDF pages in constructor
Problem I have an object that represents a PDF file. In the constructor, I pull out various information about the […]
In a Content Pane mouse movements are logged and shown
Problem I was trying to learn to develop plug-ins in Eclipse and after following the tutorial provided with Eclipse, tried […]
Initializing object by settings implemented as a class [closed]
Problem Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add […]
Setting instance variable for salary bonus based on academic position
Problem I have a class Scholar which is basically a teacher in a university. I have to calculate the yearly […]
Simple addition calculator accepting addition expressions
Problem Maybe someone can help me to optimize the calculate method. I think that it can be simplified from that […]