SHS Ict 11 M1
SHS Ict 11 M1
SHS Ict 11 M1
Region V
Division of City Schools
Naga City
DON LEON Q. MERCADO HIGH SCHOOL
PROGRAMMING
JAVA
GRADE 11
Quarter 3 Week 1 Module 1
Learning Competency:
INTRODUCTION TO PROGRAMMING
LESSON 1
INTRODUCTION TO
PROGRAMMING
SENIOR HIGH SCHOOL
GRADE 11
Before starting the module, I want you to set aside other tasks that will disturb you while
enjoying the lessons. Read the simple instructions below to successfully enjoy the
objectives of this kit. Have fun!
1. Follow carefully all the contents and instructions indicated in every page of this module
and follow the given instructions for each of the given learning outcome/s.
2. As you read, you can also do the hands-on to check if you were able to follow the
basic programming procedure.
3. Demonstrate what you have learned by doing what the Activity required you to do so.
4. Analyze conceptually the posttest and apply what you have learned.
5. Enjoy studying!
PARTS OF TH MODULE
Before starting the module, I want you to set aside other tasks that will disturb you while
enjoying the lessons. Read the simple instructions below to successfully enjoy the
objectives of this kit. Have fun!
1. Follow carefully all the contents and instructions indicated in every page of this module
and follow the given instructions for each of the given learning outcome/s.
2. As you read, you can also do the hands-on to check if you were able to follow the
basic programming procedure.
3. Demonstrate what you have learned by doing what the Activity required you to do so.
4. Analyze conceptually the posttest and apply what you have learned.
5. Enjoy studying!
• Expectations - These are what you will be able to know after completing the lessons in
the module.
• Pre-test - This will measure your prior knowledge and the concepts to be mastered
throughout the lesson.
• Technical terms - A word that has a specific meaning within a specific field of
expertise.
• Looking Back to your Lesson - This section will measure what learnings and skills did
you understand from the previous lesson.
• Brief Introduction- This section will give you an overview of the lesson.
• Activities - This is a set of activities you will perform with a partner.
• Remember - This section summarizes the concepts and applications of the lessons.
• Check your Understanding- It will verify how you learned from the lesson.
• Post-test - This will measure how much you have learned from the entire module.
INTRODUCTION TO PROGRAMMING
, LESSON 1
OVERVIEW OF COMPUTER PROGRAMMING
EXPECTATIONS:
TECHNICAL TERMS:
A. What is the specific problem you want to solve or the task you want it to accomplish?
B. What facts will we learn from the process?
C. What formulas are applicable to the issue at hand?
D. What will be added or no longer exist?
2. Finding your starting and ending point are crucial to listing the steps of the process. To
determine a starting point, determine the answer to these questions, except?
4. To use a real-world example, let’s say your goal is to have lasagna for dinner. You’ve
determined that the starting point is to find a recipe, and that the end result is that you’ll
have a lasagna fully cooked and ready to eat by 7 PM. What will you do?
5. Now that you’ve written your algorithm, it’s time to evaluate the process by?
A. Review the algorithm.
B. List the steps from start to finish.
C. Find the ending point of the algorithm.
D. Determine how will you accomplish each step.
A. PSEUDOCODE
B. ALGORITHM
C. PROGRAMMING LANGUAGE
D. COMPILER
7. A programming statement may be translated into one or several machine instructions by
a ________.
A. Compiler
B. Assembler
C. Algorithm
D. Pseudocode
8. A programs that are needed to keep all the hardware and software systems running
together smoothly.
A. Application System
B. System Program
C. Program
D. Compiler
A. Algorithm
B. Program
C. Pseudocode
D. Compiler
BRIEF INTRODUCTION
Software
A software is the program that a computer uses in order to function. It is kept on
some hardware device like a hard disk, but it itself is intangible. The data that the
computer uses can be anything that a program needs. Programs acts like
instructions for the
processor.
1. Systems Programs
• Programs that are needed to keep all the hardware and software systems running
together smoothly
• Examples:
• Operating Systems like Linux, Windows, Unix, Solaris, MacOS
2. Application Programs
• Programs that people use to get their work done
• Examples:
• Word Processor
• Game programs
• Spreadsheets
3. Compilers
• The computer understands only one language: machine language. Machine
language is in the form of ones and zeros. Since it is highly impractical for people
to create programs out of zeros and ones, there must be a way of translating or
converting a language which we understand into machine language, for this
purpose, there exists compilers.
There are different types of programming languages that can be used to create
programs, but regardless of what language you use, these instructions are
translated into machine language that can be understood by computers.
Categories of Programming Languages
Programmers do not sit down and start writing code right away when trying to
make a computer program. Instead, they follow an organized plan or methodology,
that breaks the process into a series of tasks.
Here are the basic steps in trying to solve a problem on the computer:
1. Problem Definition
2. Problem Analysis
3. Algorithm design and representation (Pseudocode or flowchart)
4. Coding and debugging
Problem Definition
A programmer is usually given a task in the form of a problem. Before a program can be
designed to solve a particular problem, the problem must be well and clearly defined first
in terms of its input and output requirements.
A clearly defined problem is already half the solution. Computer programming requires
us to define the problem first before we even try to create a solution.
“Create a program that will determine the number of times a name occurs in a list.”
Problem Analysis
After the problem has been adequately defined, the simplest and yet the most
efficient and effective approach to solve the problem must be formulated.
Usually, this step involves breaking up the problem into smaller and simpler sub
problems.
Example Problem:
Once our problem is clearly defined, we can now set to finding a solution. In
computer programming, it is normally required to express our solution in a step-by-
step manner.
Now given the problem defined in the previous sections, how do we express our
general solution in such a way that it is simple yet understandable?
PROGRAMMING ALGORITHM
You probably wish you could see an example, right? So, what exactly does an algorithm in
programming look like? Well, asking a user for an email address is probably one of the most
common tasks a web-based program might need to do, so that is what we will use here for an
example. An algorithm can be written as a list of steps using text. We will make one of each
which you will see here:
Wasn't that easy? Notice how the top of our example is just a numbered list of steps using
plain English, stating exactly what we want the procedure to do (no more, no less). That's a
nice thing here, because in one of our steps (step 7) a decision must be made and,
depending on the result of that decision, our steps may not go in order from start to end.
Let's take a quick run through our little recipe:
1. Step 1 is really just a reminder that this is a procedure with a beginning and an end.
2. In step 2, we make a place in the computer to store what the user types in, also called a
variable
3. In step 3, we clear this variable because we might need to use it again and don't want the
old contents mixed in with the new.
4. In step 4, we prompt the user for an email address
5. In step 5, we stick it in our nifty variable.
6. In step 6, we tell our computer to take a close look at this email address-- is it really an
email address?
ALGORITHM EXAMPLES
EXAMPLE 1: Write an algorithm to convert the length in feet to centimeter
.
Step 1: Input Lft
Step 2: Lcm=Lft x 30
Step 3: Print Lcm
EXAMPLE 2: Write an algorithm that will read the two sides of a rectangle and calculate its
area.
Step 1: Input W,L
Step 2: A=LxW
Step 3: Print A
ACTIVITIES
3. Write an algorithm that will calculate the roots of a quadratic equation ax2+bx+c=0. Hint:
d=sqrt(b2-4ac), and the roots are: x1=(-b+d)/2a and x2=(-b-d)/2a
4. Write an algorithm that reads two values, determine the largest value and prints the
largest value with an identifying message.
REMEMBERING
Multiple Choice: Choose the letter of the correct answer that referred to the statements
below on the steps in writing an algorithm.
A. What is the specific problem you want to solve or the task you want it to accomplish?
B. What facts will we learn from the process?
C. What formulas are applicable to the issue at hand?
D. What will be added or no longer exist?
2. Finding your starting and ending point are crucial to listing the steps of the process. To
determine a starting point, determine the answer to these questions, except?
4. To use a real-world example, let’s say your goal is to have lasagna for dinner. You’ve
determined that the starting point is to find a recipe, and that the end result is that you’ll
have a lasagna fully cooked and ready to eat by 7 PM. What will you do?
5. Now that you’ve written your algorithm, it’s time to evaluate the process by?
A. Review the algorithm.
B. List the steps from start to finish.
C. Find the ending point of the algorithm.
D. Determine how will you accomplish each step.
A. PSEUDOCODE
B. ALGORITHM
C. PROGRAMMING LANGUAGE
D. COMPILER
7. A programming statement may be translated into one or several machine instructions by
a ________.
A. Compiler
B. Assembler
C. Algorithm
D. Pseudocode
8. A programs that are needed to keep all the hardware and software systems running
together smoothly.
A. Application System
B. System Program
C. Program
D. Compiler
A. Algorithm
B. Program
C. Pseudocode
D. Compiler
LESSON 1 - Let’s do the checking
1. B
2. A
3. C
4. B
5. B
6. A
7. C
8. B
9. A
10. C
ACTIVITIES
CHECK YOUR UNDERSTANDING
Answer: An algorithm makes the whole procedure more efficient as well consistent. It helps in
identifying decision points, processes, and essential variables to solve the problem. A programmer
can also see the errors in a particular process using an algorithm.
REFERENCES:
https://sielearning.tafensw.edu.au/toolboxes/Database_Administration/software/content/pro
grammingconstructs/control_structures.htm
https://study.com/academy/lesson/what-is-an-algorithm-in-programming-definition-examples-
analysis.html
Java-student-Manual-Programming1
PREPARED BY:
HAZEL B. FRANCE
Teacher