AP Exam Review: Concepts Refresher

May 1st, 2015
Screen Shot 2014-09-17 at 12.56.56 PM

Classwork and Homework posted on edmodo.com
Lab review questions.
AP Exam 2009, questions 1, 3 and 4.

Concepts Refresher:

Screen Shot 2015-04-30 at 9.11.51 PM
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.

Screen Shot 2015-04-30 at 9.26.09 PM

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.