COSC 111 Lecture Notes - Lecture 25: Reference Class Problem, Instance Variable, Local Variable

112 views3 pages
Verified Note

Document Summary

Polymorphism (this will not be discussed in this course) This = reference than an object can use to refer to itself. A class member can be referenced from anywhere within the class. A constructor can only be invoked within another constructor public class circle extends shape{ private int radius; public circle() { this(10); public circle(int radius) { this. radius = radius; Super = refers to the superclass of the class where this super is in can reference class members in the superclass. A constructor in the class can invoke another constructor in the superclass. = if a subclass extends a class, all the constructors of the class is inherited to the subclass. = when passing arguments to methods, the what"s going in to the method"s parameter is a copy of the variable that the method called. = a value is passed to method"s parameter, so there"s now two objects.

Get access

Grade+
$40 USD/m
Billed monthly
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
10 Verified Answers
Class+
$30 USD/m
Billed monthly
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
7 Verified Answers

Related Documents