Page 165 - DCAP310_INTRODUCTION_TO_ARTIFICIAL_INTELLIGENCE_AND_EXPERT_SYSTEMS
P. 165

Unit 8: Structured Representation of Knowledge




          GRASP – Grasping of an object by an actor (E.g.: throw)                               Notes
          INGEST – Ingesting of an object by an animal (E.g.: eat)
          EXPEL – Expulsion of something from the body of an animal (cry)
          MTRANS – Transfer of mental information (E.g.: tell)

          MBUILD – Building new information out of old (E.g.: decide)
          SPEAK – Production of sounds (E.g.: say)
          ATTEND – Focusing of sense organ toward a stimulus (E.g.: listen)
          A second set of building block is the set of allowable dependencies among the conceptualization
          describe in a sentence.

          8.6.2 Object-oriented Programming

          Object-oriented programming (OOP) is a programming language model organized around
          “objects” rather than “actions” and data rather than logic. Historically, a program has been
          viewed as a logical procedure that takes input data, processes it, and produces output data.
          The programming challenge was seen as how to write the logic, not how to define the data.
          Object-oriented programming takes the view that what we really care about are the objects we
          want to manipulate rather than the logic required to manipulate them.


                 Example: Of objects range from human beings (described by name, address, and so
          forth) to buildings and floors (whose properties can be described and managed) down to the
          little widgets on your computer desktop (such as buttons and scroll bars).
          The first step in OOP is to identify all the objects you want to manipulate and how they relate to
          each other, an exercise often known as data modeling. Once you’ve identified an object, you
          generalize it as a class of objects (think of Plato’s concept of the “ideal” chair that stands for all
          chairs) and define the kind of data it contains and any logic sequences that can manipulate it.
          Each distinct logic sequence is known as a method. A real instance of a class is called (no surprise
          here) an “object” or, in some environments, an “instance of a class.” The object or class instance
          is what you run in the computer. Its methods provide computer instructions and the class object
          characteristics provide relevant data. We communicate with objects – and they communicate
          with each other – with well-defined interfaces called messages.

          The concepts and rules used in object-oriented programming provide these important benefits:
               The concept of a data class makes it possible to define subclasses of data objects that share
               some or all of the main class characteristics. Called inheritance, this property of OOP
               forces a more thorough data analysis, reduces development time, and ensures more accurate
               coding.

               Since a class defines only the data it needs to be concerned with, when an instance of that
               class (an object) is run, the code will not be able to accidentally access other program data.
               This characteristic of data hiding provides greater system security and avoids unintended
               data corruption.
               The definition of a class is reusable not only by the program for which it is initially created
               but also by other object-oriented programs (and, for this reason, can be more easily
               distributed for use in networks).







                                           LOVELY PROFESSIONAL UNIVERSITY                                   159
   160   161   162   163   164   165   166   167   168   169   170