File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes OO, Patterns, UML and Refactoring and the fly likes Biology and Objects Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » OO, Patterns, UML and Refactoring
Bookmark "Biology and Objects" Watch "Biology and Objects" New topic
Author

Biology and Objects

William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12678
    
    5
I just wanted to comment on how background affects the way you approach objects.

My interest in ecology and ecological modeling made it very easy to pick up computing with objects. Biology is full of hierarchical concepts and object orientation in ecological simulation is a good fit. Of course, Simula, the first object oriented language was created for simulation of complex systems.

Bill

Java Resources at www.wbrogden.com
Matt Weisfeld
author
Greenhorn

Joined: May 01, 2013
Posts: 24
    
    5
I find it really powerful to use biological examples when I am developing content for educational purposes. People seem to remember programming concepts when using examples like these.


Matt Weisfeld
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60053
    
  65

Interesting.

William or Matt, could you give an example?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12678
    
    5
Howard T. Odum had a major influence on ecological system simulation with his energy flow diagramming.

Entities in these diagrams illustrate OOP principles - they hide the internal details and provide specified inputs and outputs. Furthermore, and relevant to OOP in general, an Odum diagram provides something you can point to and explain when discussing the system to non-ecologists (non-programmers). We used them in environmental impact studies for that very reason.

Bill
Matt Weisfeld
author
Greenhorn

Joined: May 01, 2013
Posts: 24
    
    5
I am not sure that this is exactly what you are looking for, but you can use a hierarchy of birds. When you ask people to describe the most common behavior of birds almost everyone would say 'flight". However, not all birds fly. So you would have to decide if you want to create a Bird class that doesn't include a "flight" method. Perhaps you would need 2 classes, FlyingBirds and FlightLessBirds that inherits from the Bird class. There really is no right or wrong way to handle the design - it just makes for interesting discussions. Not all dogs can bark either.
Junilu Lacar
Bartender

Joined: Feb 26, 2001
Posts: 4419
    
    5

Matt Weisfeld wrote:Not all dogs can bark either.


Some goats scream like humans... it's freaky funny. Seriously though, while relating real-world concepts to OO designs can produce some very natural relationships, there are also pitfalls that you need to avoid. The classic example being A Square is not a Rectangle. I saw that there are sections in the book about Composition and Inheritance and how Inheritance weakens encapsulation.


Junilu - [How to Ask Questions] [How to Answer Questions]
r collins
Greenhorn

Joined: May 31, 2013
Posts: 1
The tree of life keeps getting restructured/reorganized as scientists discover new relationships between organisms and move the leaves and branches around. A class-based OOP approach is not as flexible in this case. Perhaps the prototype-based OOP approach is more suited in this case?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Biology and Objects
 
Similar Threads
Book Promo: is the book available in 'two ply'?
Simple inheritance question
looking for non-applet science simulations
What is the TestScript
[JS] is this the new way of defining function?