Finding the Code Responsible for Behavior

(Difference between revisions)
Jump to: navigation, search
(Created page with "__NOTOC__ {| border="1" |- |'''Title''' || Finding the Code Responsible for Behavior |- |'''Overview''' || High level description of what the student will do |- |'''Prerequi...")
 
Line 4: Line 4:
 
|'''Title''' || Finding the Code Responsible for Behavior
 
|'''Title''' || Finding the Code Responsible for Behavior
 
|-
 
|-
|'''Overview''' || High level description of what the student will do
+
|'''Overview''' || Java learners often wonder why certain behaviors are exhibited when a method is invoked. They tend to view the entire mechanism as "magic". This activity will show them that every behavior can be explained by looking at the code inside of the source class files (that are included in Java), while also strengthening their understanding of inheritance
 
|-  
 
|-  
|'''Prerequisite Knowledge''' || What topics and tools does the student need to know prior to beginning this activity?
+
|'''Prerequisite Knowledge''' || Invocation of Java methods (especially System.out.println and overloading), some inheritance concepts, some familiarity with the toString() method, .
 
|-
 
|-
|'''Learning Objectives''' || What should the student be able to do after completing completed this activity?
+
|'''Learning Objectives''' || 1) Fully understand the interaction of the println method with the toString method 2) Inheritance 3) How to locate the code responsible for the behavior of a method
|}
+
  
 
=== Background: ===
 
=== Background: ===
Is there background reading material?
+
Students should be able to create an ArrayList and it them out to the console without utilizing a for loop. Students should also be able to read the Java API and understand inheritance.
  
Are there other activities the student should have done first?
+
=== Directions: ===
 +
I can easily create an ArrayList of String named al, and add "a", "b", "c" and "d" to it. Then I can quickly print it out using the line of code System.out.println(al); This produces the output [a, b, c, d]
 +
Have you ever wondered why the output looks like this? Why are those "weird" brackets included in the output? Why are there commas between each String? Let's discover the answer!
  
What is the rational for this activity?
 
 
Include helpful hints to faculty here.
 
 
=== Directions: ===
 
What should the student do?
 
  
 
=== Deliverables: ===
 
=== Deliverables: ===

Revision as of 14:22, 28 May 2015

Title Finding the Code Responsible for Behavior
Overview Java learners often wonder why certain behaviors are exhibited when a method is invoked. They tend to view the entire mechanism as "magic". This activity will show them that every behavior can be explained by looking at the code inside of the source class files (that are included in Java), while also strengthening their understanding of inheritance
Prerequisite Knowledge Invocation of Java methods (especially System.out.println and overloading), some inheritance concepts, some familiarity with the toString() method, .
Learning Objectives 1) Fully understand the interaction of the println method with the toString method 2) Inheritance 3) How to locate the code responsible for the behavior of a method

Background:

Students should be able to create an ArrayList and it them out to the console without utilizing a for loop. Students should also be able to read the Java API and understand inheritance.

Directions:

I can easily create an ArrayList of String named al, and add "a", "b", "c" and "d" to it. Then I can quickly print it out using the line of code System.out.println(al); This produces the output [a, b, c, d] Have you ever wondered why the output looks like this? Why are those "weird" brackets included in the output? Why are there commas between each String? Let's discover the answer!


Deliverables:

What will the student hand in?

Assessment:

How will the activity be graded?

How will learning will be measured?

Include sample assessment questions/rubrics.

Comments:

What should the instructor know before using this activity?

What are some likely difficulties that an instructor may encounter using this activity?

Additional Information:

Knowledge Area/Knowledge Unit What ACM Computing Curricula 2013 https://www.acm.org/education/CS2013-final-report.pdf knowledge area and units does this activity cover?
Topic What specific topics are addressed? The Computing Curriucula 2013 provides a list of topics - https://www.acm.org/education/CS2013-final-report.pdf
Level of Difficulty Is this activity easy, medium or challenging?
Estimated Time to Completion How long should it take for the student to complete the activity?
Materials/Environment What does the student need? Internet access, IRC client, Git Hub account, LINUX machine, etc.?
Author Who wrote this activity?
Source Is there another activity on which this activity is based? If so, please provide a link to the original resource.
License Under which license is this material made available? (http://creativecommons.org/licenses/)


Suggestions for the Open Source Project:

Suggestions for an open source community member who is working in conjunction with the instructor.



This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License

CC license.png

Personal tools
Namespaces
Variants
Actions
Events
Learning Resources
HFOSS Projects
Evaluation
Navigation
Toolbox