tailieunhanh - Object-Oriented Programming Lecture 1: OOP Concepts

Object-Oriented Programming Lecture 1: OOP Concepts 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; Objects are key to understand object-oriented technology. | Object-Oriented Programming Lecture 1: OOP Concepts Dr. Lê H!ng Ph"#ng -- Department of Mathematics, Mechanics and Informatics, VNUH July 2012 1 Friday, July 27, 12 OOP Concepts ✦ Object ✦ Class ✦ Inheritance ✦ Interface ✦ Package 2 Friday, July 27, 12 Object ✦ What is an object? ✦ 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. ✦ Objects are key to understand object-oriented technology. 3 Friday, July 27, 12 Object ✦ Many examples of real-world objects: ✦ ✦ your dog, your desk, your television set, your bicycle Real-world objects share two characteristics: they all have state and behavior. For example: ✦ Dogs have state (name, color, breed) and behavior (barking, fetching, wagging tale). ✦ Bicycles also have state (current gear, current pedal cadence, current speed) and behavior (changing gear, changing pedal cadence, applying brakes). 4 Friday, July 27, 12 Object ✦ Identify the state and behavior for real-world objects is a good way to begin thinking in terms of OOP. ✦ Exercise 1: ✦ Observe the real-world objects that are in your immediate area, for each object that you see, ask yourself two questions: ✦ ✦ ✦ What possible states can this object be in? What possible behaviors can this object perform? Write down your observations 5 Friday, July 27, .

crossorigin="anonymous">
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.