Skip to main content
-4 votes
4 answers
278 views

In C++, pointers and optional's can both be used as the condition expression in an if statement: auto *ptr = get_ptr(); if (ptr) { std::cout << "Yay, can use ptr!\n"; } else { ...
einpoklum's user avatar
  • 140k
0 votes
0 answers
63 views

Suppose I'm writing a class intended not just for my private use, but for others to use as well (e.g. it's exposed in a library I'm writing or modifying). Let's suppose also that it's not a singleton. ...
einpoklum's user avatar
  • 140k
0 votes
1 answer
69 views

I am trying to create a simple S4 class that allows the storage of all necessary parameters to generate a semi-deteministic data synthetic set for another set of functions to act on. Ultimately, two ...
drJPK's user avatar
  • 1
1 vote
0 answers
111 views

Suppose I have the following class: template<typename T> struct A { T* ptr; }; and a bunch of functions which take this class as a parameter, e.g.: template <typename T> int one_two_three(...
einpoklum's user avatar
  • 140k
2 votes
1 answer
5k views

I'm trying to develop an attendance management system in vb.net with only 1 primary user which will be the professor. I try putting it in a class diagram but I'm not entirely sure if it's right. ...
Punkkk's user avatar
  • 31
0 votes
2 answers
81 views

I am creating a Blazor WebAssembly app, and I have two classes (shown below). In WorkDay I want to calculate how much I will pay in taxes by using PayRate from the Job class. How can I get this to ...
Yekusiel Allen's user avatar
0 votes
1 answer
904 views

class AccountClosureService( private val accountClosureRepository: AccountClosureRepository, private val userApplicationRepository: UserApplicationRepository, ){ // CRUD METHODS } interface ...
rahul.cs's user avatar
1 vote
0 answers
111 views

EDIT: Alright, the question does not seem to be suitable for the platform as there is no real technical background here. No problem (really, no sarcasm), I will look somewhere else for advice. Thanks ...
Markus Moll's user avatar
0 votes
2 answers
106 views

In the below sample code, how can we get rid of if-else ladder of concrete classes viz. NoProcesssorFoundError & UnknownError. I could extract an interface between Event1 and Event2 and pass their ...
user3239193's user avatar
2 votes
1 answer
520 views

I have a few questions regarding my design after having reviewed a number of information sources. I decided to link the User and UserSettings classes with a composition relation (since user settings ...
Smth_Unknown's user avatar
1 vote
1 answer
140 views

In class diagram representation, the fields and the class related methods are shown on the diagram. However, when converting the diagram to a class, I see that these methods are shown like an ...
Jack's user avatar
  • 1
2 votes
2 answers
119 views

There are 2 classes in the scenario under consideration, User and ConnectionRequest. The structures of the 2 classes are given below: User: fullName: String username: String email: String password: ...
Vineeth B V's user avatar
-1 votes
1 answer
95 views

When it comes to class diagrams, can an association or aggregation exist between two objects that are in composition with one base object? Example: Class Car has a composition relation with class ...
R.H.dev's user avatar
  • 21
1 vote
2 answers
141 views

This rings the "circular dependency" bell in my head. But I was wondering if there are known accepted use cases for this. Just to illustrate with some Python: class A: pass class B: ...
LoneCodeRanger's user avatar
-1 votes
2 answers
410 views

Temperature is measured mainly in three units: in degrees Celsius, degrees Fahrenheit and in kelvins. It’s easy to convert any of them to the two others: Kelvin to Celsius: C = K - 273.15 Celsius ...
Shulhin Denys's user avatar

15 30 50 per page
1
2 3 4 5
75