Inheritance (Discussion 4) (Kế thừa trong Java) - Christine Zhou
- 페이지 수
- 19
- 형식
- PPTX
- 크기
- 671 KB
- Trường
- University of California, Berkeley
- 조회수
- 0
- 댓글
- 0
- Lượt tải
- 0
미리보기 생성 중...
Tài liệu thảo luận về kế thừa trong Java, bao gồm các khái niệm extends, interface, abstract class, static/dynamic types và bài tập ví dụ.
- 문서명
- Inheritance (Discussion 4) (Kế thừa trong Java) - Christine Zhou
- 학교 / 강의
- University of California, Berkeley · Lập trình Java
- 작성자 (문서 내)
- Christine Zhou
- 내용
- Tài liệu về kế thừa trong lập trình hướng đối tượng
- 목차
- Announcements
- Review: Inheritance
- Review: More Inheritance
- Review: Static/Dynamic Types
- 페이지 수
- 19 페이지
- 업로더
- Uni24h
설명
Trích nội dung tài liệu
Discussion 4: Inheritance Christine Zhou Agenda Announcements Review: Inheritance Problem 1 Review: More Inheritance Problem 2 Review: Static/Dynamic Types Problem 3 Announcements Office hours was crowded… Make sure to get started early and go to office hours earlier for help! Piazza questions: give us more information! What is the error that is being outputted? What have you tried to fix the error? Git-bug Proj0 due Monday 11:59PM See late policy on the course website HW2 due this Friday 11:59PM, go to OH early!! Guerrilla section planned for this weekend Saturday, 1-3PM in the labs Midterm next week on Wednesday 9/27 8-10PM Discussion survey: tinyurl.com/czdisc4 Review: Inheritance public class Fish { String name; public Fish(String name) {...} public class Goldfish { String name; public Goldfish(String name) {...} Public void eat() {...} public void blink() {...} public void eat() { print(“bloop”); ... } } public void blink() {...} } Review: Inheritance extends (can extend only one class) Inherits all instance variables and methods Constructor is not inherited, but there will be an implicit call to super( ) in the beginning of the subclass’s constructor (need to make the Fish before making the Goldfish) constructor() { this.hello = 10; constructor() { super(); SAME! } this.hello = 10; } constructor() { this.hello = 10; DIFFERENT! } this.hello = 10; constructor() { super(10); Review: Inheritance public class Fish { String name; public Fish(String name) {...} Public void eat() {...} public void blink() {...} public class Goldfish extends Fish { public Goldfish(String name) { super(name); // need to have this! ... } public void eat() { print(“bloop”); super.eat(); } } } 1 Creating Cats Given the Animal class, fill in the definition of the Cat class so that it makes a "Meow!" noise when greet() is called. Assume this noise is all caps for kittens (less than 2 years old). How similar are Cats with Animals? How do we t
자주 묻는 질문
이 문서는 무료인가요?
네. “Inheritance (Discussion 4) (Kế thừa trong Java) - Christine Zhou” 문서는 무료입니다. 로그인 후 '다운로드'를 클릭하여 원본 파일을 받으세요.
이 문서는 몇 페이지로 되어 있나요?
이 문서는 19페이지입니다, Lập trình Java 과정용. 다운로드하기 전에 온라인으로 미리 볼 수 있습니다.
다운로드하기 전에 미리 볼 수 있나요?
네. 이 페이지의 온라인 리더를 통해 문서를 미리 본 후 다운로드 여부를 결정할 수 있습니다.
Inheritance (Discussion 4) (Kế thừa trong Java) - Christine Zhou
미리보기 생성 중...
Trích nội dung tài liệu
Discussion 4: Inheritance Christine Zhou Agenda Announcements Review: Inheritance Problem 1 Review: More Inheritance Problem 2 Review: Static/Dynamic Types Problem 3 Announcements Office hours was crowded… Make sure to get started early and go to office hours earlier for help! Piazza questions: give us more information! What is the error that is being outputted? What have you tried to fix the error? Git-bug Proj0 due Monday 11:59PM See late policy on the course website HW2 due this Friday 11:59PM, go to OH early!! Guerrilla section planned for this weekend Saturday, 1-3PM in the labs Midterm next week on Wednesday 9/27 8-10PM Discussion survey: tinyurl.com/czdisc4 Review: Inheritance public class Fish { String name; public Fish(String name) {...} public class Goldfish { String name; public Goldfish(String name) {...} Public void eat() {...} public void blink() {...} public void eat() { print(“bloop”); ... } } public void blink() {...} } Review: Inheritance extends (can extend only one class) Inherits all instance variables and methods Constructor is not inherited, but there will be an implicit call to super( ) in the beginning of the subclass’s constructor (need to make the Fish before making the Goldfish) constructor() { this.hello = 10; constructor() { super(); SAME! } this.hello = 10; } constructor() { this.hello = 10; DIFFERENT! } this.hello = 10; constructor() { super(10); Review: Inheritance public class Fish { String name; public Fish(String name) {...} Public void eat() {...} public void blink() {...} public class Goldfish extends Fish { public Goldfish(String name) { super(name); // need to have this! ... } public void eat() { print(“bloop”); super.eat(); } } } 1 Creating Cats Given the Animal class, fill in the definition of the Cat class so that it makes a "Meow!" noise when greet() is called. Assume this noise is all caps for kittens (less than 2 years old). How similar are Cats with Animals? How do we t
- 문서명
- Inheritance (Discussion 4) (Kế thừa trong Java) - Christine Zhou
- 학교 / 강의
- University of California, Berkeley · Lập trình Java
- 작성자 (문서 내)
- Christine Zhou
- 내용
- Tài liệu về kế thừa trong lập trình hướng đối tượng
- 목차
- Announcements
- Review: Inheritance
- Review: More Inheritance
- Review: Static/Dynamic Types
- 페이지 수
- 19 페이지
- 업로더
- Uni24h
댓글 (0)
댓글이 없습니다. 첫 댓글을 남겨보세요!
Java DataBase Connectivity - Kết nối kho dữ liệu Java
Ôn tập lập trình Java (MT2 Review Solutions) - Ching and Christines
Asymptotics II, Search Trees (Discussion 7) (Kỹ thuật phân tích thời gian chạy, cây tìm kiếm nhị phân) - Christine Zhou
Introduction to Java (Discussion 1) (Giới thiệu về Java) - Christine Zhou
Giáo trình Lập trình Java
Tổng hợp Đề Toán 5 - Luyện thi vào Lớp 6 - CLB EMath
Bài giảng vật lý đại cương (Chương 3) - Đỗ Ngọc Uấn
Chương 8.Nguyên tử - Vật lý đại cương 3 - TS.Nguyễn Thị Trang
Chương 7.Cơ học lượng tử - Vật lý đại cương 3 - TS.Nguyễn Thị Trang
Chương 6.Quang học lượng tử - Vật lý đại cương 3 - TS.Nguyễn Thị Trang

댓글 (0)
댓글이 없습니다. 첫 댓글을 남겨보세요!