1 / 15

Object Oriented Programmimng

Object Oriented Programmimng. Lec 3. introduction. Java is a new object-oriented language that is receiving wide attention from both industry and academia .

tao
Télécharger la présentation

Object Oriented Programmimng

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. Object Oriented Programmimng • Lec 3

  2. introduction • Java is a new object-oriented language that is receiving wide attention from both industry and academia. • Java is often described as a Web programming language because of its use in writing programs called applets that run within a Web browser.

  3. Classes and Objects • an object is a thing, both tangible and intangible, that we can imagine. • Ex. For a program to keep track of student residents of a college dormitory • A class is a kind of mold or template that dictates what objects can and cannot do. An object is called an instance of a class.

  4. Benefits of objects • Modularity • Information hiding(API) • Class diagrams • 1.Doughnut diagrams • 2. Object Modeling Technique(OMT) diagrams • 3. Unified Modeling Language (UML) diagrams

  5. Messages • To instruct a class or an object to perform a task, we send a message to it. For example, we send a message deposit to an Account object to deposit $100. • For a class or an object to process the message it receives, it must possess a matching method, which is a sequence of instructions that a class or an object follows to perform a task

  6. A value we pass to an object is called an argument of a message.

  7. A method defined for a class is called a class method, and a method defined for an object is an instance method

  8. Class and instance data values

More Related