Python class - chaining instance methods

I've started to build my class in this fashion (more like a regular function): ex 1 class Child(Parent): def __init__(self,user): Parent.__init__(self, user) search = api.search() filter = api.filter(search) ...
more »

2017-01-03 20:01 (4) Answers

Passing a class and calling a method on it

Consider a class extending Fragment called MyFragmentClass which has newInstance(args) implemented. What I want to do is make a getter for anything extending MyFragmentClass so I can make a new Fragment via newInstance(args). Something like: <T ...
more »

2016-10-30 21:10 (1) Answers

class constructor that calculates input using C#

Hello and thanks for checking my post. New to C# and Oop in general. Learning has been smooth so far but I'm running into issues when I try to create (and call) a constructor that calculates data input by user. If possible: I would like to create 3 ...
more »

2016-10-23 07:10 (4) Answers

MessageShow in another class?

This is my first time trying to implement separate class into form class, rather than just having it all in the form class. How do I go about connecting the two? When the button is clicked, I wanted to be able to have it show the letter grade with Me...
more »

2016-10-18 23:10 (2) Answers

Cannot instantiate class inside itself

I'm writing a blackjack program in Java and I've come across a problem when learning to using inner classes. I'm attempting to instantiate a Blackjack object inside itself to call the inner class Card's methods, but the program cannot find the Blackj...
more »

2016-10-07 09:10 (1) Answers

Instantiate generic type from variable

I would like to instantiate a new object where the type and generic type are defined as variables. The final result could look like the newListOfObjects created manually here: var newListOfObjects = new List<TabViewModel>(); Where TabViewMod...
more »

2016-10-06 09:10 (2) Answers

Class vs Local instantiation

Is there a difference in class and local instantiation when the first one is not obligatory (usually when i can finalize them)? Is there a "rule" i should follow? I have developed the habit to always instantiate other classes using class instantiati...
more »

2016-10-03 18:10 (3) Answers