Lesson Plan: Introduction & Core Programming
๐ฏ Learning Objectives
By the end of this lesson, students will:
- Understand what software engineering is and why it matters.
- Grasp basic programming concepts: variables, control flow, and functions.
- Write simple programs in Python or Java.
- Begin developing problem-solving skills through hands-on labs.
---
๐ Part 1: Overview of Software Engineering
- Definition: Software engineering is the disciplined approach to designing, building, testing, and maintaining software.
- Key aspects:
- Reliability (software should work correctly)
- Efficiency (software should run smoothly)
- Maintainability (software should be easy to update)
- Collaboration (software is often built in teams)
- Discussion prompt: Why do we call it engineering rather than just coding?
---
๐ป Part 2: Programming Fundamentals
Variables
- Store data values (e.g., numbers, text).
- Example in Python:
`python
age = 21
name = "Elara"
`
- Example in Java:
`java
int age = 21;
String name = "Elara";
`
Control Flow
- Conditionals: Decide what code runs based on conditions.
`python
if age >= 18:
print("Adult")
else:
print("Minor")
`
- Loops: Repeat actions.
`java
for(int i=0; i<5; i++) {
System.out.println("Hello");
}
`
Functions
- Reusable blocks of code.
`python
def greet(name):
return "Hello, " + name
print(greet("Elara"))
`
---
๐งช Part 3: Hands-On Labs
- Lab 1: Write a program that asks for a user’s name and age, then prints a personalized greeting.
- Lab 2: Create a simple calculator that adds, subtracts, multiplies, and divides two numbers.
- Lab 3: Write a function that checks if a number is prime.
---
๐ Wrap-Up & Reflection
- Recap: Software engineering is about building reliable, efficient, and maintainable systems.
- Students now know how to use variables, control flow, and functions.
- Reflection question: How does breaking problems into smaller steps make programming easier?
---
0