Skip to main content

Questions tagged [object-oriented-design]

Object-oriented design is the process of planning a system of interacting objects for the purpose of solving a software problem.

2 votes
3 answers
228 views

So I have this setup with a factory: class Base; class A : public Base; class B : public Base; ... class Factory { public: Base* CreateBase(std::string TypeToCreate, const Parameters& P) ...
sayanel's user avatar
  • 509
1 vote
2 answers
269 views

I am currently reading about domain-driven design and n-tier architecture with a service layer, and comparing them to try to understand how each architecture is executed. For n-tiers (specifically 3-...
Errors for life's user avatar
1 vote
6 answers
303 views

In a certain program I would like to have three objects, say, a, b, and c, with c being a shared private member (sub-object) of a and b. The data between the three objects shall only go this way: a &...
Alexey's user avatar
  • 968
1 vote
1 answer
119 views

Let's say I have the following Java code: public record Person(String firtName, String lastName, int age) {} Can it makes sense to have instead: public record Person(FirstName firtName, LastName ...
Nyamiou The Galeanthrope's user avatar
1 vote
3 answers
276 views

Normally an N-Layered application is structured as follows. User Interface layer Business Logic Layer Data Access Layer DAL contains objects (data containers) representing business entities. The BLL ...
EMN's user avatar
  • 795
10 votes
11 answers
4k views

One of the motivations for separation of concerns is so a change in one place does not affect the other. I am going to make an argument with my limited understanding. Here is a scenario where I fail ...
EMN's user avatar
  • 795
5 votes
5 answers
977 views

I'm designing a system with different types of components, and I'm trying to decide whether to use polymorphism or instanceof checks for handling type-specific behavior. I see two possible approaches: ...
user avatar
0 votes
1 answer
154 views

This question is for LabVIEW 2019. Highlighting that fact first because some of the "standard" object-oriented techniques like interfaces, type inference, template specialization, etc. aren'...
Chuck's user avatar
  • 119
3 votes
0 answers
264 views

I'm working on a project that uses an in-house library, which is also used by other projects. There are some classes and methods in other classes that are not used outside the library itself, is there ...
ulitosCoder's user avatar
3 votes
4 answers
2k views

I have a stack of custom Row widgets. Each of them is a label with some editComponent (often a JTextComponent). Rows are aware of their previous and next siblings (if a Row has no such sibling, the ...
Sergey Zolotarev's user avatar
2 votes
5 answers
296 views

I have a class that looks like: class Vehicle: coordinates: GeoCoordinates speed: float rpm: float egt: float // 100+ other parameters A repertoire of concrete classes that use ...
keelerjr12's user avatar
  • 1,273
1 vote
3 answers
312 views

I am building a c++ project that will allow users to essentially model and create their own fleet of cars. Right now, the approach I have in mind is a Car Factory Class that will implement all of the ...
J K's user avatar
  • 27
2 votes
3 answers
1k views

I've been considering the way to solve this problem for a while, and I'm currently stuck between two options I both feel are suboptimal. Here's an abstract example of what I'm dealing with: I have a ...
pulpicated's user avatar
0 votes
2 answers
186 views

I want to design a two-party protocol that runs on two different processes; each process is one party of the protocol. My implementation of a Protocol looks as follows: enum class Role { P1, P2 }; ...
Mahyar's user avatar
  • 21
2 votes
3 answers
557 views

Imagine I have a factory that must create object based on unknown input (let's say user input). class Base; class MyFactory { static unique_ptr<Base> CreateBase(Input& input); } Now this ...
sayanel's user avatar
  • 509

15 30 50 per page
1
2 3 4 5
117