Skip to main content
Stack Overflow
  1. About
  2. For Teams
Filter by
Sorted by
Tagged with
2 votes
1 answer
105 views

While reviewing some testing code, I have come across this situation: Suppose we have these two classes: class Project { public: Project(std::string path); ~Project; // [many more ...
0 votes
1 answer
102 views

Here is the code: class A: pass class B: pass class Example(A, B): pass ...a lot of method # new class B called BPlus class BPlus: pass # want a new class Example that base on (A, BPlus) but ...
-2 votes
4 answers
96 views

I have two classes: a non-generic base class Node and a generic derived class Node<T>. The nodes build a chained list, each node containing eventually a different data type. public class ...
5 votes
5 answers
194 views

Now, if the title sounds weird to you, consider this code, I was reviewing today (simplified): public class MyService( IHttpClientFactory httpClientFactory) : BaseService(), // WTF? a ...
Marcel's user avatar
  • 15.8k
0 votes
1 answer
73 views

Circular imports can drive you mad in Python. Here's one I'm too stupid to solve. I have a base class with lots of functionality, that needs to emit itself, and also all kinds of its sub-classes: # ...
0 votes
1 answer
33 views

I'm checking some C++ code pattern via clang AST and run into a problem. Consider following code: template<typename T> class Base { }; template<typename T> class Derived1 : public Base<...
0 votes
0 answers
71 views

I am now studying the concept of OOD and I have created a program for a pizza shop. The base class here is pizza. I want to put a spicy characteristic for pizza as an interface, but I find a problem ...
0 votes
1 answer
92 views

Let's say i have two projects in Visual Studio. The Base project and a Derived project. The base project contains a base class: Public Class Car Property Name As String End Class and a generic ...
0 votes
0 answers
85 views

I have some questions from object oriented design. If I want to define a base class Path, which has two subclasses File and Dir, Path provides the validate method and the from_str method. For some ...
-3 votes
3 answers
101 views

I have the following code: class Demo: def __new__(self): self.__init__(self) print("Demo's __new__() invoked") def __init__(self): print("Demo's ...
DCR's user avatar
  • 15.8k
1 vote
0 answers
280 views

I want to create a base component in my angular app from which other components will extend. I want to use for html, ts and scss a seperate file. In this base component I want to create depending on ...
Stefan's user avatar
  • 41
0 votes
1 answer
98 views

I wonder whether I could initialze a final field in an abstract base class with the result of an abtract method, which would be implemented by the derived class. I understand that derived ctor would ...
1 vote
0 answers
69 views

In the section "11.9 Member access control" of the C++20 Standard there is provided an example (p.#7, example #2) of using a protected inner class of a class as a base class for a derived ...
0 votes
0 answers
278 views

In order to be sure that it's .NET 7 (.NET Core) related, I created a project with .NET 4.7.2 with a generic base form and a derived one. Both can be opened and are shown properly. Only in .NET 7 it's ...
-1 votes
1 answer
47 views

My project is to create a dive logbook. There is the DiveInfo base class and Equipment derived class. The equipment may change from dive to dive, so obviously it needs to get the variables for ...

15 30 50 per page
1
2 3 4 5
...
46

AltStyle によって変換されたページ (->オリジナル) /