Skip to content

A program demonstrating the use of Super class and Method in inheritance and how i would affect in calling other classes! this exercise is good for tracing and finding the output!

Notifications You must be signed in to change notification settings

MSH-trojan/Java_21_Inheritance_Tracing_Exercise_1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

Java_21_Inheritance_Tracing_Exercise_1

This exercise uses classes without data (“utility-type” classes).

Rules used in tracing this code:

1- Analyze one-by-one the statements in main()

The first thing the constructor of a subclass will do is to call the constructor of the superclass; when there is no such call in the code, the default super() will automatically be called;

this(0); is the constructor of the current class with the parameter 0

s.poit(s2); means the method poit(s2) of a Bird object, with the parameter s2 of Loony type; this means that the control will go to the method narf() of Loony class.

About

A program demonstrating the use of Super class and Method in inheritance and how i would affect in calling other classes! this exercise is good for tracing and finding the output!

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages