tailieunhanh - Chapter 13 OOP Techniques

What is object oriented programming ? A programming approach which uses objects An object is a software component which has properties and behaviour Objects often model real-world entities Most modern programming languages support object orientation | Chapter 13 OOP Techniques Object-Based Programming Introduction Procedural programming languages: action oriented (C, VB) function Object oriented (C#, C++, Java) class (programmer-defined type) Instance of class: object Object Oriented Software Development slide Trong procedural programming languages (chẳng hạn C) lập trình có khuynh hướng hướng hành động (action oriented). Tuy nhiên Lập trình C# là lập trình hướng đối tượng (object oriented). Trong C, đơn vị lập trình là hàm (function). Người lập trình sẽ nhóm các công việc vào trong một hàm và sau đó tổ chức gọi hàm để tạo thành một chương trình. Trong C#, đơn vị lập trình là lớp (class - còn được gọi là programmer-defined types). Mỗi class sẽ chứa dữ liệu (data) và các phương thức (method) để thao tác trên dữ liệu. Làm sao để xa1c định được class của một bài toán? Thông thường dựa vào các danh từ trong yêu cầu bài toán. Chương này giải thích làm cách nào để tạo, sử dụng class và object What is object oriented programming? | Chapter 13 OOP Techniques Object-Based Programming Introduction Procedural programming languages: action oriented (C, VB) function Object oriented (C#, C++, Java) class (programmer-defined type) Instance of class: object Object Oriented Software Development slide Trong procedural programming languages (chẳng hạn C) lập trình có khuynh hướng hướng hành động (action oriented). Tuy nhiên Lập trình C# là lập trình hướng đối tượng (object oriented). Trong C, đơn vị lập trình là hàm (function). Người lập trình sẽ nhóm các công việc vào trong một hàm và sau đó tổ chức gọi hàm để tạo thành một chương trình. Trong C#, đơn vị lập trình là lớp (class - còn được gọi là programmer-defined types). Mỗi class sẽ chứa dữ liệu (data) và các phương thức (method) để thao tác trên dữ liệu. Làm sao để xa1c định được class của một bài toán? Thông thường dựa vào các danh từ trong yêu cầu bài toán. Chương này giải thích làm cách nào để tạo, sử dụng class và object What is object oriented programming? A programming approach which uses objects An object is a software component which has properties and behaviour Objects often model real-world entities Most modern programming languages support object orientation C#, Java, , C++, PHP, etc. Object Oriented Software Development slide What is object? An entity, or thing, is represented as an object in the program . an object representing an Employee in a company Objects have attributes to represent state of object, . Name, Location of an Employee Objects have methods to define the behaviour which object can perform, . an Employee could Move to a new location Object Oriented Software Development slide Classes May have more than one object of the same kind that have common characteristics Class is a template for creating objects of the same kind Employee class can be used to create many Employee objects When we write the code we are actually writing the class definitions Object Oriented Software Development slide

TÀI LIỆU LIÊN QUAN
TỪ KHÓA LIÊN QUAN