Elissa Redmiles https://www.csteachingtips.org/ en Use slide puzzles to help students understand how packets get reassembled when they reach their destination because students need help creating a mental model and are often are amazed and confused by this process. https://www.csteachingtips.org/tip/use-slide-puzzles-help-students-understand-how-packets-get-reassembled-when-they-reach-their <!-- THEME DEBUG --> <!-- THEME HOOK: 'field' --> <!-- FILE NAME SUGGESTIONS: * field--node--title--tip.html.twig x field--node--title.html.twig * field--node--tip.html.twig * field--title.html.twig * field--string.html.twig * field.html.twig --> <!-- BEGIN OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/field--node--title.html.twig' --> <span class="field field--name-title field--type-string field--label-hidden">Use slide puzzles to help students understand how packets get reassembled when they reach their destination because students need help creating a mental model and are often are amazed and confused by this process.</span> <!-- END OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/field--node--title.html.twig' --> <!-- THEME DEBUG --> <!-- THEME HOOK: 'field' --> <!-- FILE NAME SUGGESTIONS: * field--node--uid--tip.html.twig x field--node--uid.html.twig * field--node--tip.html.twig * field--uid.html.twig * field--entity-reference.html.twig * field.html.twig --> <!-- BEGIN OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/field--node--uid.html.twig' --> <span class="field field--name-uid field--type-entity-reference field--label-hidden"> <!-- THEME DEBUG --> <!-- THEME HOOK: 'username' --> <!-- BEGIN OUTPUT from 'themes/contrib/bootstrap_barrio/templates/user/username.html.twig' --> <span>cstt</span> <!-- END OUTPUT from 'themes/contrib/bootstrap_barrio/templates/user/username.html.twig' --> </span> <!-- END OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/field--node--uid.html.twig' --> <!-- THEME DEBUG --> <!-- THEME HOOK: 'field' --> <!-- FILE NAME SUGGESTIONS: * field--node--created--tip.html.twig x field--node--created.html.twig * field--node--tip.html.twig * field--created.html.twig * field--created.html.twig * field.html.twig --> <!-- BEGIN OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/field--node--created.html.twig' --> <span class="field field--name-created field--type-created field--label-hidden"> <!-- THEME DEBUG --> <!-- THEME HOOK: 'time' --> <!-- BEGIN OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/time.html.twig' --> <time datetime="2015-05-27T12:25:41-07:00" title="Wednesday, May 27, 2015 - 12:25" class="datetime">Wed, 05/27/2015 - 12:25</time> <!-- END OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/time.html.twig' --> </span> <!-- END OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/field--node--created.html.twig' --> <!-- THEME DEBUG --> <!-- THEME HOOK: 'links__node' --> <!-- FILE NAME SUGGESTIONS: * links--node.html.twig x links--inline.html.twig * links--node.html.twig * links.html.twig --> <!-- BEGIN OUTPUT from 'themes/contrib/bootstrap_barrio/templates/navigation/links--inline.html.twig' --> <!-- END OUTPUT from 'themes/contrib/bootstrap_barrio/templates/navigation/links--inline.html.twig' --> <!-- THEME DEBUG --> <!-- THEME HOOK: 'addtoany_standard' --> <!-- FILE NAME SUGGESTIONS: * addtoany-standard--node--tip.html.twig * addtoany-standard--node.html.twig x addtoany-standard.html.twig --> <!-- BEGIN OUTPUT from 'modules/contrib/addtoany/templates/addtoany-standard.html.twig' --> <span class="a2a_kit a2a_kit_size_32 addtoany_list" data-a2a-url="https://www.csteachingtips.org/tip/use-slide-puzzles-help-students-understand-how-packets-get-reassembled-when-they-reach-their" data-a2a-title="Use slide puzzles to help students understand how packets get reassembled when they reach their destination because students need help creating a mental model and are often are amazed and confused by this process."><a class="a2a_button_facebook"><span class="a2a_label">Share Use slide puzzles to help students understand how packets get reassembled when they reach their destination because students need help creating a mental model and are often are amazed and confused by this process. with Facebook</span></a><a class="a2a_button_twitter"><span class="a2a_label">Share Use slide puzzles to help students understand how packets get reassembled when they reach their destination because students need help creating a mental model and are often are amazed and confused by this process. with Twitter</span></a></span> <!-- END OUTPUT from 'modules/contrib/addtoany/templates/addtoany-standard.html.twig' --> <!-- THEME DEBUG --> <!-- THEME HOOK: 'field' --> <!-- FILE NAME SUGGESTIONS: * field--node--body--tip.html.twig * field--node--body.html.twig * field--node--tip.html.twig * field--body.html.twig x field--text-with-summary.html.twig * field.html.twig --> <!-- BEGIN OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/field--text-with-summary.html.twig' --> <div class="clearfix text-formatted field field--name-body field--type-text-with-summary field--label-hidden field__item"><ul><li>Students are often amazed that this complex re-assemblage happens to all information!</li> <li>Provide an explanation of how the internet works focusing on sending pictures, then follow up with a demonstration/activity using slide puzzles to help students develop a concrete understanding for this idea.</li> <ul><li>This explanation and activity focus on how a full picture gets broken up into packets and needs to be reassembled.</li> </ul><li>Explanation:</li> <ul><li>When photographs (or other content) is sent over the internet from computer 1 to computer 2, it is broken up into discrete pieces called <em>packets</em>. </li> <li>These <em>packets</em> might not arrive at computer 2 in the same order they left computer 1 in.</li> <li>Therefore, when computer 2 gets all the <em>packets</em>, it has to put all the pieces together like a puzzle.</li> </ul><li>Activity:</li> <ul><li>Have a picture puzzle to be used for this class ready.</li> <ul><li>Note: You can use a small jigsaw puzzle, a slide-picture puzzle, or even a picture you cut with scissors. </li> <li>Elissa typically cuts a picture with scissors. </li> </ul><li>Pick one student to be computer 1 and one student to be computer 2.</li> <li>Give the slide picture puzzle, in the complete and correct order to computer 1.</li> <li>Tell the class that computer 1 is going to send this picture to computer 2, just like in your earlier explication. </li> <li>If you have 8 pieces, assign 8 students. to each walk one piece of the picture from computer 1 to computer 2. </li> <ul><li>Note: change the number of student volunteers to match the number of puzzle pieces there are. </li> </ul><li>Have each of these 8 student pick up a random piece of the puzzle and walk that one piece of the picture from computer 1 to computer 2. </li> <li>Have computer 2 work to put put the pieces of the puzzle back together.</li> <ul><li>If you can, project the puzzle arriving at computer 2 and being reassembled so the whole class can see.</li> </ul><li>Emphasize to the class that when these pieces get to computer 2, that person has to put them together again to make a picture, just like when the jumbled packets arrive through the internet. </li> </ul></ul></div> <!-- END OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/field--text-with-summary.html.twig' --> Wed, 27 May 2015 19:25:41 +0000 cstt 725 at https://www.csteachingtips.org Have students act out packet routing to learn about how information moves through the Internet in a way that is easy for them to understand and visualize. https://www.csteachingtips.org/tip/have-students-act-out-packet-routing-learn-about-how-information-moves-through-internet-way <!-- THEME DEBUG --> <!-- THEME HOOK: 'field' --> <!-- FILE NAME SUGGESTIONS: * field--node--title--tip.html.twig x field--node--title.html.twig * field--node--tip.html.twig * field--title.html.twig * field--string.html.twig * field.html.twig --> <!-- BEGIN OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/field--node--title.html.twig' --> <span class="field field--name-title field--type-string field--label-hidden">Have students act out packet routing to learn about how information moves through the Internet in a way that is easy for them to understand and visualize.</span> <!-- END OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/field--node--title.html.twig' --> <!-- THEME DEBUG --> <!-- THEME HOOK: 'field' --> <!-- FILE NAME SUGGESTIONS: * field--node--uid--tip.html.twig x field--node--uid.html.twig * field--node--tip.html.twig * field--uid.html.twig * field--entity-reference.html.twig * field.html.twig --> <!-- BEGIN OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/field--node--uid.html.twig' --> <span class="field field--name-uid field--type-entity-reference field--label-hidden"> <!-- THEME DEBUG --> <!-- THEME HOOK: 'username' --> <!-- BEGIN OUTPUT from 'themes/contrib/bootstrap_barrio/templates/user/username.html.twig' --> <span>cstt</span> <!-- END OUTPUT from 'themes/contrib/bootstrap_barrio/templates/user/username.html.twig' --> </span> <!-- END OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/field--node--uid.html.twig' --> <!-- THEME DEBUG --> <!-- THEME HOOK: 'field' --> <!-- FILE NAME SUGGESTIONS: * field--node--created--tip.html.twig x field--node--created.html.twig * field--node--tip.html.twig * field--created.html.twig * field--created.html.twig * field.html.twig --> <!-- BEGIN OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/field--node--created.html.twig' --> <span class="field field--name-created field--type-created field--label-hidden"> <!-- THEME DEBUG --> <!-- THEME HOOK: 'time' --> <!-- BEGIN OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/time.html.twig' --> <time datetime="2015-05-27T12:18:20-07:00" title="Wednesday, May 27, 2015 - 12:18" class="datetime">Wed, 05/27/2015 - 12:18</time> <!-- END OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/time.html.twig' --> </span> <!-- END OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/field--node--created.html.twig' --> <!-- THEME DEBUG --> <!-- THEME HOOK: 'links__node' --> <!-- FILE NAME SUGGESTIONS: * links--node.html.twig x links--inline.html.twig * links--node.html.twig * links.html.twig --> <!-- BEGIN OUTPUT from 'themes/contrib/bootstrap_barrio/templates/navigation/links--inline.html.twig' --> <!-- END OUTPUT from 'themes/contrib/bootstrap_barrio/templates/navigation/links--inline.html.twig' --> <!-- THEME DEBUG --> <!-- THEME HOOK: 'addtoany_standard' --> <!-- FILE NAME SUGGESTIONS: * addtoany-standard--node--tip.html.twig * addtoany-standard--node.html.twig x addtoany-standard.html.twig --> <!-- BEGIN OUTPUT from 'modules/contrib/addtoany/templates/addtoany-standard.html.twig' --> <span class="a2a_kit a2a_kit_size_32 addtoany_list" data-a2a-url="https://www.csteachingtips.org/tip/have-students-act-out-packet-routing-learn-about-how-information-moves-through-internet-way" data-a2a-title="Have students act out packet routing to learn about how information moves through the Internet in a way that is easy for them to understand and visualize."><a class="a2a_button_facebook"><span class="a2a_label">Share Have students act out packet routing to learn about how information moves through the Internet in a way that is easy for them to understand and visualize. with Facebook</span></a><a class="a2a_button_twitter"><span class="a2a_label">Share Have students act out packet routing to learn about how information moves through the Internet in a way that is easy for them to understand and visualize. with Twitter</span></a></span> <!-- END OUTPUT from 'modules/contrib/addtoany/templates/addtoany-standard.html.twig' --> <!-- THEME DEBUG --> <!-- THEME HOOK: 'field' --> <!-- FILE NAME SUGGESTIONS: * field--node--body--tip.html.twig * field--node--body.html.twig * field--node--tip.html.twig * field--body.html.twig x field--text-with-summary.html.twig * field.html.twig --> <!-- BEGIN OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/field--text-with-summary.html.twig' --> <div class="clearfix text-formatted field field--name-body field--type-text-with-summary field--label-hidden field__item"><ul><li>This activity, borrowed from Jan Plane at University Maryland, College Park, works especially well with younger students.</li> <li>Activity:</li> <ul><li>Assign all student to one of four roles: </li> <ul><li><b>Routers</b></li> <li><b>Packets</b></li> <li><b>Clients</b></li> <li><b>Servers</b></li></ul><li>Tell the students what each role is supposed to do.</li> <li>Give <b>Packet</b> students pieces of papers. </li> <li>Next, <b>Client</b> students send the <b>Packet</b> students to a particular series of <b>Routers.</b></li> <ul><li>Say <b>Client</b> student 1 send’s every other <b>Packet</b> student to <b>Router</b> student A or <b>Router</b> student B.</li> <ul><li>So a <b>Packet</b> student gets sent to <b>Router</b> student A, then the next <b>Packet</b> student gets sent to <b>Router B</b>, and then the next to <b>Router A</b>, and so on and so forth. </li></ul><li>Then <b>Router</b> students send the <b>Packet</b> student to another <b>Router</b> student. </li> <ul><li>Say <b>Router</b> A sends a <b>Packet</b> student to <b>Router</b> D.</li> <li>The <b>Packet</b> student walks over to <b>Router</b> D and that <b>Router</b> directs them to a <b>Server</b>. </li> <li>The <b>Packet</b> student gives the <b>Server</b> their piece of paper.</li> <li>The <b>Server</b> makes a modification to the paper (perhaps they’ll draw on it).</li> <li>Then the <b>Server</b> gives the paper back to the <b>Packet</b> and send the <b>Packet</b> to a <b>Router</b>.</li> <li>The <b>Router</b> sends them back to the <b>Client</b>. </li></ul></ul><li>Note: Depending on the number of students, you can make this more or less complex.</li></ul></ul></div> <!-- END OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/field--text-with-summary.html.twig' --> Wed, 27 May 2015 19:18:20 +0000 cstt 724 at https://www.csteachingtips.org Force students to explore inheritance and the Java APIs for ArrayList by writing code that HAS-A ArrayList or IS-A ArrayList. https://www.csteachingtips.org/tip/force-students-explore-inheritance-and-java-apis-arraylist-writing-code-has-arraylist-or <!-- THEME DEBUG --> <!-- THEME HOOK: 'field' --> <!-- FILE NAME SUGGESTIONS: * field--node--title--tip.html.twig x field--node--title.html.twig * field--node--tip.html.twig * field--title.html.twig * field--string.html.twig * field.html.twig --> <!-- BEGIN OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/field--node--title.html.twig' --> <span class="field field--name-title field--type-string field--label-hidden">Force students to explore inheritance and the Java APIs for ArrayList by writing code that HAS-A ArrayList or IS-A ArrayList.</span> <!-- END OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/field--node--title.html.twig' --> <!-- THEME DEBUG --> <!-- THEME HOOK: 'field' --> <!-- FILE NAME SUGGESTIONS: * field--node--uid--tip.html.twig x field--node--uid.html.twig * field--node--tip.html.twig * field--uid.html.twig * field--entity-reference.html.twig * field.html.twig --> <!-- BEGIN OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/field--node--uid.html.twig' --> <span class="field field--name-uid field--type-entity-reference field--label-hidden"> <!-- THEME DEBUG --> <!-- THEME HOOK: 'username' --> <!-- BEGIN OUTPUT from 'themes/contrib/bootstrap_barrio/templates/user/username.html.twig' --> <span>cstt</span> <!-- END OUTPUT from 'themes/contrib/bootstrap_barrio/templates/user/username.html.twig' --> </span> <!-- END OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/field--node--uid.html.twig' --> <!-- THEME DEBUG --> <!-- THEME HOOK: 'field' --> <!-- FILE NAME SUGGESTIONS: * field--node--created--tip.html.twig x field--node--created.html.twig * field--node--tip.html.twig * field--created.html.twig * field--created.html.twig * field.html.twig --> <!-- BEGIN OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/field--node--created.html.twig' --> <span class="field field--name-created field--type-created field--label-hidden"> <!-- THEME DEBUG --> <!-- THEME HOOK: 'time' --> <!-- BEGIN OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/time.html.twig' --> <time datetime="2015-05-26T17:26:22-07:00" title="Tuesday, May 26, 2015 - 17:26" class="datetime">Tue, 05/26/2015 - 17:26</time> <!-- END OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/time.html.twig' --> </span> <!-- END OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/field--node--created.html.twig' --> <!-- THEME DEBUG --> <!-- THEME HOOK: 'links__node' --> <!-- FILE NAME SUGGESTIONS: * links--node.html.twig x links--inline.html.twig * links--node.html.twig * links.html.twig --> <!-- BEGIN OUTPUT from 'themes/contrib/bootstrap_barrio/templates/navigation/links--inline.html.twig' --> <!-- END OUTPUT from 'themes/contrib/bootstrap_barrio/templates/navigation/links--inline.html.twig' --> <!-- THEME DEBUG --> <!-- THEME HOOK: 'addtoany_standard' --> <!-- FILE NAME SUGGESTIONS: * addtoany-standard--node--tip.html.twig * addtoany-standard--node.html.twig x addtoany-standard.html.twig --> <!-- BEGIN OUTPUT from 'modules/contrib/addtoany/templates/addtoany-standard.html.twig' --> <span class="a2a_kit a2a_kit_size_32 addtoany_list" data-a2a-url="https://www.csteachingtips.org/tip/force-students-explore-inheritance-and-java-apis-arraylist-writing-code-has-arraylist-or" data-a2a-title="Force students to explore inheritance and the Java APIs for ArrayList by writing code that HAS-A ArrayList or IS-A ArrayList."><a class="a2a_button_facebook"><span class="a2a_label">Share Force students to explore inheritance and the Java APIs for ArrayList by writing code that HAS-A ArrayList or IS-A ArrayList. with Facebook</span></a><a class="a2a_button_twitter"><span class="a2a_label">Share Force students to explore inheritance and the Java APIs for ArrayList by writing code that HAS-A ArrayList or IS-A ArrayList. with Twitter</span></a></span> <!-- END OUTPUT from 'modules/contrib/addtoany/templates/addtoany-standard.html.twig' --> <!-- THEME DEBUG --> <!-- THEME HOOK: 'field' --> <!-- FILE NAME SUGGESTIONS: * field--node--body--tip.html.twig * field--node--body.html.twig * field--node--tip.html.twig * field--body.html.twig x field--text-with-summary.html.twig * field.html.twig --> <!-- BEGIN OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/field--text-with-summary.html.twig' --> <div class="clearfix text-formatted field field--name-body field--type-text-with-summary field--label-hidden field__item"><ul><li>Students often don’t understand the motivation for Java inheritance and also have difficulty navigating Java API pages. </li> <ul><li>You can encourage students to explore the Java API using either of the two activities: </li> <ul><li>Activity A: Have students write a Java Class that HAS-A ArrayList</li> <li>Activity B: Have students write a Java Class that IS-A ArrayList</li> </ul></ul><li>Activity A: HAS-AN ArrayList</li> <ul><li>Assign students to write a class that has a Java ArrayList</li> <ul><li>This goal is to encourage them to explore Java APIs and call provided methods.</li> </ul><li>Ask students to look up available methods in java documentation for ArrayList and use those methods to implement the library methods</li> <ul><li>For example, you could have students write code to show them that you can build on all of the functionality of the Java library classes like the code shown below.</li> <ul><li><code>import java.util.ArrayList;<br /> public class Library{<br />     public ArrayList books;<br />     public void addBook(Book b){<br />         books.add(b);<br />     }<br /> }</code></li> </ul></ul></ul><li>Activity B: IS-AN ArrayList</li> <ul><li>Assign students to create a class that extends Java ArrayList to encourage them to explore Java APIs and call provided methods.</li> <ul><li>For example, you could have students write code like the code shown below to show students that you can build on all of the functionality of the parent class!</li> <ul><li><code>import java.util.ArrayList;<br /> public class Library extends ArrayList {<br />     public void add(Book b) {<br />         super.add(b); // calling the ArrayList method<br />     }<br /> }</code></li> </ul><li>Note from CS Teaching Tips Team: This has the unfortunate consequence that every public method provided by ArrayList is also available for your new class, which is probably not something you’d want.</li> </ul></ul></ul></div> <!-- END OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/field--text-with-summary.html.twig' --> Wed, 27 May 2015 00:26:22 +0000 cstt 723 at https://www.csteachingtips.org Walk students through clicking on links in Java Docs to figure out unknown words and concepts (like iterable) by exploring the detailed explanation; plus the AP test expects students to read Java Docs online. https://www.csteachingtips.org/tip/walk-students-through-clicking-links-java-docs-figure-out-unknown-words-and-concepts-iterable <!-- THEME DEBUG --> <!-- THEME HOOK: 'field' --> <!-- FILE NAME SUGGESTIONS: * field--node--title--tip.html.twig x field--node--title.html.twig * field--node--tip.html.twig * field--title.html.twig * field--string.html.twig * field.html.twig --> <!-- BEGIN OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/field--node--title.html.twig' --> <span class="field field--name-title field--type-string field--label-hidden">Walk students through clicking on links in Java Docs to figure out unknown words and concepts (like iterable) by exploring the detailed explanation; plus the AP test expects students to read Java Docs online. </span> <!-- END OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/field--node--title.html.twig' --> <!-- THEME DEBUG --> <!-- THEME HOOK: 'field' --> <!-- FILE NAME SUGGESTIONS: * field--node--uid--tip.html.twig x field--node--uid.html.twig * field--node--tip.html.twig * field--uid.html.twig * field--entity-reference.html.twig * field.html.twig --> <!-- BEGIN OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/field--node--uid.html.twig' --> <span class="field field--name-uid field--type-entity-reference field--label-hidden"> <!-- THEME DEBUG --> <!-- THEME HOOK: 'username' --> <!-- BEGIN OUTPUT from 'themes/contrib/bootstrap_barrio/templates/user/username.html.twig' --> <span>cstt</span> <!-- END OUTPUT from 'themes/contrib/bootstrap_barrio/templates/user/username.html.twig' --> </span> <!-- END OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/field--node--uid.html.twig' --> <!-- THEME DEBUG --> <!-- THEME HOOK: 'field' --> <!-- FILE NAME SUGGESTIONS: * field--node--created--tip.html.twig x field--node--created.html.twig * field--node--tip.html.twig * field--created.html.twig * field--created.html.twig * field.html.twig --> <!-- BEGIN OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/field--node--created.html.twig' --> <span class="field field--name-created field--type-created field--label-hidden"> <!-- THEME DEBUG --> <!-- THEME HOOK: 'time' --> <!-- BEGIN OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/time.html.twig' --> <time datetime="2015-05-26T11:57:04-07:00" title="Tuesday, May 26, 2015 - 11:57" class="datetime">Tue, 05/26/2015 - 11:57</time> <!-- END OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/time.html.twig' --> </span> <!-- END OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/field--node--created.html.twig' --> <!-- THEME DEBUG --> <!-- THEME HOOK: 'links__node' --> <!-- FILE NAME SUGGESTIONS: * links--node.html.twig x links--inline.html.twig * links--node.html.twig * links.html.twig --> <!-- BEGIN OUTPUT from 'themes/contrib/bootstrap_barrio/templates/navigation/links--inline.html.twig' --> <!-- END OUTPUT from 'themes/contrib/bootstrap_barrio/templates/navigation/links--inline.html.twig' --> <!-- THEME DEBUG --> <!-- THEME HOOK: 'addtoany_standard' --> <!-- FILE NAME SUGGESTIONS: * addtoany-standard--node--tip.html.twig * addtoany-standard--node.html.twig x addtoany-standard.html.twig --> <!-- BEGIN OUTPUT from 'modules/contrib/addtoany/templates/addtoany-standard.html.twig' --> <span class="a2a_kit a2a_kit_size_32 addtoany_list" data-a2a-url="https://www.csteachingtips.org/tip/walk-students-through-clicking-links-java-docs-figure-out-unknown-words-and-concepts-iterable" data-a2a-title="Walk students through clicking on links in Java Docs to figure out unknown words and concepts (like iterable) by exploring the detailed explanation; plus the AP test expects students to read Java Docs online. "><a class="a2a_button_facebook"><span class="a2a_label">Share Walk students through clicking on links in Java Docs to figure out unknown words and concepts (like iterable) by exploring the detailed explanation; plus the AP test expects students to read Java Docs online. with Facebook</span></a><a class="a2a_button_twitter"><span class="a2a_label">Share Walk students through clicking on links in Java Docs to figure out unknown words and concepts (like iterable) by exploring the detailed explanation; plus the AP test expects students to read Java Docs online. with Twitter</span></a></span> <!-- END OUTPUT from 'modules/contrib/addtoany/templates/addtoany-standard.html.twig' --> <!-- THEME DEBUG --> <!-- THEME HOOK: 'field' --> <!-- FILE NAME SUGGESTIONS: * field--node--body--tip.html.twig * field--node--body.html.twig * field--node--tip.html.twig * field--body.html.twig x field--text-with-summary.html.twig * field.html.twig --> <!-- BEGIN OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/field--text-with-summary.html.twig' --> <div class="clearfix text-formatted field field--name-body field--type-text-with-summary field--label-hidden field__item"><ul><li>Model how to read a Java API for students by showing how you would click on the names of classes and interfaces you don’t know to investigate what methods they have.</li> <li>Prompt students to explain what a particular method shown in the Java API returns.</li> <ul><li>Have them write on a piece of paper how they would call this method.</li> </ul></ul></div> <!-- END OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/field--text-with-summary.html.twig' --> Tue, 26 May 2015 18:57:04 +0000 cstt 722 at https://www.csteachingtips.org Have students act out diagrams they create of the stack and heap to extend this common drawing exercise and help them strengthen their mental models. https://www.csteachingtips.org/tip/have-students-act-out-diagrams-they-create-stack-and-heap-extend-common-drawing-exercise-and <!-- THEME DEBUG --> <!-- THEME HOOK: 'field' --> <!-- FILE NAME SUGGESTIONS: * field--node--title--tip.html.twig x field--node--title.html.twig * field--node--tip.html.twig * field--title.html.twig * field--string.html.twig * field.html.twig --> <!-- BEGIN OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/field--node--title.html.twig' --> <span class="field field--name-title field--type-string field--label-hidden">Have students act out diagrams they create of the stack and heap to extend this common drawing exercise and help them strengthen their mental models.</span> <!-- END OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/field--node--title.html.twig' --> <!-- THEME DEBUG --> <!-- THEME HOOK: 'field' --> <!-- FILE NAME SUGGESTIONS: * field--node--uid--tip.html.twig x field--node--uid.html.twig * field--node--tip.html.twig * field--uid.html.twig * field--entity-reference.html.twig * field.html.twig --> <!-- BEGIN OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/field--node--uid.html.twig' --> <span class="field field--name-uid field--type-entity-reference field--label-hidden"> <!-- THEME DEBUG --> <!-- THEME HOOK: 'username' --> <!-- BEGIN OUTPUT from 'themes/contrib/bootstrap_barrio/templates/user/username.html.twig' --> <span>cstt</span> <!-- END OUTPUT from 'themes/contrib/bootstrap_barrio/templates/user/username.html.twig' --> </span> <!-- END OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/field--node--uid.html.twig' --> <!-- THEME DEBUG --> <!-- THEME HOOK: 'field' --> <!-- FILE NAME SUGGESTIONS: * field--node--created--tip.html.twig x field--node--created.html.twig * field--node--tip.html.twig * field--created.html.twig * field--created.html.twig * field.html.twig --> <!-- BEGIN OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/field--node--created.html.twig' --> <span class="field field--name-created field--type-created field--label-hidden"> <!-- THEME DEBUG --> <!-- THEME HOOK: 'time' --> <!-- BEGIN OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/time.html.twig' --> <time datetime="2015-05-26T11:36:42-07:00" title="Tuesday, May 26, 2015 - 11:36" class="datetime">Tue, 05/26/2015 - 11:36</time> <!-- END OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/time.html.twig' --> </span> <!-- END OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/field--node--created.html.twig' --> <!-- THEME DEBUG --> <!-- THEME HOOK: 'links__node' --> <!-- FILE NAME SUGGESTIONS: * links--node.html.twig x links--inline.html.twig * links--node.html.twig * links.html.twig --> <!-- BEGIN OUTPUT from 'themes/contrib/bootstrap_barrio/templates/navigation/links--inline.html.twig' --> <!-- END OUTPUT from 'themes/contrib/bootstrap_barrio/templates/navigation/links--inline.html.twig' --> <!-- THEME DEBUG --> <!-- THEME HOOK: 'addtoany_standard' --> <!-- FILE NAME SUGGESTIONS: * addtoany-standard--node--tip.html.twig * addtoany-standard--node.html.twig x addtoany-standard.html.twig --> <!-- BEGIN OUTPUT from 'modules/contrib/addtoany/templates/addtoany-standard.html.twig' --> <span class="a2a_kit a2a_kit_size_32 addtoany_list" data-a2a-url="https://www.csteachingtips.org/tip/have-students-act-out-diagrams-they-create-stack-and-heap-extend-common-drawing-exercise-and" data-a2a-title="Have students act out diagrams they create of the stack and heap to extend this common drawing exercise and help them strengthen their mental models."><a class="a2a_button_facebook"><span class="a2a_label">Share Have students act out diagrams they create of the stack and heap to extend this common drawing exercise and help them strengthen their mental models. with Facebook</span></a><a class="a2a_button_twitter"><span class="a2a_label">Share Have students act out diagrams they create of the stack and heap to extend this common drawing exercise and help them strengthen their mental models. with Twitter</span></a></span> <!-- END OUTPUT from 'modules/contrib/addtoany/templates/addtoany-standard.html.twig' --> <!-- THEME DEBUG --> <!-- THEME HOOK: 'field' --> <!-- FILE NAME SUGGESTIONS: * field--node--body--tip.html.twig * field--node--body.html.twig * field--node--tip.html.twig * field--body.html.twig x field--text-with-summary.html.twig * field.html.twig --> <!-- BEGIN OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/field--text-with-summary.html.twig' --> <div class="clearfix text-formatted field field--name-body field--type-text-with-summary field--label-hidden field__item"><ul><li>Draw a picture of the stack and the heap in order to help students understand:</li> <ul><li>what really happens when they write their code. </li> <li>concepts like "mutable" and "deep vs. shallow copy." </li></ul><li>Sometimes students will say they understand the stack and heap diagrams, but they have an ah-ha moment after acting out how variables are passed between methods.</li> <li>Activity Prep:</li> <ul><li>Create a paper drawing or cutout of a cat. </li> <li>You could use something else to represent the variable, the using a cat to represent a cat will help students make the connection. </li> <li>Create a stack of papers that says "Cat c" to represent the cat drawing. </li></ul><li>Activity:</li> <ul><li>Write the following code on the board:</li> <ul><li><code>public static void main(String args[]){     Cat c = new Cat("sam", 9);     System.out.println(c);     foo(c);     System.out.println(c); } public void foo(Cat cat){     cat.moreLives(1); } </code></li></ul><li>Introduce the class to your drawing that is representing "Cat c". </li> <li>Ask for a volunteer to be the pointer to "Cat c", this student will point to the cat on the board and hold the paper that says "Cat c"</li> <li>Ask for a volunteer to represent the "foo" method.</li> <li>Now, have the student pointing to "Cat c" representation, give one "Cat c" card to the student representing the "foo" method.</li> <ul><li>Make sure the "Cat c" representative is still pointing to the cat on the board.</li></ul><li>The "foo" method student will draw a new number of lives on the "Cat c" object. </li> <li>Then have the student representing foo walk away.</li> </ul></ul></div> <!-- END OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/field--text-with-summary.html.twig' --> Tue, 26 May 2015 18:36:42 +0000 cstt 721 at https://www.csteachingtips.org Explain that Strings in Java are a weird-hybrid between a primitive and an Object and as a result they can’t be modified. https://www.csteachingtips.org/tip/explain-strings-java-are-weird-hybrid-between-primitive-and-object-and-result-they-cant-be <!-- THEME DEBUG --> <!-- THEME HOOK: 'field' --> <!-- FILE NAME SUGGESTIONS: * field--node--title--tip.html.twig x field--node--title.html.twig * field--node--tip.html.twig * field--title.html.twig * field--string.html.twig * field.html.twig --> <!-- BEGIN OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/field--node--title.html.twig' --> <span class="field field--name-title field--type-string field--label-hidden">Explain that Strings in Java are a weird-hybrid between a primitive and an Object and as a result they can’t be modified.</span> <!-- END OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/field--node--title.html.twig' --> <!-- THEME DEBUG --> <!-- THEME HOOK: 'field' --> <!-- FILE NAME SUGGESTIONS: * field--node--uid--tip.html.twig x field--node--uid.html.twig * field--node--tip.html.twig * field--uid.html.twig * field--entity-reference.html.twig * field.html.twig --> <!-- BEGIN OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/field--node--uid.html.twig' --> <span class="field field--name-uid field--type-entity-reference field--label-hidden"> <!-- THEME DEBUG --> <!-- THEME HOOK: 'username' --> <!-- BEGIN OUTPUT from 'themes/contrib/bootstrap_barrio/templates/user/username.html.twig' --> <span>cstt</span> <!-- END OUTPUT from 'themes/contrib/bootstrap_barrio/templates/user/username.html.twig' --> </span> <!-- END OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/field--node--uid.html.twig' --> <!-- THEME DEBUG --> <!-- THEME HOOK: 'field' --> <!-- FILE NAME SUGGESTIONS: * field--node--created--tip.html.twig x field--node--created.html.twig * field--node--tip.html.twig * field--created.html.twig * field--created.html.twig * field.html.twig --> <!-- BEGIN OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/field--node--created.html.twig' --> <span class="field field--name-created field--type-created field--label-hidden"> <!-- THEME DEBUG --> <!-- THEME HOOK: 'time' --> <!-- BEGIN OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/time.html.twig' --> <time datetime="2015-05-26T11:17:08-07:00" title="Tuesday, May 26, 2015 - 11:17" class="datetime">Tue, 05/26/2015 - 11:17</time> <!-- END OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/time.html.twig' --> </span> <!-- END OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/field--node--created.html.twig' --> <!-- THEME DEBUG --> <!-- THEME HOOK: 'links__node' --> <!-- FILE NAME SUGGESTIONS: * links--node.html.twig x links--inline.html.twig * links--node.html.twig * links.html.twig --> <!-- BEGIN OUTPUT from 'themes/contrib/bootstrap_barrio/templates/navigation/links--inline.html.twig' --> <!-- END OUTPUT from 'themes/contrib/bootstrap_barrio/templates/navigation/links--inline.html.twig' --> <!-- THEME DEBUG --> <!-- THEME HOOK: 'addtoany_standard' --> <!-- FILE NAME SUGGESTIONS: * addtoany-standard--node--tip.html.twig * addtoany-standard--node.html.twig x addtoany-standard.html.twig --> <!-- BEGIN OUTPUT from 'modules/contrib/addtoany/templates/addtoany-standard.html.twig' --> <span class="a2a_kit a2a_kit_size_32 addtoany_list" data-a2a-url="https://www.csteachingtips.org/tip/explain-strings-java-are-weird-hybrid-between-primitive-and-object-and-result-they-cant-be" data-a2a-title="Explain that Strings in Java are a weird-hybrid between a primitive and an Object and as a result they can’t be modified."><a class="a2a_button_facebook"><span class="a2a_label">Share Explain that Strings in Java are a weird-hybrid between a primitive and an Object and as a result they can’t be modified. with Facebook</span></a><a class="a2a_button_twitter"><span class="a2a_label">Share Explain that Strings in Java are a weird-hybrid between a primitive and an Object and as a result they can’t be modified. with Twitter</span></a></span> <!-- END OUTPUT from 'modules/contrib/addtoany/templates/addtoany-standard.html.twig' --> <!-- THEME DEBUG --> <!-- THEME HOOK: 'field' --> <!-- FILE NAME SUGGESTIONS: * field--node--body--tip.html.twig * field--node--body.html.twig * field--node--tip.html.twig * field--body.html.twig x field--text-with-summary.html.twig * field.html.twig --> <!-- BEGIN OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/field--text-with-summary.html.twig' --> <div class="clearfix text-formatted field field--name-body field--type-text-with-summary field--label-hidden field__item"><ul><li>Draw students’ attention to the fact that Strings are Objects, but, because they can’t be modified, work more like a primitive when you initialize them and when you pass them between methods.</li> <li>When you initialize a String in Java, it can look very similar to initializing an int!</li> <ul><li><code>String s = "cat"; int x = 7;</code></li></ul><li>One way to help students recognize how strings are like Objects is to point out the need for using the keyword new when use the String constructor. </li> <ul><li><code>String s = new String("cat");<code></code></code></li></ul></ul><img alt="Diagram that shows how strings are represented in data like objects despite their declaration like primitives" title="Data structure for strings" src="http://csteachingtips.org/images/ElissaRedmiles1.png" /></div> <!-- END OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/field--text-with-summary.html.twig' --> Tue, 26 May 2015 18:17:08 +0000 cstt 720 at https://www.csteachingtips.org Use Clock as an example of an abstract class because ALL clocks have the same mechanism for keeping time, a necessary property for an Abstract Class, to provide students with a strong real-world mental model for abstract classes. https://www.csteachingtips.org/tip/use-clock-example-abstract-class-because-all-clocks-have-same-mechanism-keeping-time-necessary <!-- THEME DEBUG --> <!-- THEME HOOK: 'field' --> <!-- FILE NAME SUGGESTIONS: * field--node--title--tip.html.twig x field--node--title.html.twig * field--node--tip.html.twig * field--title.html.twig * field--string.html.twig * field.html.twig --> <!-- BEGIN OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/field--node--title.html.twig' --> <span class="field field--name-title field--type-string field--label-hidden">Use Clock as an example of an abstract class because ALL clocks have the same mechanism for keeping time, a necessary property for an Abstract Class, to provide students with a strong real-world mental model for abstract classes.</span> <!-- END OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/field--node--title.html.twig' --> <!-- THEME DEBUG --> <!-- THEME HOOK: 'field' --> <!-- FILE NAME SUGGESTIONS: * field--node--uid--tip.html.twig x field--node--uid.html.twig * field--node--tip.html.twig * field--uid.html.twig * field--entity-reference.html.twig * field.html.twig --> <!-- BEGIN OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/field--node--uid.html.twig' --> <span class="field field--name-uid field--type-entity-reference field--label-hidden"> <!-- THEME DEBUG --> <!-- THEME HOOK: 'username' --> <!-- BEGIN OUTPUT from 'themes/contrib/bootstrap_barrio/templates/user/username.html.twig' --> <span>cstt</span> <!-- END OUTPUT from 'themes/contrib/bootstrap_barrio/templates/user/username.html.twig' --> </span> <!-- END OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/field--node--uid.html.twig' --> <!-- THEME DEBUG --> <!-- THEME HOOK: 'field' --> <!-- FILE NAME SUGGESTIONS: * field--node--created--tip.html.twig x field--node--created.html.twig * field--node--tip.html.twig * field--created.html.twig * field--created.html.twig * field.html.twig --> <!-- BEGIN OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/field--node--created.html.twig' --> <span class="field field--name-created field--type-created field--label-hidden"> <!-- THEME DEBUG --> <!-- THEME HOOK: 'time' --> <!-- BEGIN OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/time.html.twig' --> <time datetime="2015-05-26T11:06:16-07:00" title="Tuesday, May 26, 2015 - 11:06" class="datetime">Tue, 05/26/2015 - 11:06</time> <!-- END OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/time.html.twig' --> </span> <!-- END OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/field--node--created.html.twig' --> <!-- THEME DEBUG --> <!-- THEME HOOK: 'links__node' --> <!-- FILE NAME SUGGESTIONS: * links--node.html.twig x links--inline.html.twig * links--node.html.twig * links.html.twig --> <!-- BEGIN OUTPUT from 'themes/contrib/bootstrap_barrio/templates/navigation/links--inline.html.twig' --> <!-- END OUTPUT from 'themes/contrib/bootstrap_barrio/templates/navigation/links--inline.html.twig' --> <!-- THEME DEBUG --> <!-- THEME HOOK: 'addtoany_standard' --> <!-- FILE NAME SUGGESTIONS: * addtoany-standard--node--tip.html.twig * addtoany-standard--node.html.twig x addtoany-standard.html.twig --> <!-- BEGIN OUTPUT from 'modules/contrib/addtoany/templates/addtoany-standard.html.twig' --> <span class="a2a_kit a2a_kit_size_32 addtoany_list" data-a2a-url="https://www.csteachingtips.org/tip/use-clock-example-abstract-class-because-all-clocks-have-same-mechanism-keeping-time-necessary" data-a2a-title="Use Clock as an example of an abstract class because ALL clocks have the same mechanism for keeping time, a necessary property for an Abstract Class, to provide students with a strong real-world mental model for abstract classes."><a class="a2a_button_facebook"><span class="a2a_label">Share Use Clock as an example of an abstract class because ALL clocks have the same mechanism for keeping time, a necessary property for an Abstract Class, to provide students with a strong real-world mental model for abstract classes. with Facebook</span></a><a class="a2a_button_twitter"><span class="a2a_label">Share Use Clock as an example of an abstract class because ALL clocks have the same mechanism for keeping time, a necessary property for an Abstract Class, to provide students with a strong real-world mental model for abstract classes. with Twitter</span></a></span> <!-- END OUTPUT from 'modules/contrib/addtoany/templates/addtoany-standard.html.twig' --> <!-- THEME DEBUG --> <!-- THEME HOOK: 'field' --> <!-- FILE NAME SUGGESTIONS: * field--node--body--tip.html.twig * field--node--body.html.twig * field--node--tip.html.twig * field--body.html.twig x field--text-with-summary.html.twig * field.html.twig --> <!-- BEGIN OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/field--text-with-summary.html.twig' --> <div class="clearfix text-formatted field field--name-body field--type-text-with-summary field--label-hidden field__item"><ul><li>This is a good example of an abstract class because all clocks have shared functionality. </li> <ul><li>For example, in the code below, we assume that all classes that extend the abstract class Clock would want to have an int to store hours, minutes, and seconds, and need a tick() method.</li> <li>The display() method is left as an abstract method for child classes to define since different clocks may use digital or analog displays.</li> <li><code>public abstract class Clock{<br />     int h,m,s;<br />     boolean AM;<br />     public void tick(){<br />         s++;<br />         if(s==60){<br />             s=0;<br />             m++;<br />         }<br />         if(m==60){<br />             m=0;<br />             h++;<br />         }<br />         if (h==12){<br />             AM = !AM;<br />         }<br />     }<br />     public void display();<br /> }</code></li> </ul></ul></div> <!-- END OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/field--text-with-summary.html.twig' --> Tue, 26 May 2015 18:06:16 +0000 cstt 718 at https://www.csteachingtips.org Use Car as an example of an interface because students agree on the general behaviors of a car but can only come up with specific instantiations of cars, which provides students with a strong mental model for interface relationships. https://www.csteachingtips.org/tip/use-car-example-interface-because-students-agree-general-behaviors-car-can-only-come-specific <!-- THEME DEBUG --> <!-- THEME HOOK: 'field' --> <!-- FILE NAME SUGGESTIONS: * field--node--title--tip.html.twig x field--node--title.html.twig * field--node--tip.html.twig * field--title.html.twig * field--string.html.twig * field.html.twig --> <!-- BEGIN OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/field--node--title.html.twig' --> <span class="field field--name-title field--type-string field--label-hidden">Use Car as an example of an interface because students agree on the general behaviors of a car but can only come up with specific instantiations of cars, which provides students with a strong mental model for interface relationships.</span> <!-- END OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/field--node--title.html.twig' --> <!-- THEME DEBUG --> <!-- THEME HOOK: 'field' --> <!-- FILE NAME SUGGESTIONS: * field--node--uid--tip.html.twig x field--node--uid.html.twig * field--node--tip.html.twig * field--uid.html.twig * field--entity-reference.html.twig * field.html.twig --> <!-- BEGIN OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/field--node--uid.html.twig' --> <span class="field field--name-uid field--type-entity-reference field--label-hidden"> <!-- THEME DEBUG --> <!-- THEME HOOK: 'username' --> <!-- BEGIN OUTPUT from 'themes/contrib/bootstrap_barrio/templates/user/username.html.twig' --> <span>cstt</span> <!-- END OUTPUT from 'themes/contrib/bootstrap_barrio/templates/user/username.html.twig' --> </span> <!-- END OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/field--node--uid.html.twig' --> <!-- THEME DEBUG --> <!-- THEME HOOK: 'field' --> <!-- FILE NAME SUGGESTIONS: * field--node--created--tip.html.twig x field--node--created.html.twig * field--node--tip.html.twig * field--created.html.twig * field--created.html.twig * field.html.twig --> <!-- BEGIN OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/field--node--created.html.twig' --> <span class="field field--name-created field--type-created field--label-hidden"> <!-- THEME DEBUG --> <!-- THEME HOOK: 'time' --> <!-- BEGIN OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/time.html.twig' --> <time datetime="2015-05-26T10:58:05-07:00" title="Tuesday, May 26, 2015 - 10:58" class="datetime">Tue, 05/26/2015 - 10:58</time> <!-- END OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/time.html.twig' --> </span> <!-- END OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/field--node--created.html.twig' --> <!-- THEME DEBUG --> <!-- THEME HOOK: 'links__node' --> <!-- FILE NAME SUGGESTIONS: * links--node.html.twig x links--inline.html.twig * links--node.html.twig * links.html.twig --> <!-- BEGIN OUTPUT from 'themes/contrib/bootstrap_barrio/templates/navigation/links--inline.html.twig' --> <!-- END OUTPUT from 'themes/contrib/bootstrap_barrio/templates/navigation/links--inline.html.twig' --> <!-- THEME DEBUG --> <!-- THEME HOOK: 'addtoany_standard' --> <!-- FILE NAME SUGGESTIONS: * addtoany-standard--node--tip.html.twig * addtoany-standard--node.html.twig x addtoany-standard.html.twig --> <!-- BEGIN OUTPUT from 'modules/contrib/addtoany/templates/addtoany-standard.html.twig' --> <span class="a2a_kit a2a_kit_size_32 addtoany_list" data-a2a-url="https://www.csteachingtips.org/tip/use-car-example-interface-because-students-agree-general-behaviors-car-can-only-come-specific" data-a2a-title="Use Car as an example of an interface because students agree on the general behaviors of a car but can only come up with specific instantiations of cars, which provides students with a strong mental model for interface relationships."><a class="a2a_button_facebook"><span class="a2a_label">Share Use Car as an example of an interface because students agree on the general behaviors of a car but can only come up with specific instantiations of cars, which provides students with a strong mental model for interface relationships. with Facebook</span></a><a class="a2a_button_twitter"><span class="a2a_label">Share Use Car as an example of an interface because students agree on the general behaviors of a car but can only come up with specific instantiations of cars, which provides students with a strong mental model for interface relationships. with Twitter</span></a></span> <!-- END OUTPUT from 'modules/contrib/addtoany/templates/addtoany-standard.html.twig' --> <!-- THEME DEBUG --> <!-- THEME HOOK: 'field' --> <!-- FILE NAME SUGGESTIONS: * field--node--body--tip.html.twig * field--node--body.html.twig * field--node--tip.html.twig * field--body.html.twig x field--text-with-summary.html.twig * field.html.twig --> <!-- BEGIN OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/field--text-with-summary.html.twig' --> <div class="clearfix text-formatted field field--name-body field--type-text-with-summary field--label-hidden field__item"><ul><li>It is really important to provide students with tangible motivation for interfaces and inheritance.</li> <li>Activity: </li> <ul><li>Ask a student to draw a "general car." </li> <li>They’ll quickly realize (or you’ll point out) that you’re not drawing a general car. Rather they are drawing a specific car! (a Bug, a Jeep, etc.) </li> <ul><li>Connect this realization to the idea of interfaces. </li> </ul><li>Make interfaces intuitive by explaining that you can never really have a general car, but there is shared behaviors (i.e. methods) for cars. </li> <ul><li>Additionally, cars wouldn’t be an abstract class because the internal components of a car might have no similarity.</li> </ul><li>Then, create sample code for the interface Car and an inheriting class like the following:</li> <ul><li><code>public interface Car{<br />     String brand, model;<br />     double speed;<br />     int xCoord, int yCorod;<br />     public void move();<br /> }</code></li> <li><code>public class OffRoadCar implements Car{<br />     boolean bikeRack=true;<br />     public void move(){<br />         xCoord++;<br />     }<br /> }</code></li> </ul></ul></ul></div> <!-- END OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/field--text-with-summary.html.twig' --> Tue, 26 May 2015 17:58:05 +0000 cstt 717 at https://www.csteachingtips.org