All Questions
Tagged with object-oriented design-patterns
380 questions
0
votes
1
answer
61
views
Bulk conditions evaluation throwing a single RuntimeException exception
Bulk conditions evaluation throwing a single exception of a configurable type for all unfulfilled conditions.
It is developed around several design patterns:
(1) fluent interface to configure the ...
4
votes
1
answer
104
views
Sequentially bidirectional find the indexes of an element into a collection (after second thought)
The util class to find all the indexes on an element into a Collection supports forward and reverse lookup starting from a given index along with changing the ...
1
vote
1
answer
284
views
Rules-engine to be improved/simplified for Efficiency (performance), Extensibility and Maintenance?
This is a simple implementation of a rules engine. I am really hating the very long MATCH/CASE function. I am wondering what kind of Design Patterns could be used there to make this code more ...
2
votes
1
answer
98
views
Semi-generic data loading utility class
The following implements a relatively generic and modular data loading utility. It loads images from a local storage given a lookup table. The data loader is parametrized via dependency injection to ...
5
votes
2
answers
415
views
Poker bets on Python
I'm writing poker for my bot in discord. So far I'm presenting an incomplete version of the project, which is only a betting system. The development took a lot of time, so I decided to ask for help. ...
1
vote
1
answer
98
views
My C++ implementation of the Factory Pattern
Please review my implementation of the factory pattern; it gives a trivial example. Feel free to point out anything I've missed or any code styling tips.
...
3
votes
1
answer
229
views
A library management system
Following is my code for a library management system. I am pretty new to OOD and trying to learn it. I am specially looking for ways where any design patterns can be useful here. I tried to make ...
1
vote
1
answer
70
views
Handling HTTP requests in existing Web Api
I am working in a Web Api project that has the following project structure:
Root
Controllers
Orchestrators
Managers
Services
etc
The ...
4
votes
1
answer
69
views
Terminal Graphical Visualizer, using a queue of different matrices
I built a project in which I provide a string input or a whole matrix to configure a frame, create a bunch of different frames and push them into a queue and finally print them in order of the queue.
...
3
votes
1
answer
97
views
Random generation of points for the graphs of 3 stock share parameters
I currently studying OOP and related design patterns, and tried to implement random data generation for some stock charts using OOP as an exercise.
This code randomly generates data points for 3 ...
-1
votes
1
answer
69
views
Object build while sequential read user input [closed]
The implementation reads sequentially the user's input changing the type to build according to user choices.
There are two main components a conditional structural sharing (...
3
votes
1
answer
104
views
Sequentially find the indexes of an element into a collection
Util class to find into a collection the indexes of a given element with multiple occurrences from the first index or relative to a given index.
...
1
vote
2
answers
90
views
Verification job with multiple type of batch verifiers
I have a use case where a verification batch job (non-generic) verifies domains based on its input e.g domain_type, batch_pointer etc. The verification handles it based on the domain type which uses ...
1
vote
1
answer
129
views
Business logic verification template
I have a use case of template design pattern with generics as mentioned below.
I have AbstractVerificationHandler that provides template for verification business ...
-2
votes
1
answer
305
views
Design a set to classes to report battery/power status of different Alexa devices
I was asked below quesion in Amazon sde2 low level design interview recently and I have shown below my solution during the interview. I was rejected in this round.
...