For Loops
Designed for students learning Java programming, that are beyond the use of block code, the students will make a program that uses a for loop and be able to explain what each component of the for loop does and the syntax of the for loop in Java.
OVERVIEW
Activity Overview:
Designed for students learning Java programming, that are beyond the use of block code, the students will make a program that uses a for loop and be able to explain what each component of the for loop does and the syntax of the for loop in Java.
Meta description
- Subject Area: Computer Science, Mathematics
- Grade Level : 9-12
- Computer Science Domains:
- Computing Systems, Algorithms and Programming
- Computer Science Principles:
- Collaborating Around Computing, Developing and Using Abstractions, Creating Computational Artifacts, Testing and Refining Computational Artifacts
- Materials:
- None, IDE
- Considerations:
- You need to be comfortable using an IDE like https://www.onlinegdb.com. Always try the lesson first and make sure you have a program that runs before trying to walk students through it.
Lesson Plan
Overview
Designed for students learning Java programming, that are beyond the use of block code, the students will make a program that uses a for loop and be able to explain what each component of the for loop does and the syntax of the for loop in Java.
ASSESSMENT PRE/POST-TEST
What is a for loop? What are the components and syntax of a for loop in the Java programming language?
OBJECTIVES
Students will be able to write a program in the Java language that uses a for loop and explain the critical components/syntax of this type of loop.
CATCH/HOOK
https://www.youtube.com/watch?v=GwcisLY5avc (8 minute video)
ACTIVITY INSTRUCTIONS
Reiterate what the for loop is. Show slide that is attached. Students will follow along with teacher to code a simple program. Photo of the program is attached. Everyone will try to run their programs and classmates will help each other to debug when problems arise.
Supplements
Any items in this section are the property & under the license of their respective owners.
REVIEW
Revisit the Java syntax and then use www.w3schools.com to compare the syntax of a for loop for a couple of other programming languages.
STANDARDS
| Type | Listing |
|---|---|
| CS Domains | Computing Systems, Algorithms and Programming |
| CS Principles | Collaborating Around Computing, Developing and Using Abstractions, Creating Computational Artifacts, Testing and Refining Computational Artifacts |
| Other Content Standards | Wyoming Boot Up L1.AP.C.01, L1.AP.C.02, L1.AP.C.03 |