Αντικειμενοστρεφής Προγραμματισμός

  • View
    42

  • Download
    3

Embed Size (px)

DESCRIPTION

. Object-Oriented Programming. . : -> : - PowerPoint PPT Presentation

Transcript

  • Object-Oriented Programming

  • : -> : (object-orientation) . Eight Queens Problem

  • :1967: Simula67 () -> 70: Smalltalk (Palo Alto, CA) -> o 80: o 80: C++ (Stroustrup, AT&T): , ,

  • : : (scalability) !!! C, C++

  • ? : ( ) . . :

  • DNA. ( m) FORTRAN, , !!

  • , APL ( ) ( ) n m

  • . = . . . . . . .T G G A C CT G G A C C. . . . . . . : APL FORTRAN

  • O (message). Fred Chris. (method) ., Chris, . , Chris, . (, , courier)

  • , . . .

  • . () . , . () .

  • , !!, , : (reusable software)

  • Chris Fred ? () Fred . . . .

  • Chris Fred Fred .

  • , , . , . ( ) .

  • : , ,

  • ( ) , . , , , .

  • , , , : ( ) ( ). , , , . : (518, 202) ( ) (720)

  • :write_two_integers(518, 202);write_string("The sum of these numbers is:");write_one_integer(720);

    :write(518, 202);write("The sum of these numbers is:");write(720); , (at compile time) .

  • 2 , . : , . , Person Student. Person present_yourself Student present_yourself .

  • : present_yourself . .

  • , ., . , . . , , . .

  • 1. 2. . . . 3. .4. . .5. . , .6. . .

  • , , . , , . : ... " " (divide and conquer). , . , .

  • : "" (has-a abstraction) "" (is-a abstraction) . , "" "" . , "" , "" . .

  • :: : , (Attributes) , (Methods)

  • : : :

  • : : CD Player:

  • . : -> -> : -> ->

  • : : : , :