.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Forum >> OOPS >> Post New QuestionBookmark and Share Subscribe to Forum

urgent help in oops

Posted By: mensah     Posted Date: October 08, 2009    Points:2   Category :OOPS
can someone create a the simulator that support two type of creature - predators and prey.
The creatures live on a 2-dimensional grid of cells. An initial population of predator and prey are randomly distributed on the grid. The population evolves in discrete time steps. At each time-step creatures will move from one cell to another.
If a predator creature finds a prey creature at its new cell it will "eat" it and its fitness will improve.
If a cell contains two creatures of the same type they will "breed" by merging to produce a new creature of the original type but with fitness the average of the parent creatures.
If a prey creature finds itself on a new unoccupied cell its fitness will increase (for having avoided being eaten).
As it stands this will not produce a very realistic simulation of predators and prey! You implementation should allow for the extension of having some cells containing food to be eaten by the prey creatures, creatures being able to sense the contents of cells beyond their own and using this information as the basis for making a decision as to where to move at the next turn.
You are not required at this time to produce a nice GUI base programme. The programme when run (for some number of generations) should print out a simple summary of the numbers of each type of creature in each generation.

Responses
Author: duraikannan             
Posted Date: December 15, 2010     Points: 5   

OOPs : Object Oriented Programming Tool.

* OOPs mainly called Class and Object,
* Class is a real world entity.
* Class is a template of Object or behavior of object
* Simply describe the class like blueprint of object.
* Instance of class is called Object.
* Calling all function or methods from object of particular class.

Four Piller of OOPs:

1) Encapsulation
2) Data Abstraction
3) Inheritance
4) Polymorphism




Post Reply

You must Sign In To post reply
 
 
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery
JavaScript/VBScriptBiztalkWPFPatten/PracticesWCFOthers
www.DotNetSpark.comUnAnsweredAll

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend