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

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

7 8 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

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]

(1)

Session - Data Structures

Pointers and Arrays Derived Types

(2)

Objectives

Pointers and Arrays

– Pointers

– Arrays and Pointers – Unmodifiable Arrays – Unmodifiable Variables

Structs

– Member Access – Compactness – Pass By Value

– Passing an Address – Arrow Notation

(3)

Review(1)

A Language for Complex Applications

– Complexity

– Three Languages – A First Example

Object Terminology

– Abstraction – Encapsulation – Hierarchy

– Modularity

Compiling Modular Programs

(4)

Review(2)

• 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

(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

(6)

In-Class Practice

• As an exercise, upgrade the accounting example from the

Compiling Modular Programs reading as follows:

– declare a struct that describes the data for a single transaction

(7)

Summary

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

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

w