Tagged Questions
18
votes
2answers
925 views
Is it a good idea to provide different function signatures that do the same thing?
Here is a C++ class that gets constructed with three values.
class Foo{
//Constructor
Foo(std::string, int, char);
private:
std::string foo;
char bar;
int baz;
};
All of ...
10
votes
2answers
591 views
Design: Object method vs separate class's method which takes Object as parameter?
For example, is it better to do:
Pdf pdf = new Pdf();
pdf.Print();
or:
Pdf pdf = new Pdf();
PdfPrinter printer = new PdfPrinter();
printer.Print(pdf);
Another example:
Country m = new ...