class-design Questions

2

Solved

I'm currently working on a SSIS package and after the 80th time using FireInformation inside a Script Task, I have to wonder: why would the method require you to pass in a ref boolean as its last p...
Weisshorn asked 7/10, 2010 at 14:28

1

Solved

this is a folow up to this https://softwareengineering.stackexchange.com/questions/256241/c-coding-practice-class-vs-free-functions question I posted a few day ago. In short, the idea is to create ...
Physoclistous asked 24/9, 2014 at 7:14

11

Solved

Which class design is better and why? public class User { public String UserName; public String Password; public String FirstName; public String LastName; } public class Employee : User...
Brose asked 2/9, 2008 at 4:34

2

Solved

I'm using the composite pattern to have reusable elements to build a page. for this i have a simple interface which drives the pattern interface Ai1ec_Renderable { /** * This is the main functio...
Inutility asked 10/8, 2012 at 20:11

5

Solved

public class Parent { .... } public class Child1 extends Parent { .... public void foo() { .... } } public class Child2 extends Parent { .... public void foo() { .... } } Here method f...
Edea asked 6/5, 2014 at 8:55

1

Solved

So, I will do my best to explain this question... Basically, I have a GUI whose main window has several buttons on it (probably about 10). I am putting the buttons themselves in an array, but when...
Kevyn asked 1/5, 2014 at 1:17

1

Solved

I'm creating my first Android app. I have avoided to label associations with user or system interactions (e.g. I have labeled starts instead startsWhenClick; I have labeled starts instead startsWhe...

8

Solved

Answering this question: How to GUI - Using paintcomponent() to initialize a GUI and then to add GUI based on mouse I've stated this: You don't override paintComponent() properly. This is a prot...
Tupi asked 24/1, 2014 at 16:54

1

Solved

When is a class with no methods poor design? From what I've read, a class with no methods (i.e. no behaviors) (AKA dumb class) is poor design, with the exception of Data Transfer Objects (DT...
Foretop asked 15/1, 2014 at 3:36

2

The problem is quite simple. If a class B inherit a class A and wants to override a ´classmethod´ that is used as a constructor (I guess you call that a "factory method"). The problem is that B.cla...
Cero asked 4/1, 2014 at 18:44

6

Solved

I've had some really awesome help on my previous questions for detecting paws and toes within a paw, but all these solutions only work for one measurement at a time. Now I have data that consists ...
Slither asked 17/11, 2010 at 9:43

5

Solved

I am using a Python based API where there are lots of functions to query things, like doesPointExist, findPoint, canCreateNewPoint, etc where the negative result throws an exception. This makes the...
Retrogression asked 20/11, 2013 at 13:36

2

I'd like to get your advice for a design. I've got an Oven controlling the temperature and I'm doing some temperature dependent measurements. I'm basically setting the temperature, measure some stu...
Clie asked 7/11, 2013 at 19:39

1

Solved

I want to initialize a class member which is also another class object.The problem is that, I have to initialize the member with variables that I figure out after doing some operations on my constr...
Inversely asked 13/10, 2013 at 12:11

4

Solved

I've coded a simple configuration class for my own framework. There are simple functions like get(), set() or loadFile(). But all functions and variables are static. And now I want to implement a...
Tilford asked 8/8, 2011 at 15:24

2

Solved

My CTO (Chief Technical Officer) asked me to come up with a way where he could write one single function in the base class, and have access to the all the properties of the child class. Here is wha...
Salzburg asked 30/7, 2013 at 5:52

5

Solved

I am developping a class library. I have an abstract base class Matrix for matrices that provides implementations for some of the basic methods. Derived from Matrix are concrete subclasses for d...
Painty asked 3/11, 2012 at 9:36

11

Solved

I've seen this de facto standard in many places in many languages, but I've never understood it - why put your private fields and methods at the top of a class declaration? Metaphorically it seems ...
Heindrick asked 22/4, 2009 at 17:12

13

Solved

I am trying to wrap my head around object oriented programming. My understanding is that we have objects so we can design our programs to mirror real-life objects. Let's take a class hierarchy: ...
Cumulative asked 16/11, 2009 at 7:52

2

Solved

I've been working on a way to prevent user of using a class without smart pointers. Thus, forcing them to have the object being heap allocated and managed by smart pointers. In order to get such a ...
Drynurse asked 16/6, 2013 at 15:38

2

Solved

I'm trying to create a folder/file system similar to the ones used in most OSes. Basically I've figured out that I should use three classes; File, Folder, and a common base class. Let's call it Com...
Dulcy asked 9/6, 2013 at 19:28

5

Solved

I read at many places that singletons can use interfaces. Some how I am unable to comprehend this.
Florri asked 30/9, 2009 at 9:23

2

As i read through UML specification that: class has a set of attributes/operations and data type has a set of attributes/operations 1)with regards to attributes/operations of data type what thi...
Soerabaja asked 3/4, 2013 at 6:36

9

Is there a limitation on number of properties, methods a C# class can have? I do a quick skim at Standard ECMA-334 and did not find any information on it. Before jumping into why a class with man...
Ruysdael asked 12/9, 2009 at 17:30

5

Solved

In my web app I use several CSS classes to write less code. I use them quite often in the markup to add single property or two in some cases. These are the following .clear { float: none; clear: ...
Bipack asked 23/11, 2010 at 17:6

© 2022 - 2024 — McMap. All rights reserved.