1. Trang chủ
  2. » Hoá học lớp 10

Lập trình hướng đối tượng: Session 2 - Data Structures

7 9 0

Đang tải... (xem toàn văn)

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 7
Dung lượng 93,47 KB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

Abstraction: focuses on the external view of an object, identifying the essential features that distinguish it from all other objects.. Encapsulation: focuses on the implementation of e[r]

Trang 1

Session 2 - Data Structures

Pointers and Arrays Derived Types Walkthroughs, Arrays, and Aggregates

Trang 2

• Pointers and Arrays

– Pointers

– Arrays and Pointers

– Unmodifiable Arrays

– Unmodifiable Variables

• Structs

– Member Access

– Compactness

– Pass By Value

– Passing an Address

– Arrow Notation

– Copying

Trang 3

• A Language for Complex Applications

– Complexity

– Three Languages

– A First Example

• Object Terminology

– Abstraction

– Encapsulation

– Hierarchy

– Modularity

• Compiling Modular Programs

– A demonstration

Trang 4

• The four fundamental concepts applied in object-oriented software development are:

Abstraction: focuses on the external view of an object, identifying the essential features that distinguish it from all other objects

Encapsulation: focuses on the implementation of each object;

identifying the data that describes its state and developing the

algorithms that describe its behavior

Hierarchy: ranks and orders objects amongst other objects

Aggregation defines object-wise containment, while inheritance

defines class-wise ranking

Modularity: identifies physical components of a solution

Trang 5

Pointers and Arrays

• Pointers and arrays are building blocks of data structures.

• "A data structure is a way of storing data

in memory so that it can be used

efficiently" Wikipedia (2007).

Trang 6

In-Class Practice

• As an exercise, upgrade the accounting

example from the

follows:

– declare a struct that describes the data for a

single transaction

– define and use an instance of this derived type

to upgrade the original solution

Trang 7

• Pointers and Arrays

– Pointers

– Arrays and Pointers

– Unmodifiable Arrays

– Unmodifiable Variables

• Structs

– Member Access

– Compactness

– Pass By Value

– Passing an Address

– Arrow Notation

– Copying

– In-Class Practice

Q&A

Ngày đăng: 10/03/2021, 14:34

TỪ KHÓA LIÊN QUAN

🧩 Sản phẩm bạn có thể quan tâm

w