1 / 17

The Object Oriented Approach to Software Engineering

The Object Oriented Approach to Software Engineering. Software Engineering The process of specifying, designing, implementing, testing, maintaining large scale software systems Analogy with other engineering disciplines

levi
Download Presentation

The Object Oriented Approach to Software Engineering

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. The Object Oriented Approach to Software Engineering • Software Engineering The process of specifying, designing, implementing, testing, maintaining large scale software systems • Analogy with other engineering disciplines • Use of a set of principles, methods, tools, procedures, metrication to produce a high quality product • SE is a young discipline

  2. Some History • until 60s SE was all about coding • Early languages were close to the hardware (assemblers) • Large programs were difficult to write, debug, maintain • Languages tailored to specific application areas: Fortran - scientific Cobol - business

  3. Then the idea of the SW lifecycle was introduced

  4. Language Evolution • Driven by Abstraction • identifying important properties and discarding irrelevant ones • Software Development is model building • A program is an abstraction from reality • Abstraction isa way to control complexity • Programming language development has been influenced by the need for abstraction • Data abstraction and Procedural abstraction

  5. Data Abstraction • Basic data type of computers is binary • Integers, reals, booleans are abstractions away from the binary bytes of which they are composed • Record in Pascal, Structs in C, arrays etc allow more powerful abstractions

  6. Data Abstraction • Basic data type of computers is binary • Integers, reals, booleans are abstractions away from the binary bytes of which they are composed • Record in Pascal, Structs in C, arrays etc allow more powerful abstractions

  7. Card playing software in C typedef struct{ int pips; char suit; } card; card c1,c2; card deck[52]; using the struct as a data abstraction tool we can manipulate the card as a single entity c1= c2; c1 is assigned the values of c2 We can still access the internal elements if we need to c3.pips = c2.pips;

  8. Good Programming Practice • Write functions to assign and update the internal card values and ALWAYS access the card data structures via these functions • No other functions need be aware of the internal structure of the cards (this is not enforceable in C)

  9. Procedural Abstraction • Procedures, functions, subprograms, subroutines are all ways to provide procedural abstraction y = sin (x) read_in(person_record) add_to_database(person_record) • Once the functionality of theprocedure has been established, you can forget the internal details and just use the name

  10. The Object Oriented Approach • Key ideas: Abstraction can be enforced for data structures and associated methods (functions) for accessing those structures • objects: containers for data structures and associated methods… single name which can be manipulated • encapsulation: of data structures and methods. ONLY methods associated with object can access internal structure • classes and inheritance: a class is a generic object. Subclasses inherit data structures and methods from their parents • methods and messages • instances and instantiation: specific members of classes with assigned values for their data fields.

  11. Encapsulation in C++ struct Address{ private: unsigned char streetNumber; char* cityName; char* streetName; char* country; char postcode[7]; public : void initAddress(unsigned snumber, char* sname, char* cname, char* scountry, char* pcode}; void deleteAddress(); void streetAddress(char* name); void cityAddress(char* name); };

  12. class is another name for a struct in C++ but the default for struct members is public, the default for class members is private. • Best to be explicit

  13. Class and inheritance in C++ class Vehicle{ private: int weight; int xvel,yvel; int maxspeed; public: void initVehicle(...); void changespeed(...); . . . }; class Aircraft: public Vehicle{ vehicle is a parent class of Aircraft private: int maxAltitude; boolean inAir; public: void initAircraft(.....); . . . };

  14. Software Agents and Agent Technology

  15. What is an agent? • A human agent acts on behalf of another • An agent "produces an effect" • Software agents differ from traditional software programs • Software agents are being used increasingly to solve complex problems • A software agent may be a simple autonomous program which assists you in some task • A software agent may be a member of a large multi-agent system which collectively are performing a range of complex and intelligent tasks

  16. Software agents differ from traditional software • They are autonomous ie they can act on their own without human guidance • They have goals which they are trying to achieve • They contain some level of intelligence-simple like a fixed set of rules or complex like a learning engine which allows it to adapt to a changing environment • Agents can react to their environment, they may be proactive ie initiate activity without input • Typically they have social ability ie they can communicate with users, the system and other agents • They may move from one system to another (eg around the internet) to access remote resources or interact with distant agents (these are MOBILE agents) • In MULTI-AGENT systems they may cooperate with other agents to solve more complex tasks than they themselves can handle

  17. Some Typical Application Areas For Agents • Information agents - build up a profile of the user and their information needs -selectively retrieve appropriate information, traversing the WWW to find it. Their ability to learn from their environment and to move around from one system to another makes them particularly suitable for this task • Email agents – manage a users email, selectively reordering again based on user profiles learned by studying the user’s interaction with the mailer. • Agents in e-commerce, trading agents for example, negotiate with other agents to buy or sell shares on behalf of their users. Mobility enables the agent to move into virtual market places and dynamic awareness of the changing environment (share prices, interest rates etc) enables agent to pursue financial goals on behalf of their users.

More Related