Tina Comston
Comp-111 Week 5
Franklin University
Week 5
Preparation
    • Read Chapter 3  (sections 3.6 - 3.7)  and Chapter 4 (sections 4.1 - 4.3) in the COMP 111 Reading Guide.
      Guided Learning Activity
      Assignment - no homework this week

      Implicit versus Explicit parameters

      Parameters are values that are passed to methods when called.  

      Implicit parameter - this parameter is always passed to a method.  This parameter is "implied".  This parameter is the object that is calling the method.

      tmpClient.getAddress();

      In the above call to the method getAddress(), the object that is calling the method is the tmpClient object.  tmpClient is the implicit parameter.

      Explicit parameter - this parameter(s) may or may not be passed to a method.  The explicit parameter(s) are included within the parenthesis of the method call.  There may be none to many explicit parameters passed to a method.

      tmpClient.setAddress("123 Main St.");

      In the above call to the setAddress() method, the explicit parameter is "123 Main St".

      YouTube video on implicit versus explicit https://www.youtube.com/watch?v=0Pr5A9R2s-s

      this keyword

      When writing a class, you do not know what objects will be created or what object variable names will be given to that object.  But you do know the instance variables and methods that will be available to the object because you have written the blueprint for the object in your class.

      In the object you will need to be able to refer to the instance variables of the object, the methods of that object etc.  To do that you use the "this" keyword.  

      For example

      this.name = inName;

      this.name refers to the instance variable of an object

      Above you learned the difference between an implicit and explicit parameter.  In essence the "this" keyword is referring the implicit parameter.

      YouTube video on the "this" keyword
      https://www.youtube.com/watch?v=8hgzqEi9b64
      Exam 1
      • I recommend that you contact your proctor a couple of days prior to when you plan on taking the test and verify that the test has been received and that the proctor/office is open.  You will need to allow a minimum of 2-3 hours for taking the test.  It must be taken all at one time.  You cannot take half  at one time, take a break, and then take the rest.  
      Reflection Paper
      • Continue journaling each week for your reflection paper.  Remember - this is not a recitation of the topics introduced in the course, this is a paper that is all about you.  Your struggles, your triumphs, etc.
      Lab 2
      • Although Lab 2 is not due this week, it's best not to wait to begin working on this project.  Read through the instructions. Make sure you have a clear understanding of what is needed.