a problem (procedure) and then systematically break the problem down into sub problems (sub procedures). Procedures, also known as routines, subroutines, methods, or functions simply contain a series of computational steps to be carried out. Issues?
over time communities can become segregated based on various prejudices. 1. Break the problem down into one dimension; a street initially populated with equal probability either black ‘B’, white ‘W’ or empty ‘ ‘ houses. 2. We then allow the system to evolve by randomly selecting houses and applying a simple condition: If the house is surrounded on both sides by a house different to itself, it will decide to move to an empty location in the street where this condition is not satisfied. In the unlikely event that a suitable location cannot be found after a designated number of attempts, the house will leave the street.
type of house that plays by different rules, then see how the simulation differs? Consider a nomad type house (label ‘N’) which does not care about its neighbors. However, it remembers how long it has been in one location, and if longer than a specified threshold it moves to a new location. How must we modify the original program in order to account for these new rules?
as a collection of interacting objects, as opposed to the procedural model, in which a program is seen as a list of functions to perform. The aim of object-oriented programming is to try to increase the flexibility and maintainability of programs. Data before action.
objects that have data fields (properties that describe the object) and associated procedures known as methods. Objects, which are instances of classes, are used to interact with one another to design applications and computer programs. Some verbiage can vary.
common properties, operations and behaviors. A combination of state (properties) and behavior (methods). A data type, and objects are instances of that data type. In other words, classes are prototypes from which objects are created. The blueprint.
object receives all of the characteristics of a class, including all of its default data and any actions that can be performed by its methods. Objects can communicate. An object passes a message to another object, which results in the invocation of a method. The “object” you build from the blueprint.
same characteristics, and have things in common with one another, but also may have certain properties that make them different. Object oriented programming allows classes to inherit commonly used state and behavior from other classes.
structures* Object-Oriented • Bundles the two together, so an object, which is an instance of a class, operates on its "own" data structure. * A particular way of storing and organizing data in a computer so that it can be used efficiently