STE Computer Programming Q3 MODULE 7 8

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 15

10

Computer
Programming
Quarter III – Module 7-8:
Performing a Simple Case Study
Using Control Statements

"Designed by macrovector / Freepik"


Computer Programming – Grade 10
Self-Learning Module
First Edition, 2020

Republic Act 8293, section 176 states that: No copyright shall subsist in
any work of the Government of the Philippines. However, prior approval of the
government agency or office wherein the work is created shall be necessary for
exploitation of such work for profit. Such agency or office may, among other things,
impose as a condition the payment of royalties.

Borrowed materials (i.e., songs, stories, poems, pictures, photos, brand


names, trademarks, etc.) included in this module are owned by their respective
copyright holders. Every effort has been exerted to locate and seek permission to
use these materials from their respective copyright owners. The publisher and
authors do not represent nor claim ownership over them.

Published by the Department of Education – Regional Office VIII


Regional Director: Ramir B. Uytico EdD, CESO IV
Assistant Regional Director: Arnulfo M. Balane, CESO V

Development Team of the Module


Writer: John Jayson S. Chan
Language Editors: Name
Content Editors: Erdenan S. Labrador
Illustrators:
Layout Artist:
Management Team:
Rosemarie M. Guino EdD, OIC – Chief, CLMD
Ryan R. Tiu EdD, EPS, CLMD – Science
Joy B. Bihag, EPS, CLMD – LRMS
Name, Chief, CID
Name, EPS, CID – Science
Name. EPS, CID - LRMS

Printed in the Philippines by ________________________

Department of Education – Regional Office VIII

Office Address: Government Center, Candahug, Palo, Leyte


Telefax: 053 - 3233156
E-mail Address: [email protected].
Introductory Message
This Self-Learning Module (SLM) is prepared so that you, our dear learners,
can continue your studies and learn while at home. Activities, questions,
directions, exercises, and discussions are carefully stated for you to understand
each lesson.

Each SLM is composed of different parts. Each part shall guide you step-by-
step as you discover and understand the lesson prepared for you.

At the end of each module, you need to answer the test to self-check your
learning. Answer keys are provided for each activity and test. We trust that you will
be honest in using these.

In addition to the material in the main text, Notes to the Teacher are also
provided to our facilitators and parents for strategies and reminders on how they
can best help you on your home-based learning.

Please use this module with care. Do not put unnecessary marks on any
part of this SLM. Use a separate sheet of paper in answering the exercises and
tests. And read the instructions carefully before performing each task.

If you have any questions in using this SLM or any difficulty in answering
the tasks in this module, do not hesitate to consult your teacher or facilitator.

Thank you.
For the learner:
Welcome to the Computer Programming – Learning Module 7-8 on Case Study
using Control Statements

The hand is one of the most symbolized part of the human body. It is often used to
depict skill, action, and purpose. Through our hands we may learn, create, and
accomplish. Hence, the hand in this learning resource signifies that you as a
learner is capable and empowered to successfully achieve the relevant
competencies and skills at your own pace and time. Your academic success lies in
your own hands!

This module was designed to provide you with fun and meaningful opportunities
for guided and independent learning at your own pace and time. You will be
enabled to process the contents of the learning resource while being an active
learner.

This module has the following parts and corresponding icons:

This will give you an idea of the skills or


Explore
competencies you are expected to learn in the
module. A brief drill or review to help you link
the current lesson with the previous one. The
new lesson will also be introduced to you in
various ways such as a story, a song, a poem, a
problem opener, an activity, or a situation.
This section provides a brief discussion of the
Learn
lesson. This aims to help you discover and
understand new concepts and skills.

What’s More This comprises activities for independent


practice to solidify your understanding and
skills of the topic. You may check the answers
to the exercises using the Answer Key at the
end of the module.
This includes questions or blank
Apply sentence/paragraph to be filled into process
what you learned from the lesson.

Assess This is a task which aims to evaluate your level


of mastery in achieving the learning
competency.
This contains answers to all activities in the
Answer Key module.

This contains the learner’s reflection. Learners


Reflect
are encouraged to think about the lessons
particularly the parts that went well (they have
understood) and the parts that were weak (they
have difficulty) and write about it briefly.
Learners can share their thoughts and feeling
about the lessons.

At the end of this module you will also find:


References This is a list of all sources used in
developing this module.
The following are some reminders in using this module:

1. Use the module with care. Do not put unnecessary mark/s on any part of
the module. Use a separate sheet of paper in answering the exercises.
2. Read the instruction carefully before doing each task.
3. Observe honesty and integrity in doing the tasks and checking your
answers.
4. Finish the task at hand before proceeding to the next.
5. Return this module to your teacher/facilitator once you are through with it.
If you encounter any difficulty in answering the tasks in this module, do not
hesitate to consult your teacher or facilitator. Always bear in mind that you are
not alone.

We hope that through this material, you will experience meaningful learning
and gain deep understanding of the relevant competencies. You can do it!
Explore

Case studies involve learners in activities of expert programmers such


as identifying decisions, justifying choices among alternatives, and
evaluating the consequences of these choices. Case studies improve
computer programming courses by emphasizing the process rather than the
product of problem solving. A case study describes a programming problem,
the process used by an expert to solve the problem, and one or more
solutions to the problem.

After going through this module, you are expected to:

1. Understand a case study


2. Appreciate the importance of case study
3. Perform a case study using control statements

Activity 1
Directions: Arrange the jumbled letters inside the box to form the word
being described below.

LATICCRUAPRIIST

____________________1. Focuses on a particular situation, event, program or


phenomenon.

VICESRPTIED

___________________ 2. The end product is a rich, thick description of the


phenomenon being studied.

HECUISTIR
___________________ 3. The cases studied illuminate the reader's
understanding of the phenomenon under study.

Learn

CASE STUDY IN COMPUTER PROGRAMMING


A case study consists of a programming problem, one or more solutions to
the problem, and a narrative description of the process used by an expert to
produce the solutions.

When to use the Case Study Research Approach?


A case study research method is appropriate when the researcher wants to
answer a descriptive question such as WHAT happened? Or an explanatory
question HOW and WHY did something happen?

Types of Subjects of Case Study

1. Person – This type of study focuses on one particular individual. This case
study would use several types of research to determine an outcome.

2. Group – This type of study focuses on a group of people. This could be a


family, a group or friends, or even coworkers.

3. Location – This type of study focuses on a place, and how and why people
use the place.

4. Organization/Company – This type of study focuses on a business or an


organization. This could include the people who work for the company, or an
event that occurred at the organization.

5. Event – This type of study focuses on an event, whether cultural or societal,


and how it affects those that are affected by it. An example would be the
Tylenol cyanide scandal. This event affected Johnson & Johnson, the parent
company, as well as the public at large.

3 Characteristics of Case Study

1. Particularistic - focuses on a particular situation, event, program or phenomenon.

2. Descriptive - the end product is a rich, thick description of the phenomenon being
studied.
3. Heuristic - the cases studied illuminate the reader's understanding of the
phenomenon under study.

- brings about the discovery of new meanings.

- extend the reader's experience.

- confirm what is already known.

Types of Case Study

1. Intrinsic Case Study


Undertaken because of researcher intrinsic interests, and aims to get deep
understanding of a certain case. The researcher focuses only on 1 problem or
concern.

2. Instrumental Case Study

An instrumental case study uses a case to gain insights into a


phenomenon. For example, a researcher interested in child obesity rates
might set up a study with middle school students and an exercise
program. In this case, the children and the exercise program are not the
focus. The focus is learning the relationship between children and
exercise, and why certain children become obese.

3. Multiple or Collective Case Study

Multiple case or collective studies use information from different studies


to formulate the case for a new study. The use of past studies allows
additional information without needing to spend more time and money
on additional studies.

Developing a Case Study

We are now in the computer age. From our homes to other entities in
our society, we are already benefiting the advantages of modern technology.
We can experience this on the electronic gadgets that we used, transactions
in banks, stores, hospitals, schools, managing transportations, data and
information processing and many more. What makes our works less
burdensome and less papers are because of the works of our technologists
and scientists. Through the development of computer systems and programs
we were able to save time, money and energy.

In developing computer software or computer program, one must


learn a programming language. From the programming language that you
have used from the previous quarters, for sure you can create one computer
software. Below is an overview on creating a program you want to develop.

Steps in developing, designing a computer program for a case study:

1. Decide a case study.


Select a case study case that is significant – a topic that you are
interested as well as your clients or audience. Work on the case study that
you are comfortable with. Plan on the flow of your case study as well as the
resources you need. Make an algorithm of it to be your guide.

2. Choosing the language

As we all know, there are many programming languages. So you have


to decide which language that is helpful and useful for your case study. You
have to consider the features and functions you need for your project.

You can choose from the following programming languages:

a. If you want to create games, applications, drivers, operating


systems, and many other software programs, you may use Java,
Visual Basic - these two are very popular for both can be learned
easily. Added to this type programming languages are C, C++, and
C#.
b. If you want to develop online forums and services, HTML, Python,
PHP, and Perl can be your choices.

3. Deciding on an editor

Editor is a software program that allows you to create and manipulate


computer codes. It is capable of editing plain text computer files. Some of
these editors are Microsoft Visual Studio, Adobe, Eclipse, JDeveloper,
Dreamweaver or Notepad ++. These editors can make coding and testing the
code more efficient.

4. Compiler

Most computer languages are easy to understand by the creator but


difficult for a computer to understand. For a computer to read and
understand your program it must be compiled or have and interpreter. You
may need or not another program to compile or interpret it. These are only
need that they are installed on the computer or the server that is running
the script.

5. Learning the language

Once you have decided on the programming language, editor and


compiler, you are now ready to make the program. You also must learn the
syntax on how to declare variables, create conditional statements, perform
the loops, understand the escape sequences, make comments, or
temporarily disable parts of the code, understand regular expressions.

Sample Case Study.


Case Study: Pass or Fail Checker Java Language

Algorithm:

Start

Input Student
Grade

YES NO
If Grade
< 75

Print Print
“FAILED” “PASSED”

End
C++ program: Sample Outputs:
#include<iostream> Enter your grade: 92
#include<conio.h>
PASSED
using namespace std;
void main()
{ Enter your grade: 70
int per;
cout<<”Enter your grade:”; FAILED
cin>>per;
if(per>=75 && per<=100)
{ Enter your grade: 110
cout<<”\nPASSED”;
} Please enter a valid grade.
else if(per>=0 && per<=74)
{
cout<<”\nFAILED”;
}
else
{
cout<<”\nPlease enter a valid grade,”;
}
getch()
}
What’s More
Activity 2
Directions: Match the situations that people usually do in real life in
column A to the developed technology counterpart that can be used to ease
the hassle in column B. Write the letter of your choice in the blank provided.
A B
1. Going inside a bank to A. Online Shop
________
fill-out a form to
_
withdraw a cash.
2. Presenting ID and writing B. E-rollment
________ basic information on the
_ log sheet before entering
a mall.
3. Sorting bunch of paper C. ATM
________
files about students’
_
records in a cabinet.
4. Going to a mall to look D. QR Code
________
for a particular item to
_
buy.
5. Filling-out an enrollment E. Student
________ form in schools for the Information
_ opening of the school System
year.

Apply

Activity 3
Directions:
1. Choose one from the given situations under column A in the previous
activity.
2. Out of this concept, perform a simple case study using control
statements.
3. Make a flowchart or algorithm.
4. Develop a source code or program of a chosen language.
Assess

Activity 4
Essay: Write an essay about the importance of case study and explain how
does computer programming help in the realization of its purpose. Write
your answer inside the diagram below.

(Write your title here)


Reflect

Today, I discovered that ___________________________________


________________________________________________________________
________________________________________________________________
________________________________________________________________
________________________________________________________________
________________________________________________________________
________________________________________________________________
________________________________________________________________
________________________________________________________________
___________________________________________.

I encountered difficulties in _______________________________


________________________________________________________________
________________________________________________________________
________________________________________________________________
________________________________________________________________
________________________________________________________________
________________________________________________________________
________________________________________________________________
__________________________________.
Answer Key

Explore What’s More


1. Particularistic 1. C
2. Descriptive 2. D
3. Heuristic 3. E
4. A
5. B

Assess Apply
Answers may vary. Answers may vary.

References

https://people.eecs.berkeley.edu/~clancy/classroom.html#:~:text=Case%20studies
%20involve%20learners%20in,the%20product%20of%20problem%20solving.
http://2012books.lardbucket.org/books/sociological-inquiryprinciples-qualitative-and-
quantitative-methods/s13-01-fieldresearch-what-is-it-and-.html
https://people.eecs.berkeley.edu/~clancy/web/case.studies.html
https://www.universalclass.com/articles/business/case-studies-
types.htm#:~:text=An%20intrinsic%20case%20study%20is,Genie%20is
%20the%20topic.
https://www.computerhope.com/issues/ch000675.htm#:~:text=An
%20editor%20is%20any%20program,can%20get%20started%20for%20free.
https://www.javaguicodexample.com/javaprogramexampleusejgrasp1.html

You might also like