New answers tagged object-oriented
2
votes
Matrix Class Implementation
I’m not going to do a full review, because the reviews you already have are excellent. I’ll just a few extra notes since you mentioned you are interested in next-gen, C++23-and-beyond best practices.
...
2
votes
Matrix Class Implementation
Overview
If your Matrix sizes are always known at compile time then you could potentially have written them to do compile time checking of dimensions. Of course if you use any dynamic input this ...
7
votes
Matrix Class Implementation
Use std::mdspan
Since you tagged the post c++23, consider using std::mdspan in your code. Not only can you use that internally ...
8
votes
Matrix Class Implementation
Missing all includes and the C++ version, so I had to make some guesses to get this to compile.
assert(rows >= 0);
assert(cols >= 0);
OK, but ...
3
votes
Declaring type definition once for all variables
I know that @radarbob says that your "class" in neither good style or acceptable, but I disagree. NOTE: this is NOT a critique of radarbob's answer. Rather, I am offering alternative ...
1
vote
Accepted
Declaring type definition once for all variables
Ah, after much back and forth I think I understand....
I haven't seen this kind of usage anywhere, is this style any good and acceptable?
No. No it's not. Be consistent with Type usage. If these ...
1
vote
Declaring type definition once for all variables
I haven't seen this kind of usage anywhere, is this style any good and acceptable?
enum Approach
If you mean the if else if structure... a ...
2
votes
Domain Driven Desing aggregate for ticket booking
The main issue I see is that you have implemented business logic in the entity but the bookTickets and cancelTicket themselves ...
1
vote
Domain Driven Desing aggregate for ticket booking
I will assume a given event hall can hold "many" people.
appropriate datastructure
...
3
votes
Accepted
Data structure to hold elements for script execution
say what you mean
and mean what you say.
Alice, when she's through the looking glass, is admonished by the March Hare:
you should say what you mean
and things go downhill from there.
...
1
vote
Builiding a Model from Stored Procedures
You are committing the same "code smell" sin with public abstract class ReportBase. All properties and no functionality.
The ...
2
votes
Builiding a Model from Stored Procedures
We commonly do it with "Meta-Information" hardcoded in the form of attributes.
This allows to derive all "Datamodels" from a baseclass,
which then implements the databse interface ...
Top 50 recent answers are included
Related Tags
object-oriented × 3801java × 720
python × 705
php × 654
c++ × 480
beginner × 474
c# × 452
javascript × 396
design-patterns × 380
python-3.x × 276
game × 206
performance × 140
classes × 134
inheritance × 107
algorithm × 94
mvc × 88
vba × 87
ruby × 84
playing-cards × 80
programming-challenge × 76
array × 67
tic-tac-toe × 67
mysql × 65
pdo × 63
jquery × 59