Week 1: Basics of Java Programming
Objectives:
Knowledge: Understand the basic concepts of Java programming, including its syntax,
structure, and fundamental programming constructs.
Skills: Write simple Java programs that perform basic operations such as input/output
and arithmetic calculations.
Attitude: Develop a positive attitude towards learning Java and a willingness to tackle
programming challenges.
Subject Matter:
Introduction to Java
Basic Syntax and Structure
Variables and Data Types
Input and Output
Materials:
Computer with Java Development Kit (JDK) installed
Integrated Development Environment (IDE) such as Eclipse or IntelliJ IDEA
Projector and whiteboard
Handouts with sample code and exercises
Procedure:
A. Activity (30 minutes)
1. Introduction to Java: Provide an overview of Java, its history, and its applications.
Discuss its importance in the programming world.
2. Demonstration: Show a simple Java program, such as "Hello, World!", and explain each
component (e.g., class, main method, print statement).
3. Hands-On: Students will write their own "Hello, World!" program using the provided
IDE and tools.
B. Analysis (20 minutes)
1. Discussion: Analyze the basic syntax and structure of a Java program. Discuss Java’s
syntax rules, such as case sensitivity and semicolons.
2. Q&A: Address any questions related to Java’s syntax and the structure of the sample
program.
C. Application (30 minutes)
1. Guided Practice: Provide exercises that involve basic operations:
o Write a program to perform simple arithmetic calculations (addition, subtraction,
multiplication, division).
o Create a program that takes user input and displays it.
2. Debugging Exercise: Encourage students to debug a simple program with intentional
errors to understand common syntax and logic errors.
D. Attraction (10 minutes)
1. Interactive Quiz: Conduct a short quiz or game to reinforce the basic concepts learned.
Use tools like Kahoot or a simple hand-raising quiz.
2. Real-World Examples: Share examples of Java applications in real-world scenarios,
such as Android app development or enterprise software.
E. Assessment and Follow-Ups (30 minutes)
1. Assessment: Review students' programs to assess their understanding and correct
implementation of basic Java syntax and structure.
2. Feedback: Provide feedback on students’ programs, highlighting common mistakes and
areas for improvement.
3. Follow-Up: Assign additional exercises for practice, such as:
o Writing a program that calculates the area of a rectangle based on user input.
o Creating a program that converts temperature from Celsius to Fahrenheit and vice
versa.
Week 2: Control Structures in Java
Objectives:
Knowledge: Understand and apply control structures in Java, including conditional
statements and loops.
Skills: Write Java programs that utilize control structures to make decisions and repeat
actions.
Attitude: Develop a problem-solving mindset and a positive attitude towards debugging
and managing control flow in programs.
Subject Matter:
Conditional Statements (if, else, switch)
Looping Constructs (for, while, do-while)
Basic Algorithms involving control structures
Materials:
Computer with Java Development Kit (JDK) installed
Integrated Development Environment (IDE) such as Eclipse or IntelliJ IDEA
Projector and whiteboard
Handouts with sample code and exercises
Procedure:
A. Activity (30 minutes)
1. Introduction to Control Structures: Explain the purpose and usage of control structures
in Java. Describe conditional statements and loops.
2. Demonstration: Show examples of if, else, switch, for, while, and do-while loops
in Java.
3. Hands-On: Students will write simple programs using control structures, such as a
program that determines whether a number is positive, negative, or zero using if-else
statements.
B. Analysis (20 minutes)
1. Discussion: Analyze how different control structures impact the flow of a program.
Discuss the scenarios where each type is most appropriate.
2. Q&A: Address questions related to implementing control structures, handling edge cases,
and common errors.
C. Application (30 minutes)
1. Guided Practice: Provide exercises that involve using control structures:
o Write a program to calculate the factorial of a number using a for loop.
o Create a program to display a menu and perform different actions based on user
choice using a switch statement.
o Implement a program that uses a while loop to find the sum of integers from 1 to
a given number.
D. Attraction (10 minutes)
1. Interactive Coding Challenge: Organize a short coding challenge where students solve
a problem using control structures, such as creating a basic number guessing game.
2. Real-World Examples: Discuss real-world applications of control structures, such as in
game development or user input validation.
E. Assessment and Follow-Ups (30 minutes)
1. Assessment: Review students' programs to evaluate their understanding and correct
usage of control structures.
2. Feedback: Provide feedback on students’ code, focusing on logic, efficiency, and
handling of control flow.
3. Follow-Up: Assign additional exercises for practice, such as:
o Writing a program to generate Fibonacci numbers up to a given limit using a
while loop.
o Creating a program that classifies input strings based on certain criteria (e.g.,
length or content) using if-else statements.
Week 3: Functions and Methods in Java
Objectives:
Knowledge: Understand the concepts of functions (methods) in Java, including their
definition, declaration, and usage.
Skills: Write and use methods to create modular and reusable code in Java programs.
Attitude: Appreciate the benefits of modular programming and develop a systematic
approach to problem-solving by breaking problems into smaller, manageable methods.
Subject Matter:
Methods: Definition, Declaration, and Usage
Method Parameters and Return Types
Method Overloading
Scope and Lifetime of Variables
Recursion (basic introduction)
Materials:
Computer with Java Development Kit (JDK) installed
Integrated Development Environment (IDE) such as Eclipse or IntelliJ IDEA
Projector and whiteboard
Handouts with sample code and exercises
Procedure:
A. Activity (30 minutes)
1. Introduction to Methods: Explain the purpose and structure of methods in Java. Discuss
method definition, declaration, and calling.
2. Demonstration: Show examples of methods with different return types and parameters
on the projector. Include examples of method overloading.
3. Hands-On: Students will write simple methods to perform tasks such as calculating the
area of a circle or determining the maximum of two numbers.
B. Analysis (20 minutes)
1. Discussion: Analyze how methods improve code readability and reusability. Discuss the
concepts of method parameters, return values, and method overloading.
2. Q&A: Address questions related to method syntax, parameter passing, and return values.
C. Application (30 minutes)
1. Guided Practice: Provide exercises involving method creation and usage:
o Write a method that takes two integers and returns their sum. Implement a
program that calls this method and displays the result.
o Create a method to check if a number is prime. Write a program that uses this
method to test a series of numbers.
o Implement a method that calculates the factorial of a number using recursion
(basic introduction to recursion).
D. Attraction (10 minutes)
1. Interactive Coding Activity: Organize a mini-competition where students write and
share methods to solve a particular problem, such as creating a method to reverse an
array.
2. Real-World Examples: Discuss real-world applications of methods, such as in libraries
or APIs, to illustrate the importance of modular programming.
E. Assessment and Follow-Ups (30 minutes)
1. Assessment: Review students' methods to assess their understanding and correct
implementation of method concepts.
2. Feedback: Provide feedback on students’ code, focusing on correctness, efficiency, and
method design.
3. Follow-Up: Assign additional exercises for practice, such as:
o Creating a program that uses multiple methods to perform a series of operations,
such as converting units of measurement or processing user input.
o Writing a method to sort an array using a simple sorting algorithm (e.g., bubble
sort) and testing it with different datasets.
Week 4: Arrays and Strings in Java
Objectives:
Knowledge: Understand arrays and strings in Java, including their definition,
declaration, and basic operations.
Skills: Write Java programs that utilize arrays and strings to store, manipulate, and
process data.
Attitude: Develop a meticulous approach to handling data structures and enhance
problem-solving skills related to arrays and strings.
Subject Matter:
Arrays: Definition, Declaration, Initialization, and Basic Operations
Multi-Dimensional Arrays
Strings: Definition, Operations, and String Methods
Materials:
Computer with Java Development Kit (JDK) installed
Integrated Development Environment (IDE) such as Eclipse or IntelliJ IDEA
Projector and whiteboard
Handouts with sample code and exercises
Procedure:
A. Activity (30 minutes)
1. Introduction to Arrays: Explain what arrays are, how they store multiple values of the
same type, and how they are used in Java. Discuss array declaration, initialization, and
accessing elements.
2. Demonstration: Show examples of 1D and 2D arrays, including basic operations like
traversing and modifying array elements.
3. Hands-On: Students will create and manipulate arrays to perform simple tasks, such as
finding the average of numbers in an array.
B. Analysis (20 minutes)
1. Discussion: Analyze the advantages of using arrays and how they can be used in various
scenarios. Discuss the concept of multi-dimensional arrays and their applications.
2. Q&A: Address questions related to array indices, bounds, and common errors in array
manipulation.
C. Application (30 minutes)
1. Guided Practice: Provide exercises involving arrays and strings:
o Write a program to sort an array of integers in ascending order using a sorting
algorithm (e.g., bubble sort).
o Create a program that uses a 2D array to perform matrix operations, such as
matrix addition or multiplication.
o Implement a program that processes strings, including reversing a string, counting
occurrences of characters, and checking for palindromes.
D. Attraction (10 minutes)
1. Interactive Coding Challenge: Organize a coding challenge where students solve a
problem using arrays and strings, such as implementing a basic text-based game or a
simple data analysis task.
2. Real-World Examples: Discuss real-world applications of arrays and strings, such as in
data processing, simulations, or user input handling.
E. Assessment and Follow-Ups (30 minutes)
1. Assessment: Review students' programs to evaluate their understanding and correct
implementation of arrays and strings.
2. Feedback: Provide feedback on students’ code, focusing on array manipulation, string
handling, and overall program structure.
3. Follow-Up: Assign additional exercises for practice, such as:
o Writing a program that calculates the median of an array of numbers.
o Creating a program that performs various string operations, such as concatenation,
substring extraction, and comparison.