Questions tagged [object-oriented-design]

Object-oriented design is the process of planning a system of interacting objects for the purpose of solving a software problem.

Filter by
Sorted by
Tagged with
2 votes
1 answer
362 views

Are XML databases good for small to medium non-programming business project management?

Last couple of weeks I've been searching for some project management solution for a place where I work at the moment. There we rely on excel spreadsheets, but we meet limitations like access rights ...
user avatar
15 votes
5 answers
2k views

How are mock objects commonly misused?

I read an article recently which said that mock objects are often misunderstood and misused. Are there any clear mocking anti-patterns which I can look out for?
user avatar
  • 6,490
11 votes
7 answers
3k views

From a design perspective, what are the best practices for logging? [closed]

I want to add logging to an application I'm currently working on. I've added logging before, that's not an issue here. But from a design perspective in an object-oriented language, what are the best ...
user avatar
5 votes
2 answers
125 views

Simplified Interfaces or Object Abstraction

i've been facing a common situation at work that has happened quite often when handling objects. The situation goes like this: You have to realted classes A and B, class A has an instances of class ...
user avatar
  • 2,088
21 votes
11 answers
30k views

When should you use a private/inner class?

To clarify, what I'm asking about is public class A{ private/*or public*/ B b; } vs. public class A{ private/*or public*/ class B{ .... } } I can definitely think of some ...
user avatar
4 votes
5 answers
6k views

Software design for procedural programming [closed]

Right now, I'm trying to learn a well documented software engineering. I knew that if we code using Object Oriented concept, we can do software design concept using UML. But what if we code using ...
user avatar
16 votes
2 answers
2k views

Design: Object method vs separate class's method which takes Object as parameter?

For example, is it better to do: Pdf pdf = new Pdf(); pdf.Print(); or: Pdf pdf = new Pdf(); PdfPrinter printer = new PdfPrinter(); printer.Print(pdf); Another example: Country m = new Country("...
user avatar
  • 1,511
41 votes
6 answers
28k views

Why avoid Java Inheritance "Extends"

Jame Gosling said “You should avoid implementation inheritance whenever possible.” and instead, use interface inheritance. But why? How can we avoid inheriting the structure of an object using ...
user avatar
  • 791
1 vote
7 answers
796 views

Quick OOAD Question

Given the following set of classes: Camera, Photo, Photoshoot, Subject. How would they interact to model the following sentence? The next subject is called and has their photo taken. I want to see ...
user avatar
  • 203
12 votes
10 answers
9k views

What is the point of properties?

Here are some arguments for properties and my counter-arguments: Easier to use than writing getter and setter methods Getter and setter method pairs are a code smell. Making it easier to write ...
user avatar
  • 345
7 votes
3 answers
3k views

Duplication in parallel inheritance hierarchies

Using an OO language with static typing (like Java), what are good ways to represent the following model invariant without large amounts of duplication. I have two (actually multiple) flavours of the ...
user avatar
8 votes
10 answers
3k views

What should be first - functionality or design? [duplicate]

I've started reading a book from Head First series about OOP and Design. In a first chapter it is stated I have to worry about design of my application just after basic functionality is ready. Basic ...
user avatar
  • 708

1
29 30 31 32
33