I have two applications communicating via RMI, a slave server (of which there will be multiple) and a master server.
Following good abstract design, I'd like to implement the slave in a way that it doesn't know that when talking to the master, it's using RMI (so that the two apps can also be run inside the same JVM, for instance):
publ...
I'm writing a Python program with a GUI built with the Tkinter module. I'm using a class to define the GUI because it makes it easier to pass commands to buttons and makes the whole thing a bit easier to understand.
The actual initialization of my GUI takes about 150 lines of code. To make this easier to understand, I've written the __i...
What is the purpose of abstraction in coding:
Programmer's efficiency or program's efficiency?
Our professor said that it is used merely for helping the programmer comprehend & modify programs faster to suit different scenarios. He also contended that it adds an extra burden on the program's performance. I am not exactly clear by what...
I know this is very abstract, however I believe it is very focused.
There are plenty of high-level languages today: C#, Java, VB, Python, etc., all created to abstract away low-level complexity and provide a more user-friendly programming experience. High-level languages can reduce, and most of the time completely remove, the necessity ...
Design philosophy question:
Suppose I have a user control which draws a graph of the characteristics of a collection of objects.
The control is placed on a form with a long-lived controller class that exposes the collection of objects to draw from.
The form also contains a control which allows to switch between 'modes' or different p...
Hi,
I am thinking about some issues which may match the term software integration best.
Assume there is a machine running an operating system and some programms A, B and C. Now all programms somehow store data on the filesystem. Lets say A uses Apache Derby, B uses PostgreSQL and B uses XML files.
Now there are three ways to store d...
What does the term "Leaky Abstraction" mean? (Please explain with examples. I often have a hard time grokking a mere theory.)
...
I've been checking out Cappuccino and Atlas lately, and they seem to have abstracted relative and absolute positioning away into something that just "works". I was wondering for those familiar with the project - how did they do this?
I've always thought that relative and absolute positioning is kind of an obscure way of thinking about p...
Does Encapsulation is information Hiding or it leads to information hiding??
As we say that Encapsulation binds data and functions in a single entity thus it provides us control over data flow and we can access the data of an entity only through some well defined functions. So when we say that Encapsulation leads to abstraction or infor...
Here is an example. I have two classes, one inherited, and both have a function with the same name, but different arguments:
public class MyClass
{
//public class members
public MyClass()
{
//constructor code
}
public void Copy(MyClass classToCopy)
{
//copy code
}
}
public class InheritedC...
So i'm having trouble figuring how to overcome this.
Take for example, i have a red black tree implementation that works with items:
typedef unsigned long int Key;
struct rbt_node{
Item item;
int color;
Key key;
struct rbt_node* parent;
struct rbt_node* left;
struct rbt_node* right;
};
then in an Item.h i defi...
Consider this example:
public interface IAccount
{
string GetAccountName(string id);
}
public class BasicAccount : IAccount
{
public string GetAccountName(string id)
{
throw new NotImplementedException();
}
}
public class PremiumAccount : IAccount
{
public string GetAccountName(string id)
{
thr...