Java C3. oop basic

Real world concepts can be modeled in a computer program The program is made of objects with certain properties and operations that the objects can perform It is not important how an object is implemented, but what it does Every object is responsible for carrying out a set of related tasks. A class can contain data declarations and method declarations | Chapter 3. OOP Basic ITSS Java Programming CAO Tuan-Dung, HUT Object - Oriented Real world concepts can be modeled in a computer program The program is made of objects with certain properties and operations that the objects can perform It is not important how an object is implemented, but what it does Every object is responsible for carrying out a set of related tasks HTTP request: HTTP method : Requesting method for Web servers such as GET method and POST method Request URI : URL information on Web server ‘form’ data : Information input by browser HTTP response: • Response message Status information which is the processing result of HTTP method • Contents type Contents type information on data to be transmitted • Request file Main information such as HTML files to be transmitted to HTTP request Object Oriented Real world Attribute Operation Account name: Duc Binh Balance: VND Deposit Debit Balance inquiry Operation request Balance inquiry I want to inquiry . | Chapter 3. OOP Basic ITSS Java Programming CAO Tuan-Dung, HUT Object - Oriented Real world concepts can be modeled in a computer program The program is made of objects with certain properties and operations that the objects can perform It is not important how an object is implemented, but what it does Every object is responsible for carrying out a set of related tasks HTTP request: HTTP method : Requesting method for Web servers such as GET method and POST method Request URI : URL information on Web server ‘form’ data : Information input by browser HTTP response: • Response message Status information which is the processing result of HTTP method • Contents type Contents type information on data to be transmitted • Request file Main information such as HTML files to be transmitted to HTTP request Object Oriented Real world Attribute Operation Account name: Duc Binh Balance: VND Deposit Debit Balance inquiry Operation request Balance inquiry I want to inquiry the balance Computer world Attribute name: Duc Binh Balance: VND Deposit() Withdraw() checkBalance() operation operation Account object User object Message transmission checkBalance() Class and Object A group of objects with similar properties and behaviors is described by a class. Class is a blueprint for an object. A class contains fields and methods that define the behavior of the object. A class is a description of a kind of object. Class and Objects Attribute name: Duc Binh Balance: VND Deposit() Withdraw() checkBalance() operation Account object of Mr Duc Binh Attribute name: Thu Lan Balance: VND Deposit() Withdraw() checkBalance() operation Account object of Mrs Thu Lan Account Class (model of objects) Attribute Definition of member variable String name; long balance; void deposit(int money); void withdraw() int checkBalance() Method definition operation INSTANTIATE Classes A class can contain data declarations and method declarations int

Không thể tạo bản xem trước, hãy bấm tải xuống
TÀI LIỆU MỚI ĐĂNG
7    74    2    23-04-2024
50    103    5    23-04-2024
Đã 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.