Questions tagged [class-hierarchy]

Class hierarchy refers to a set of classes and their inter-relationships.

A classification of object types, denoting objects as the instantiations of classes (class is like a blueprint, the object is what is built from that blueprint) inter-relating the various classes by relationships such as "inherits", "extends", "is an abstraction of", "an interface definition".

http://en.wikipedia.org/wiki/Class_hierarchy

276 questions
0
votes
2 answers

C++ class hierarchy

Please see first the code: class BM_FONT_CALL BMfont { public: BMfont(); ~BMfont(); bool Load(const std::string& fontName); void Print(float x, float y); class BM_FONT_CALL BMstring : public std::string { public: BMstring() { } …
mr5
  • 3,438
  • 3
  • 40
  • 57
0
votes
1 answer

How to handle multiple Android methods?

Ok, the question is. In my Android app I have two separate activities for options and for the main activity. There is the place in the main activity, when it checks for changes in options and applies the styles. It looks like this: if…
wswld
  • 1,218
  • 15
  • 32
0
votes
2 answers

How to design a class hierarchy

I'm designing a class hierarchy for a Java Project. It involves creating a class hierarchy to represent several bank accounts. Now, all bank accounts have a few attributes in common. These can be moved to an abstract class. However, there is one…
mahela007
  • 1,399
  • 4
  • 19
  • 29
0
votes
6 answers

C# events and class hierachy

I have the following classes Child class: public class ChildClass { ... private void EventHandler(...); ... } Parent class: public class ParentClass { ... ChildClass child; ... private void EventHandler(...); ... } Both of…
Alex
  • 9,891
  • 11
  • 53
  • 87
0
votes
1 answer

Understanding syntax of generics in Java

I started studying Java-generics. And I have some misunderstanding of the generics syntax and its meaning. I beg to treat with understanding if my question seems too trivial. You can write: public class MyClass {} and you can…
Mike Brown
  • 201
  • 3
  • 11
0
votes
0 answers

How to expose a native C++ type hierarchy to .Net using C++/CLI

I have different classes exported from native dll’s. The classes that is exported, inherit from multiple pure abstract classes (interfaces). The dll’s differ, in that the concrete class they export may inherit from different abstract classes. The…
badger the bold
  • 421
  • 2
  • 4
0
votes
2 answers

Nullpointerexcption & abrupt IOStream closure with inheritence and subclasses

A brief background before so we can communicate on the same wave length. I've had about 8-10 university courses on programming from data structure, to one on all languages, to specific ones such as java & c++. I'm a bit rusty because i usually take…
0
votes
1 answer

Collect class hierarchy of Flex application

I was wondering: If I have built a Flex application, is it possible to somehow collect it's class hierarchy using reflection or some other method? For example if I have defined components: CustomButton which derives from Button and RedCustomButton…
user1305056
0
votes
1 answer

Call subclass' method from list of base class objects?

Before I get to my question, here is a sample of the structure of my code: abstract class Entity { #region Declarations public string Name; public string Description; #endregion #region Constructor public Entity(string Name,…
rshea0
  • 11,769
  • 9
  • 27
  • 40
-1
votes
1 answer

Higher Class Hierarchy vs Wider Class Spectrum

I have a "Good Practice" Question: Lets assume a case where one have many List Types IObservableList With Events IReadOnlyList Read Only ISomeList Some List that perform additional operations Is it better to define 6 classes…
Tomer W
  • 3,395
  • 2
  • 29
  • 44
-1
votes
1 answer

create a base class object use a derived class constructor c++

Is someone can tell why A a = B(); call constructor fisrt and then destructor immediately? And why the output like this? C A C B D B D A test1 A D A class A { public: A() { cout<< "C A" <
xxbzzzz
  • 13
  • 2
-1
votes
3 answers

Alternatives to interface reimplementation

I'm reading the excerpt below from Joe Albahari's excellent "C# 9 in a Nutshell" and am trying to understand what's being described here in bold. Is anyone able to explain the alternative approach in a way that I can understand better? This seems…
-1
votes
1 answer

Error while inheriting from one nested class to another

//In file1.hpp class A { protected: class B { public: B(int a, int b) : c(a), d(b) {} private: int c; int d; }; }; // In file2.hpp Class C { public: class…
varconst
  • 15
  • 6
-1
votes
1 answer

Class hierarchy in Python

I have a relaisboard connected to an arduino via firmata protocol using Python bindings. The communication works without problems using pyfirmata (https://github.com/tino/pyFirmata). The relaisboard has 16 relais. Every group of 3 relais is a…
A.Giordano
  • 13
  • 1
  • 5
1 2 3
18
19