Tuesday, November 18, 2014

Software Engineering Concepts / Notes

With respect to the OO Approach, clearly and concisely explain the meaning of ...and give an example for each...

* A class is an Abstract Data Type that combines Data and Operations, hence a class possesses a name, attributes of certain data types and Operations.
* A class acts as a blue print to allow instantiations of objects which take on the classes attributes and operations.

* Classes mimic types of objects found in the real world (The OO Paradigm) but also display properties of inheritance (Generalisation / Specialisation yielding subclasses and super classes or parent./child classes) and class relationships.
*An object is an instantiation of a class, and inherits / takes on the attributes and operations of its class.
* An object has a unique name.
*An object has operations that allow communications to other objects via messages.Operations
Operations are part of classes and instanced objects.
Operations give classes and thus objects functionality.
Operations may take input operands (that it operates on ) and have a return type
of a specific data type.


* Classes have associations with one another in the form of class relationships.
Associations may be specialised relationships such as Generalisation/ Specialisation (inheritance) or Aggregation / Composition.
* An association is the most general type of relationship between two classes

* Not all Classes have associations with all other classes. - of course....


In object-oriented analysis and in UML, an association between two classes represents a collaboration between the classes or their corresponding instances. Associations have direction; for example, a bi-directional association between two classes indicates that both of the classes are aware of their relationship.[23] Associations may be labeled according to their name or purpose.[24]Association Class
An Assoc. class can be modelled when more information is required from an existing association - eg

In UML its notation is a dotted / dashed line pointing o the association directly from the new class Box / Rubric.
* Aggregation is a form of association between classes in which one class acts as a 'Whole' and another class acts as a part of that whole.
* Aggregation can be in a 'strong' form where it is known as 'Composition'

* Aggregation in a UML class diagram is indicated by hollow/clear diamond
at the 'Whole ' or parent end of the association.
Eg. a Car and its various parts - wheels, sunroof, chassis, Body. A car Class is the class that acts as the Whole, the Wheels are a class that represents only part of the car
(Example from Lectures)
NB a class that 'part of a whole' is not necessarily a subclass

Composition:* as above Aggregation can be in a 'strong' form where it is known as 'Composition'
* composition results from a relation in which one class is the whole and one class is a part of that whole like aggregation, however with a composition relation the meaningful existance of the parts is dependent on the existance of the whole

ie a screen has pixels - the relation between pixels and screen is compositional - the screen is composed of pixels - with out the screen - the pixels don't exist

Message (needs more research)
A message is a form of communication from object to object that specifies a request for an action.


* An operation is a component of a class (present in the definition of a class) that gives the class functionality.
* An operation may take one or more arguments and may have a return data type.
* Operations become a Design class's methods when Conceptual classes become 'Design Classes' or 'Implementation Classes'.

eg a class called 'Calculate' contains the Operation 'Add' that takes 2 arguments, and returns a datatype that can represent the sum of the two arguments.

* Operations may be public - visible to all other objects,
private - visible only to operations with in the same class, or
protected - visible to the objects of the same class instantiation or objects from subclasses of the root class for that object

"A Pattern is a reusable template for solving problems according to best practice"

GRASP Patterns are often referred to in SE
(General Responsibility Assignment Software Pattern)

some examples of GRASPS 
are :

Low Coupling Pattern
High Cohesion Pattern
Information Expert Pattern
Post a Comment

Follow by Email