Page 167 - DCAP310_INTRODUCTION_TO_ARTIFICIAL_INTELLIGENCE_AND_EXPERT_SYSTEMS
P. 167

Unit 8: Structured Representation of Knowledge




          useful when more than one programmer is contributing code to a project or when the goal is to  Notes
          reuse code between projects.

          Advantages of Object-oriented Programming

          Object-oriented programming is a style of programming that focuses on using objects to design
          and build applications. Think of an object as a model of the concepts, processes, or things in the
          real world that are meaningful to your application. For example, in a project management
          application, you would have a status object, a cost object, and a client object among others. These
          objects would work together (and with many other objects) to provide the functionality that you
          want your project management application to have. Object-oriented programming is used to
          develop many applications—simple and complex applications, business applications and games,
          mobile and desktop applications. Developers choose to program in the object-oriented paradigm
          because the proper use of objects makes it easier to build, maintain, and upgrade an application.
          Also, developing an application with objects that have been tested increases the reliability of the
          application.

          Self Assessment

          State whether the following statements are true or false:
          11.  Conceptual dependency theory is a model of natural language understanding used in
               artificial intelligence systems.
          12.  Arrows indicate direction of independency.

          8.7 Object and Classes


          In programming terms, an object is a self-contained component that contains properties and
          methods needed to make a certain type of data useful. An object’s properties are what it knows
          and its methods are what it can do. The project management application mentioned above had
          a status object, a cost object, and a client object, among others. One property of the status object
          would be the current status of the project. The status object would have a method that could
          update that status. The client object’s properties would include all of the important details about
          the client and its methods would be able to change them. The cost object would have methods
          necessary to calculate the project’s cost based on hours worked, hourly rate, materials cost, and
          fees.

          Self Assessment

          State whether the following statements are true or false:
          13.  An object’s properties are what it knows and its methods are what it can not do.
          14.  One property of the status object would be the current status of the project.

          8.8 Messages and Methods


          In addition to providing the functionality of the application, methods ensure that an object’s
          data is used appropriately by running checks for the specific type of data being used. They also
          allow for the actual implementation of tasks to be hidden and for particular operations to be
          standardized across different types of objects. You will learn more about these important
          capabilities in Object-oriented concepts: Encapsulation. Objects are the fundamental building




                                           LOVELY PROFESSIONAL UNIVERSITY                                   161
   162   163   164   165   166   167   168   169   170   171   172