البرمجة الكينونية بلغة جافا 1294

Slides:



Advertisements
Similar presentations
Introduction to C Programming
Advertisements

For(int i = 1; i
Pass by Value. COMP104 Pass by Value / Slide 2 Passing Parameters by Value * A function returns a single result (assuming the function is not a void function)
Chapter 6 Advanced Function Features Pass by Value Pass by Reference Const parameters Overloaded functions.
Chapter 8. Operator Overloading Operator overloading gives the opportunity to redefine C++ Operator overloading refers to redefine C++ operators such.
Computer Science Dept. Fall 2003 Object models Object models describe the system in terms of object classes An object class is an abstraction over a set.
1 Object-Oriented Programming Concepts. 2 Recap from last lecture Variables and types –int count Assignments –count = 55 Arithmetic expressions –result.
OBJECT-ORIENTED PROGRAMMING CONCEPTS (Review). What is an Object? What is an Object? Objects have states and behaviors. Example: A dog has states - color,
Inheritance, part 2: Subclassing COMP 401, Fall 2014 Lecture 8 9/11/2014.
Object Oriented Concepts in Java Objects Inheritance Encapsulation Polymorphism = slide covered in class – others for reference.
Classes and Objects in Java. What Is an Object?. An object is a software bundle of related state and behavior. Software objects are often used to model.
What is an object? Your dog, your desk, your television set, your bicycle. Real-world objects share two characteristics: They all have state and behavior;
CS Data Structures Appendix 1 How to transfer a simple loop- expression to a recursive function (factorial calculation)
CMPT Dr. Alexandra Fedorova Lecture VI: Distributed Objects. Remote Method Invocation.
Nov 5, Fall 2006IAT 8001 Lecture 5 Objects, Classes.
Object-oriented Programming Concepts
Pointers Example Use int main() { int *x; int y; int z; y = 10; x = &y; y = 11; *x = 12; z = 15; x = &z; *x = 5; z = 8; printf(“%d %d %d\n”, *x, y, z);
Object Oriented Paradigm Programming Paradigms En Mohd Norafizal A.Aziz.
Java Objects and Classes. 3-2 Object Oriented Programming  An OO program models the application as a world of interacting objects.  A typical Java program.
CSC241: Object Oriented Programming
2015/8/221 Data Types & Operators Lecture from (Chapter 3,4)
1 Pertemuan 6 Object Oriented Programming Matakuliah: T0053/Web Programming Tahun: 2006 Versi: 2.
Java Implementation Software Construction Lecture 6.
9/4/2015Abstract classes & Interface1 Object Oriented Design and Programming II Chapter 10 Abstract classes and Interfaces.
Object-Oriented Programming Concepts
Polymorphism. Introduction ‘one name multiple forms’ Implemented using overloaded functions and operators Early binding or static binding or static linking.
______________________________________________________________________________________ SCHOOL OF INTERACTIVE ARTS + TECHNOLOGY [SIAT] |
Chapter 4 Objects and Classes.
Object Oriented Programming Concepts Fatih University Ceng-104-A Introduction to Object Oriented Programming Harun Reşit Zafer This is a slide version.
Java Programming (Basic) Review. Java Programming 2 Contents  Language Basics  Classes and Objects  Inheritance  Polymorphism  Interfaces  Packages.
Java. Features of Java Architecture Neutral and Portable o Write once, run anywhere o Java Virtual Machine (JVM) Object Oriented o Classes encapsulate.
Copyright 2003 Scott/Jones Publishing Standard Version of Starting Out with C++, 4th Edition Chapter 13 Introduction to Classes.
Object Oriented Programming Concepts. Object ► An object is a software bundle of related state and behavior. ► Software objects are often used to model.
Abstraction ADTs, Information Hiding and Encapsulation.
: Maha Sabri Altememe Lecturer : Maha Sabri Altememe Lecture :1 1.
 Objects versus Class  Three main concepts of OOP ◦ Encapsulation ◦ Inheritance ◦ Polymorphism  Method ◦ Parameterized ◦ Value-Returning.
Classes and Methods. Classes Class Definition Data Fields –Variables to store data items –Differentiate multiple objects of a class –They are called.
Ihsan Ayyub Qazi Introduction to Computer Programming Recitation 3 Ihsan Ayyub Qazi.
What Is a Package? A package is a namespace that organizes a set of related classes and interfaces. Conceptually you can think of packages as being similar.
AD Lecture #1 Object Oriented Programming Three Main Principles 1 Inheritance Encapsulation Polymorphism.
By : Robert Apeldorn. What is OOP?  Object-oriented programming is a programming paradigm that uses “objects” to design applications and computer programs.
Object orientation and Packaging in Java Object Orientation and Packaging Introduction: After completing this chapter, you will be able to identify.
JAVA CLASSES, METHODS AND VARIABLES.  Defined Noun: A set or category of things having some property or attribute in common and differentiated from others.
Introduction to Programming
What is an Object Objects are key to understanding object-oriented technology. An object can be considered a "thing" that can perform a set of related.
UML - Class Diagrams.
JAVA By Waqas.
Interface.
03/10/14 Chapter 9 Inheritance.
INTRODUCTION TO OBJECT-ORIENTED PROGRAMMING (OOP) & CONCEPTS
Types of Programming Languages
Section 11.1 Class Variables and Methods
EEC 484 Computer Networks Java Tutorial #1 Wenbing Zhao
PRG 421 GUIDE Knowledge is divine-- prg421guide.com.
PRG 421 Week 1 Individual: Week One Coding Assignment--
Object Oriented Analysis and Design
Object Oriented Analysis and Design
Lecture 5 from (Chapter 4, pages 73 to 96)
OBJECT ORIENTED PROGRAMMING
Object-oriented Design in Processing
Object-Oriented Programming
SOLVING MULTI-STEP EQUATIONS
Object-Oriented Programming
Object-oriented Design in Processing
Object Oriented Programming
Object-Oriented Programming
Function Overloading.
Object-oriented Design in Processing
Selenium WebDriver Web Test Tool Training
Object-oriented Design in Processing
Presentation transcript:

البرمجة الكينونية بلغة جافا 1294 ا.محمد شبير

مفاهيم البرمجة الكينونية Object Oriented Programming Concepts الوحدة الثانية مفاهيم البرمجة الكينونية Object Oriented Programming Concepts

اهداف الوحدة يتوقع من الدارس بعد انهائه دراسة هذه الوحدة ان تعرف المفاهيم الاساسية للبرمجة الكينونية بلغة جافا تتعرف على مقاطع جافا البرمجية التى تمثل المفاهيم الاساسية للبرمجة الكينونية تعرف الفرق بين لغة C/C++ و لغة جافا

مفهوم البرمجة الكينونية Object Oriented Programming Concept تقسيم البرنامج الى برامج فرعية صغيرة مرتبط دمج البيانات و البرامج الفرعية An object is a software bundle of related state and behavior Software objects are often used to model the real-world objects that you find in everyday life. This lesson explains how state and behavior are represented within an object

مفهوم الكائن Object Concept مناهج سلوك متغيرات وضعية

يتبع المتغيرات Variables المناهج methods السلوك Behavior وضعية State تغير رقم القناه تغير مستوي الصوت المتغيرات Variables وضعية State رقم القناة:4 مستوي الصوت:5

مفهوم الرسالة Message تغير رقم القناه (4) المناهج methods السلوك Behavior تغير رقم القناه تغير مستوي الصوت المتغيرات Variables وضعية State رقم القناة:4 مستوي الصوت:5

مفهوم الصنف Class class Bicycle { int cadence = 0; int speed = 0; int gear = 1; void changeCadence(int newValue) { cadence = newValue; } void changeGear(int newValue) { gear = newValue; } void speedUp(int increment) { speed = speed + increment; } void applyBrakes(int decrement) { speed = speed - decrement; } void printStates() { System.out.println("cadence:" + cadence + " speed:" + speed + " gear:" + gear); } }

مفهوم اعادة التحميل Overloading   Overloading : methods within a class can have the same name if they have different parameter lists

مفهوم التوارث inherence تعريف صنف بالاستناد الي صنف اخر الصنف الاساسي الصنف الفرعي توارث الصفات و العمليات

مفهوم الواجهة Interface تبسيط التوارث المتعدد an interface is a group of related methods with empty bodies

مقارنة بين لغة جافا و لغة C++ / C المعالجة الاولية و تعريف البيانات يتم البحث عن المعرفات باستخدام التوجيهات #define , #typeof انشاء لغة تخص المبرمج ظهور مشكلة عدم فهم برامج الاخرين قراءة البرنامج بالكامل للفهم جافا لا تستخدم التوجيهات

2 التراكيب او الاتحادات لا تحتوي جافا على التراكيب او الاتحادات الاصناف هي البديل

3 الاقترانات Function C++ تعتمد على C C تدعم الاقترانات كلا اللغتان تعاني من التعقيد جافا تدعم فقط البرمجة الكينونية

4 التوارث المتعدد Multiple Inheritance تعقيد البرامج جافا لا تدعم التوارث المتعدد

5 جملة Goto C++ / C تدعم جملة Goto صعوبة تتبع البرنامج

6 اعادة تحميل عملية operation overloading C++ / C تدعم امكانية اعادة التحميل اعادة تعريف العمليات بما يناسب تطبيق المبرمج جافا لا تدعم ذلك

7 المؤشرات pointers الاستعمال الخاطئ للمؤشرات يسبب حالات خطأ جافا لا تدعم المؤشرات جافا : كائنات و مصفوفات منها افضل من المؤشرات

http://tmohammed.wordpress.com/

تمت بحمد الله