1 / 33

Object Oriented

33. Object Oriented. MCSD DORON AMIR. WWW.doronamir.com. 32. Object ?. 31. Object :. מודל לעצמים מתוך עולם הבעיה. Change V. V = 3. END. LG. SEND. 2023DG. עצם : טלפון נתונים : שם יצרן , סוג , עוצמת הצלצול שירותים: חייג למספר נתון , קבל שיחה , שנה עוצמה. 30. Class ?. 29.

gaura
Télécharger la présentation

Object Oriented

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. 33 Object Oriented MCSD DORON AMIR WWW.doronamir.com

  2. 32 Object ?

  3. 31 Object : מודל לעצמים מתוך עולם הבעיה Change V V = 3 END LG SEND 2023DG עצם : טלפון נתונים : שם יצרן , סוג , עוצמת הצלצול שירותים: חייג למספר נתון , קבל שיחה , שנה עוצמה

  4. 30 Class ?

  5. 29 מודל לתבנית :הגדרת טיפוס של עצם instance Class ייצוג ספציפי וקונקרטי של מחלקה Object1 instance Object2 הגדרת נתונים הגדרת שיטות .... instance Object3

  6. 28 Methods & Fields ?

  7. 27 Methods & Fields Method :יחידה בסיסית של פונקציונליות Field :יחידה לאחסון נתונים רשימת טלפונים רשימת הודעות טקסט הגדרות מערכת Change V V = 3 END LG SEND 2023DG

  8. 26 Encapsulation ?

  9. 25 Encapsulation יחידה המאחסנת שיטות ונתונים

  10. 24 Interface & Implementation ?

  11. 22 Interface & Implementation Interface :התקן המשמש להתקשרות Implementation :מימוש ההתקן או הממשק Change V Button …. If intV = 2 then LibVoice.Voice=2 … END Button SEND Button Implementation Interface

  12. 21 Hiding Information & Base Access modifier ?

  13. 20 Hiding Information מודול תוכנה המסתיר פרטים מהמודולים האחרים Public : נגיש מכל חלקי התכנית Private : נגיש רק לאברי המחלקה Private X Public Y Private Z X=Z+Y

  14. 19 Private & Public (Base Access Modifier) 100,000 PrivateS 300 PrivateM =100 Public H 8 H 26 Public D D MakeSalary S= H * D* M Get 20,800 MakeSalary Set 8 26

  15. 18 Inheritance ? Super Or Base Class Sub Or Derived Class Override

  16. 17 Inheritance מנגנון המאפשר לגזור מחלקה ממחלקה אחרת ChangeGear Super Or Base Class 2 Wheels Class : Bike CurrentGear Sub Or Derived Class Override Override Class Class Class Racing Bike Mounttain Bike Tandem Bike

  17. 16 Protected & Package (java) ?

  18. 15 Protected & Package Package : אוסף מחלקות המאוגד בחבילה אחת Access Modifier Package : נגיש רק ממחלקות החבילה Protected : נגיש ממחלקות החבילה ומתת-המחלקות Package Protected Public Private Derived Class

  19. 14 Signature & Overloaded ?

  20. 13 Signature & Overloaded Signature : שם השיטה,מספר הפרמטרים,סדר הפרמטרים,סוג Name Distance (int X , int Y ) { System.out.print ( X+Y ) ; } Signature Type

  21. 12 Signature & Overloaded Overload : היכולת לתת למספר שיטות שם זהה Distance (int X , int Y ) { System.out.print ( X+Y ) ; } Distance (4,5 ) Distance (int X) { System.out.print ( X3^ ) ; } Distance (3 )

  22. 11 Constructor ?

  23. 10 Without Constructor Instance name name Year born Year born Create Object Print Age Print Age New Student() Student Class Student1 Avi name Year born 1970 Student1.name=“Avi” Student1.YearBorn=1970 Print Age

  24. 9 With Constructor Constructor : שיטה המשמשת לאתחול עצם בעת יצירת המופע Instance name Avi name Year born Year born 1970 Create Object Print Age Print Age Student Class Student1 New Student(“Avi”,1970)

  25. 8 polymorphism ?

  26. 7 polymorphism Polymorphism : היכולת להגדיר כמה דפוסי פעולה עבור שם יחיד Polymorphism : מאפשר להעמיס שיטות באופן שונה מ Overloaded Polymorphism : פעולה המוגדרת במסםר מחלקות שונות בעלת שם זהה + משמעות לוגית זהה, המימוש יהיה שונה.

  27. 6 polymorphism Draw Draw Draw Draw Shapes Classes בין כל האובייקטים יש בסיס משותף המכיר את הפעוות הפוליפורמיות Draw היא בעלת משמעות לוגית זהה בכל המחלקות אך בעלת מימוש שונה Draw Draw Draw הפעולה תתבצע בהתאם לאובייקט הנבחר

  28. 5 polymorphism Shape Class המלבן החוסם X1,Y1,X2,Y2 חישוב שטח Area-Virtual חישוב היקף Perimeter-Virtual Rectangle Circle Diamond Class Class Class Area-Override Area-Override Area-Override Perimeter- Override Perimeter- Override Perimeter- Override

  29. 4 polymorphism Shape [] shapes = new Shape[5]; Shapes[0]=new Circle(10,10,1); Shapes[1]=new Circle(10,0,2); Shapes[2]=new Diamond(0,0,10,10); Shapes[3]=new Rectangle(1,1,2,2); Shapes[4]=new Rectangle(0,0,10,10); Console.out.WriteLine….. sapes[i].Area… sapes[i].Perimeter Circle Area=3.14159 Perimeter=6.28318 Circle Area=12.56637 Perimeter=12.5663 Diamond Area=50 Perimeter=28.8 Rectangle Area=1 Perimeter=4 Rectangle Area=100 Perimeter=40

  30. 3 Abstract & Sealed Class ?

  31. 2 Abstract Classes Abstract Class : מחלקה שלא ניתן ליצור ממנה עצמים באופן ישיר Animal Dog Bird Cat

  32. 1 Sealed Classes Sealed Class : מחלקה שלא ניתן לרשת ממנה Animal Dog Bird Cat Staf Wolf G-Wolf S-Wolf

  33. 33 Object Oriented MCSD DORON AMIR WWW.doronamir.com

More Related