Classwork and Homework posted on edmodo.com
Lab review questions.
AP Exam 2009, questions 1, 3 and 4.
Concepts Refresher:
Default Constructor:
The default constructor is the no-argument constructor automatically generated unless you define another constructor. It initialises any uninitialised fields to their default values. For your example, it would look like this assuming that the types are String, int and int:
public Module() { super(); this.name = null; this.credits = 0; this.hours = 0; }
This is exactly the same as
public Module() {}
And exactly the same as having no constructors at all. However, if you define at least one constructor, the default constructor is not generated.
Method Overloading and Method Overriding.
1) In Method Overloading your method calls to the methods are decided by the compiler in the sense that which function is going to be called is decided by your compiler at compile time. Hence being EARLY BINDING.
2) In method Overriding, it is decided at RUNTIME which method is going to be called. So it is reffered as LATE BINDING.