class-design
Copying Methods from Member
I have a simple, low-level container class that is used by a more high-level file class.Basically, the file class uses the container to store modifications locally before saving a final version to an[详细]
2023-03-04 07:00 分类:问答What would be the benefit of an interface which implies a certain implementation?
I\'m looking at this: public interface IAjaxCallbackEventHandler : ICallbackEventHandler { string CallbackResponse { get; set; }[详细]
2023-03-04 06:41 分类:问答Defining a class in Python
class Car: pass class Car(): pass What is the difference between these two开发者_Python百科? and, a = Car[详细]
2023-03-03 20:50 分类:问答What mechanism is used to allow one to call methods defined in ruby root scope from that scope?
In ruby, when one defines a method in the root scope, it can be called from that scope: def foo \"foo\"[详细]
2023-03-03 18:40 分类:问答OOP design problem: responsibility in containee or container?
I focus a lot on making my software design flexible and reliable, and one of the key concepts to achieve this is encapsulation.[详细]
2023-03-03 14:11 分类:问答What is the best way to keep track of class instances in Objective-C?
I am making an app that uses a class I will call Player the number of Player instances can go up to 10 and down to 2. I am wondering what is the best way to keep track of all of these instances? For n[详细]
2023-03-02 17:36 分类:问答Java: How to think about Modelling a Markov Chain?
I have a program tha开发者_运维问答t I am trying to make a Markov text generator for. I plan on splitting some text up at a set interval and then storing that into a class. The problem that I don\'t k[详细]
2023-03-01 15:49 分类:问答What are other PHP class designs for DB object interactions?
I have a table called \"User\" that holds user info. I\'ll call my userclass and create a user object so that I can grab whatever info is needed for that user.[详细]
2023-03-01 14:46 分类:问答Class Design - Member variables and properties - Declaration
In my quest to develop some coding \"best practices\" for myself I would like to ask people how they arrange class member variables and getter/setter properties within their class definition. I have s[详细]
2023-03-01 07:31 分类:问答PHP Classes, Do people use them to build a website? [closed]
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references,or expertise, but this question will likely solicit debate, a[详细]
2023-02-28 15:39 分类:问答