sdf

Page 1

OOP Course Prepared by : Mohamed Gamal

Session 1

http://about.me/Mohamed.Gamal.Hassan


Agenda

• • • • • •

Instructions Introduction to Object Oriented Programming Class and Object 3 OOP Basics Concept Class Declaration Encapsulation


Instructions

• Don’t be late , session will start 12:30 • 10 min break • Assignments – In every session and it will be included in final Grade. – Will be at the end of presentation – Send email with your assignment and you will receive feed back in the next session

• Practice, Practice, Practice, …..


Introduction to Object Oriented Programming

• World around us is full of objects • Why we need it in programming • Apply Object Oriented in programming


Class and Object


3 OOP Basics Concept

• Encapsulation • Inheritance • Polymorphism


Class Declaration


Encapsulation

• Data Hiding • 3 levels of hiding – Public – Private – Protected


Assignment

• Implement class Math which has public methods, factorial , summation , absolute, power. Test this object functions in main. • Implement class Draw which has public methods DrawTraingleUP , DrawTraingleDown ,DrawTraingleLeft , DrawTraingleRight ,DrawRectangle. Test this functions in main.


Assignment cont.. • Implement class employee has a private name and salary (provide methods for get and set),also has a public method getSalary which calculate salary as salary*8*28.Input will be number of employees then each employee with name salary , next given is number of orders each order contain string , please output salary for each employee name match each order string. • Assignment will be send at mail: course180daraga@gmail.com deadline: Sunday 11PM.


QUESTIONS


Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.