This lesson discusses printing a message in Java. Instead of extending Karel, students will now extend Console Program to print to the Console.
public class Welcome extends ConsoleProgram
{
public void run()
{
System.out.println("*insert message here* ");
System.out.println("*insert message here* ");
}
}
Students will be able to:
System.out.print
and System.out.println
This lesson introduces students to the foundational concept of variables in Java, including declaring, assigning, and initializing variables. Through a series of videos, hands-on activities, and exercises, students will explore how different data types work in Java and how to use variables effectively in their programs. The lesson aims to build a strong understanding of variables to support future programming concepts.
Students will be able to:
This lesson focuses on handling user input in Java. Students will learn how to capture and utilize user inputs through variables and practice with hands-on exercises involving personal data and creative writing. By exploring examples and completing exercises, students will gain practical experience in using user input commands and applying them in various contexts.
Students will be able to:
This lesson introduces students to writing programs that solve arithmetic expressions in Java. Students will learn about using variables for computation, handling different data types, and understanding potential pitfalls such as round-off errors and integer overflow. The activities are designed to build a strong foundation in arithmetic operations and computational accuracy in Java.
Students will be able to:
In this lesson, students will explore the concept of type casting in Java, a process where one data type is converted into another. Through various hands-on activities, they will learn how to cast variables between different types, understand the implications of casting, and apply these concepts to real-world problems like rounding numbers and managing data types in mathematical expressions.
Students will be able to:
int
to double
and vice versaIn this lesson, students will explore the concept of Boolean logic in Java, focusing on the creation and usage of Boolean variables. Through hands-on activities, they will learn how to work with Boolean expressions, apply them in conditional statements, and understand their significance in controlling program flow. The lesson will emphasize the importance of Boolean logic in decision-making processes, both in programming and in real-world scenarios.
Students will be able to:
In this lesson, students will delve into the use of logical operators in Java to create complex conditional statements. By exploring examples and exercises, students will learn how to combine multiple conditions using logical operators like &&
(AND), ||
(OR), and !
(NOT) to control the flow of their programs. This lesson emphasizes the importance of logical thinking in programming and how it can be applied to solve real-world problems, such as determining grade ranges or evaluating multiple criteria.
Students will be able to:
&&
, ||
, and !
to create compound Boolean expressionsIn this lesson, students will explore comparison operators in Java, which are essential for making decisions within a program. By learning how to compare variables using operators such as ==
, !=
, >
, <
, >=
, and <=
, students will gain the ability to evaluate expressions and control the flow of their programs based on conditions. Through a series of examples and hands-on exercises, students will understand how comparison operators are used in real-world scenarios, such as grading systems, and apply these concepts to their own programming projects.
Students will be able to:
In this lesson, students will learn about the structure and application of for loops in Java, an essential programming construct for automating repetitive tasks. By understanding how to create, control, and manipulate loops, students will develop the ability to perform tasks such as counting, summing, and iterating over sequences of numbers. The lesson includes hands-on activities where students will apply for loops to solve real-world problems, enhancing their logical thinking and coding skills.
Students will be able to:
In this lesson, students will explore the concept of while loops in Java, a fundamental control structure used to repeat a block of code as long as a specified condition is true. Through examples and exercises, students will learn how to create and control while loops, understand the risks of infinite loops, and compare while loops with other loop structures like for loops. By the end of the lesson, students will have a solid understanding of when and how to use while loops effectively in their programs.
Students will be able to:
In this lesson, students will explore the use of if statements in Java to control the flow of their programs based on boolean conditions. They will practice implementing and nesting if statements to solve various problems, including determining even and odd numbers, finding minimum values, and evaluating voting eligibility. Through hands-on activities and exercises, students will gain a deeper understanding of conditional logic and its applications in programming.
Students will be able to:
In this lesson, students will explore the concept of the “loop-and-a-half” in Java programming, which involves using a while loop with a break statement to handle specific conditions. They will practice implementing and comparing loop-and-a-half constructs with traditional while loops through examples and exercises. The goal is to understand the efficiency and application of different looping techniques in programming.
Students will be able to:
In this lesson, students will learn about short circuit evaluation in Java, a technique used in logical operations to optimize code performance and prevent unnecessary execution of expressions. By understanding how short circuiting works with logical AND (&&
) and OR (||
) operators, students will gain the ability to write more efficient and safe code. The lesson includes truth table explorations, examples, and exercises that emphasize the practical applications of short circuit evaluation in programming.
Students will be able to:
In this lesson, students will be introduced to De Morgan’s Laws, fundamental rules in logic and Boolean algebra that describe the relationship between conjunctions and disjunctions in expressions. These laws are essential for simplifying and understanding complex Boolean expressions in programming. Through examples, visual aids like truth tables and Venn diagrams, and hands-on exercises, students will learn to apply De Morgan’s Laws to optimize and clarify code.
Students will be able to:
In this lesson, students will be introduced to Strings, a fundamental data type in Java used to store and manipulate text. They will learn how to create, compare, and modify Strings using built-in methods, including .equals()
. Through practical examples and exercises, students will explore how Strings can be used in programming to handle user input, perform comparisons, and manage text-based data.
Students will be able to:
.equals()
methodIn this lesson, students will complete a comprehensive quiz covering the basic Java concepts learned in previous lessons. This quiz is designed to assess students’ understanding of key programming principles and their ability to apply these concepts in a variety of scenarios. The quiz will help students identify areas where they may need additional practice and reinforce their knowledge in preparation for more advanced topics.
Students will be able to