As the title says, Im thinking if it’s a good practise to have classes that have Open and Close methods in the sense that they can be reused without a new instance being created ..
Tag : object-oriented-design
I’m creating images with centered text. I use Python but I’m faced with many question regarding how to write my class.
I know..
One part of my program fetches data from many tables and columns in my database for processing. Some of the columns might be null
, but in the current processing context that is an ..
I have to design a simple server-client model for the billing system of some fictitious restau..
For the company I work at, all of our projects,
including a new one started last year, are written in C89.
We write for vxWorks (a real time embedded operation system).
Our software runs multi-threaded through various spawned “..
High-level explanation I have an object with some methods: public class Foo { public void Bar() { } public void Baz() { } } These methods cannot be executed unconditionally, there is some validation to be done. I’d also like to expose these conditions to a client (user) in some way. I could do this ..
Closed 5 years ago
In my application I have a class, and each instance of this class shares part of an unmanaged resource. Sharing is facilitated by a manager o..
Let’s say that I have an ArrayList of class Person and I have two objects that are generated from two different classes which read and write to this Arra..
I know it is lot of code. But I am trying to understand the concept of Factory pattern with interfaces and base class. I have a base class of Car that implements an interface which will be implemented by every derived ..