CSCB07H3 Lecture 8: Lecture 8 Note

76 views1 pages
29 Oct 2015
School
Course

Document Summary

Announcement: lab 1,2: to be granted this week. Declares a function in java: includes visibility modi er, includes the type of the return value: a) void: nothing is returned, includes types of all parameters. In general: getter is better than acquires internal variables. Constructor: if no constructor is manually de ned, then a constructor with no argument is implicitly de ned, a constructor in a child class always calls a constructor in a parent class. If the call is not speci ed, it implicitly calls a constructor with no arguments. a) solution 1: create another constructor in person. b) solution 2: call the parent constructor instead of using setters.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents