TAILIEUCHUNG - Introduction to java programming: Chapter 9 - Inheritance and Polymorphism

Introduction to java programming: Chapter 9 - Inheritance and Polymorphism's Objectives is to develop a subclass from a superclass through inheritance; invoke the superclass’s constructors and methods using the super keyword; override methods in the subclass; distinguish differences between overriding and overloading. | Chapter 9 Inheritance and Polymorphism Liang Introduction to Java Programming Sixth Edition c 2005 Pearson Education Inc. All rights reserved. 0-13-148952-6 1 Objectives To develop a subclass from a superclass through inheritance . To invoke the superclass s constructors and methods using the super keyword . To override methods in the subclass . To distinguish differences between overriding and overloading . To explore the useful methods equals Object hashCode toString fìnalize clone and getClass in the Object class optional . To comprehend polymorphism dynamic binding and generic programming . To describe casting and explain why explicit downcasting is necessary . To store retrieve and manipulates objects in an ArrayList . To implement a Stack class using ArrayList . To restrict access to data and methods using the protected visibility modifier . To declare constants unmodifiable methods and nonextendable classes using the final modifier . Optional To understand the effect of hiding data fields and static methods . Optional To initialize data using initialization blocks and to distinguish between instance initialization and static initialization blocks . Optional GUI To use inheritance in GUI programming . Liang Introduction to Java Programming Sixth Edition c 2005 Pearson Education Inc. All 2 rights reserved. 0-13-148952-6 2 Superclasses and Subclasses GeometricObject -color String -filled boolean -dateCreated The color of the object default white . Indicates whether the object is filled with a color default false . The date when the object was created. GeometricObj ect getColor String setColor color String void isFilled boolean setFilled filled boolean void getDateCreated toString String Creates a GeometricObject. Returns the color. Sets a new color. Returns the filled property. Sets a new filled property. Returns the dateCreated. Returns a string representation of .

TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã 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.