Computer Programming ||

13
Mahmoud Rafeek Alfarra Computer Programming || Chapter 1: Introduction & OOP

description

Computer Programming ||. Chapter 1: Introduction & OOP. Contents. About Lecturer. Description of course. Syllabus. Evaluation. Principles of OOP. Practice of (Array of students). Project of (Array of cars). About Lecturer. Mahmoud Rafeek Alfarra Certificates: - PowerPoint PPT Presentation

Transcript of Computer Programming ||

Page 1: Computer Programming ||

Mahmoud Rafeek Alfarra

Computer Programming ||

Chapter 1: Introduction & OOP

Page 2: Computer Programming ||

Contents

Principles of OOP

Evaluation

Syllabus

Description of course

About Lecturer

www.cst.ps/staff/mfarra www.facebook.com/mahmoudRfarra

2

Practice of (Array of students)

Project of (Array of cars)

Page 3: Computer Programming ||

About LecturerAbout Lecturer

Mahmoud Rafeek Alfarra Certificates:

MSc Computer Science,2008, Pattern Recognition, AAST, Alexandria, Egypt. BSc Computer Science,2004, The Islamic University of Gaza, Palestine.

Currently : Head Of Continuing Education and Community Service (CECS) department. Lecturer in Computer Science & Information Technology (CSIT) department. Board member of PICTA

Past: Head Computer Science & Information Technology (CSIT) department in CST (9-

2012 To 9-2013). Head Of Computer Center in CST (9-2009 To 10-2010) Head of ITF1, ITF2 and ITF3 Lecturer in QOU, UP, CST and UCAS as Part Time

Contacts: E-mail: [email protected] Site: http://www.cst.ps/staff/mfarra YouTube channel: mralfarra1 FaceBook Page: mahmoudRfarra

www.cst.ps/staff/mfarra www.facebook.com/mahmoudRfarra

3

Page 4: Computer Programming ||

SyllabusSyllabus

Revision of OOP Exception Handling String manipulation Regular expression Files and Streams Connect applications with DBMS Streams-Based Sockets and Datagrams

www.cst.ps/staff/mfarra www.facebook.com/mahmoudRfarra

4

Page 5: Computer Programming ||

EvaluationEvaluationwww.cst.ps/staff/mfarra www.facebook.com/mahmoudRfarra

5

Page 6: Computer Programming ||

Principles of OOPPrinciples of OOP

To have a fine definition of OOP, Please note what you are showing in your class

room now? Nice, what is the properties and behavior

of each of them ? This is the OOP style.

www.cst.ps/staff/mfarra www.facebook.com/mahmoudRfarra

6

ChairsTables Teacher

PCs..

ChairsTables Teacher

PCs..

# of legs

Type of material

Color

.

.

.

# of legs

Type of material

Color

.

.

.

Page 7: Computer Programming ||

Principles of OOPPrinciples of OOPwww.cst.ps/staff/mfarra www.facebook.com/mahmoudRfarra

7

OOP

Page 8: Computer Programming ||

Principles of OOPPrinciples of OOP

Class & Object In your class room there is … tables,

chairs, students. Each one of them is object from class.

www.cst.ps/staff/mfarra www.facebook.com/mahmoudRfarra

8

Page 9: Computer Programming ||

Principles of OOPPrinciples of OOPwww.cst.ps/staff/mfarra www.facebook.com/mahmoudRfarra

9

Any Thing

Attributes

Behavior

Each one is presented as a variable in the Class

Each one is presented as a variable in the Class

Each one is presented as a method in the Class

Each one is presented as a method in the Class

Page 10: Computer Programming ||

Principles of OOPPrinciples of OOPwww.cst.ps/staff/mfarra www.facebook.com/mahmoudRfarra

10

Access_modifiers class class_name {// variables = attributes Access_modifiers class_name() {

}// behavior = methods

}

Access_modifiers class class_name {// variables = attributes Access_modifiers class_name() {

}// behavior = methods

}

Always, the class has a method called constructorwhich gives initial values to the attributes of class

Is a reserved word

The identifier of class Must be as any variable

Page 11: Computer Programming ||

Practice of (Array of students)Practice of (Array of students)www.cst.ps/staff/mfarra www.facebook.com/mahmoudRfarra

11

StudentStudent

NameIdGPACourse[,]

NameIdGPACourse[,]

addCourseinfocalcGpa…

addCourseinfocalcGpa…

Array of StudentArray of Student

Page 12: Computer Programming ||

Project of (car park)Project of (car park)www.cst.ps/staff/mfarra www.facebook.com/mahmoudRfarra

12

CarCar

NameIdModelPriceLoginLogout

NameIdModelPriceLoginLogout

CalcPeriodCalcFareinfo…

CalcPeriodCalcFareinfo…

Car parkCar park

…..…..

……

attributes

beha

vior

Join the discussion on Sunday 6.10.2013

Page 13: Computer Programming ||

Mahmoud Rafeek Alfarra