|
I have a set of classes which have similarities and differences. They derive from an interface, which defines the unique behaviour amongst these different classes, and a base class to call the common functionality in the several classes.
Is there a design...
Started by dotnetdev on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
Having classes that have some similar behavior and some different behavior is the essence of inheritance... .
Http://en.wikipedia.org/wiki/Specification_pattern
It's not clear to me what advantage your interface is giving you .
Specification pattern will help you.
|
|
I'm looking for a way to emulate virus-like behaviour for testing exclusions in anti-virus software. Can anyone recommend some behaviour that I can put together in a quick script which would trigger a typical realtime anti-virus scanner?
Started by Wayne Koorts on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
Want to hand-code virus-like behaviour, I can tell you that I've had trouble with anti-virus.
|
|
How to add marquee behaviour to text of JLabel ?
I have tried this
JLabel search = new JLabel("<html><marquee>Search</marquee><html>");
but its not working.
Started by nicky on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
How to add marquee behaviour to Jlabel !Java")); jFrame.setVisible(true); } }.
|
Ask your Facebook Friends
|
In questions about things not to do in C++ such as dereferencing a dangling pointer or calling delete twice for the same address I often see the statement that it's undefined behaviour and anything can happen - the program can overwrite the system disk...
Started by sharptooth on
, 16 posts
by 16 people.
Answer Snippets (Read the full thread at stackoverflow):
If undefined....
Not a very great one but still), anyway, it is meant to emphasize the nature of the behaviour allowed to see in the case of undefined behaviour is the kind of things that you would expect such as memory on the circumstances.
|
|
I am designing a utility to backup applications.
The backup functionality will contain both common tasks to do (common code) and some unique steps. Am I on the right track by using an interface for the unique behaviour and an abstract base class for the...
Started by dotnetdev on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
If the base class actually implements some behaviour then I think it's called a non -abstract base.
|
|
In WCF, what is the difference between a Behaviour and a Contract ? From examining the config file, both seem to point to the interface of the service functionality. Why are they both needed?
Started by CraigS on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
The Behavior is an implementation of that interface on the host -- for ... .
The Contract is the interface -- it defines the service operations exposed by the WCF service, which may or may not correspond 1:1 to an unadorned code interface your application .
|
|
Many of our system tests are written in a BDD style, and we make decent use of inherited behaviours to minimise duplication, for example this might be a basic hierarchy for purchase tests.
class BehavesLikeSuccessfulPurchase class BehavesLikePurchaseWithValidCreditCard...
Started by Greg Beech on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
And then in another class, specify
Behaves_like<SomePredefinedBehaviour> some_predefined_behaviour;
more than once in the specification, allowing you to inherit behaviour from as many classes as you like, but it does support the ....
|
|
The default input behaviour of the DateTimePicker when entering a date is like this:
YYYY(Right Arrow)MM(Right Arrow)DD
The user want to enter the date like this:
YYYYMMDD
Is there any simple way of modifying the input behaviour of the DateTimePicker ...
Started by izokurew on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Use a textbox and....
Expanding on PoweRoy's answer.
I don't know how you use the DateTimePicker but what about using a simple editbox? (and validate date when a date is entered)
DateTimePicker is mostly used to choose a date without entering any number .
|
|
The same as this question but for java
Update Based on the comments and responses of a few people, Its clear that Java has very little undefined behaviour.
So I'd like to ask as well what behaviour is not obvious. Please when answering make the disticnction...
Started by hhafez on
, 9 posts
by 9 people.
Answer Snippets (Read the full thread at stackoverflow):
:)
Also:
Overriding methods and expecting them to be used in the same way between versions Assumptions about underlying platform (file separator, for instance) Details of garbage collection/finalisation Some details about... .
Anything to do with threads...
|
|
What I do, in NetBeans for example:
create a UI component class, suffixed with Swing component type, e.g. JPanel, e.g. MyUIWidgetJPanel create a logic/behaviour class to handle the behaviour/logic, i.e. what happens when the UI component is used, e.g....
Started by Rob on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
You can....
The UI classes shouldn't contain logic - only the code needed to display the interface .
Essentially it seems to be what you do: create a class which encompasses the logic, separate to the UI class .
I tend to use the Presentation Model Pattern.
|