You are on page 1of 12

Negros Oriental State University Health Advisory for COVID-19

(Coronavirus Disease 2019) Prevention


(2nd Edition: August 2020)
How to Protect Yourself and others

As of August 2020, there are currently No vaccines available to protect us and No proven antiviral drugs
against COVID-19 infection. We may be able to reduce our risk of infection with COVID-19 by the doing the following:

1. Washing our hands anytime as needed with soap and water for atleast 20 seconds or use hand sanitizer 0r 70%
alcohol if soap and water are not available.
2. Avoid touching your eyes, nose, mouth with unwashed hands.
3. Cover the mouth and nose with tissue when coughing or sneezing (cough etiquette), then throw the tissue in the
trash and wash the hands.
4. Use facemask while in public areas and must be also be used if sick, with fever, cough, colds, sore throat and other
respiratory symptoms. Use of face shield is recommended as an additional protection.
5. Clean and disinfect objects and surfaces using 70% alcohol or 0.5% chlorine solution (DOH: 900ml water mixed
with 100ml bleach or 90ml water mixed with 10ml bleach).

Programming 1
Note: Chlorine solution is not recommended for misting and spraying handwashing or for any skin contact. Wiping on
objects with cloth for disinfection is recommended by the Department of Health (DOH).
6. Maintain social distancing especially in public areas. At least 1 meter (DOH recommendation) apart from each other
(front and back) to comply with the social distancing set-up.
7. Handshaking, touching, hugging, kissing or any form of physical contact are discouraged.
8. Avoid unnecessary travel and postpone mass gatherings to curb the spread of the virus. It is recommended that we
follow the recommendations by the DOH/Local Government with the number of people allowed to gather while follow-

(CSC 101)
ing social distancing and avoiding overcrowding.
9. Avoid close contact with sick people without proper PPE (personal protective equipment).
10. Seek advice and get proper assessment from City/Municipal Health doctors/Hospitals or any equipped and accept-
ing physician if you have fever, cough, colds, sore throat, difficulty breathing and any respiratory illness.
11. Fourteen (14) Days self-quarantine with coordination to the Inter Agency Task Force (IATF)/City or Municipality
Health or Barangay Health Unit starting from the date of arrival in this province/country for proper guidance and as-
sessment.
12. Seek advice from the Inter Agency Task Force (IATF)/City or Municipality Health or Barangay Health Unit if you
have possible exposure to a probable or confirmed COVID-19 patient.
13. “No Smoking” health advice is encouraged because smokers are more vulnerable to COVID-19 infection, increas-
es the chance for bilateral viral pneumonia and 25% of them are admitted to ICU (Intensive Care Unit) and needs
mechanical ventilation or have died once infected with COVID-19 based on recent studies.
14. Drink enough water and eat healthy foods like fruits and vegetables.
15. Cook food thoroughly.
16. Wash spoon, fork, and other eating utensils properly.
17. Avoid close contact with sick or dead farm/wild animals. Avoiding contact with live animals is also recommended
(e.g. bats, snakes, etc.)
18. Try not to worry too much if you’re not truly at risk.
19. Stop posting or sharing false/fake news as well as inaccurate information that may lead to panic and undue dis-
tress.
20. Praying always for each other, for families, friends, our community, country and for our loved ones to be protected
and delivered from this COVID-19 pestilence. Moreover, interceding for an end to this COVID-19 pandemic.
Note: For Clinic Consultations, please call the University/Campus Clinic first for advises, guidance and triage to deter-
mine who will be referred to Hospital/City/Municipal Health and who will be catered at the clinic for physical consulta-
tion. Contact # Landline: ___________________

Page 1
Discipline Information Technology Program BS Computer Science
Computer Computer programming is the process that professionals use to write code that instructs how
Course Code CSC 101 Course Title Programming 1 a computer, application or software program performs. At its most basic, computer programming is a
set of instructions to facilitate specific actions. Computer programmers create instructions for a com-
Credit Units 3 Duration 90 hours
Program
puter to execute by writing and testing code that enables applications and software programs to op-
Placement 1 Prerequisite erate successfully.

Course Description and Intended Learning Outcomes Computers can do amazing things, from basic laptops capable of simple word processing and
This course introduces the students to function effectively as an individual and as a member spreadsheet functions to incredibly complex supercomputers completing millions of financial transac-
or leader in diverse teams and in multidisciplinary settings.in the application of the knowledge tions a day and controlling the infrastructure that makes modern life possible. But no computer can
fundamentals of computing specialization, and mathematics, science, appropriate techniques, re- do anything until a computer programmer tells it to behave in specific ways. That’s what computer
sources and modern computing tools to complex computing activities, with an understanding of programming is all about.
the domain knowledge appropriate for the computing modes from logic formulation in the develop-
ment and use of information systems together with their implementation in the C programming
language. This course should serve as a foundation for students in the Computer Science pro- At its most basic, computer programming is little more than a set of instructions to facilitate
gram.
specific actions. Based on the requirements or purposes of these instructions, computer program-
ming can be as simple as adding two numbers. It can also be as complex as reading data from tem-
Course Outline perature sensors to adjust a thermostat, sorting data to complete intricate scheduling or critical re-
Timeframe
Timeframe
Topic (Week and Topic
ports or taking players through multi-layered worlds and challenges in games.
(Week and hour)
hour)

1 NOrSU Pre-liminaries 10 Writing classes and non-static methods

2 Introduction And Basic Concepts 11 Primitive arrays

3&4 Algorythms, syntax, and basic I/O 12&13 Classes with arrays

5 Decisions and types 14 Array algorithms (Aligned to the Policies, Standard and Guidelines of Bachelor in Computer Science (BSCS). (CMO
No.25, series of 2015)
6&7 Loops and file I/O 15&16 Recursion and polymorphism
Writing static methods and java
8 17 Exceptions At the end of the course, the learners are able to: (1) Apply knowledge fundamentals,
docs
9 Midterm 18 Final knowledge of a computing specialization, and mathematics, science, and domain knowledge appro-
priate for the computing modes from defined problems and requirements;(2) Knowledge and under-
standing of information security issues in relation to the design, development and use of information
systems;(3) Create, select, adapt and apply appropriate techniques, resources and modern compu-
ting tools to complex computing activities, with an understanding of the limitations to accomplish a
common goal; and(4) Function effectively as an individual and as a member or leader in diverse
teams and in multidisciplinary settings
A
Practice the fundamental knowledge of the components in problem solving and requirements.
Test programming solutions to computing problems.
S
Design appropriate algorithmic techniques in solving computing problems.
Implement knowledge fundamentals of algorithms in a programming language

Page 1 page 2
K
Analyze computing modes from defined problems
Choose the appropriate techniques, resources and modern computing tools to complex computing
activities and problem solving in relation to the design, development and use of information sys-
tems
Apply recursion as a programming solution.
ARRAYS
All these are achieved through (4.2.1.1.) excellent instruction, relevant and responsive re-
search and/or extension services, and quality-assured production of a true NOrSUnian with the
core values of SAPPHIRE needed to (4.1.1.1.) become dynamic, competitive and globally respon-
sive.
At the end of the lesson you will be able to:
 Define what an Arrays is
 Determine the output of the java program or codes using 2D arrays.
 Create java program or codes using any forms of an arrays.
 Compile a codes in C++ compiler .
Lesson 5: ARRAYS

Lesson 6: ARRAY ALGORITHMS

https://
This module will benefit you much through following all points carefully. The necessary key points for you to www.quotemaster.org/
familiarize are summarized as follows: java+language

1. This module contains two (2) lessons. Each lesson is explained substantively. Read the explana-
tions thoroughly so that you could understand the lesson fully.
2. On the first page of each lesson, you will find the specific learning outcomes (SLOs) of each
lesson. SLOs are knowledge and skills you are expected to acquire at the end of the lesson. Read them Please reflect to this
heartily. quotes/passage.
3. You must answer the Learning Activities/Exercises (LAEs). The LAEs are designed to help you
acquire the SLOs.

page 3 page 4
Create an Arrays.

To create an array variable, specifies the type of the elements and the number of ele-
ments to be stored in that array. Given below is a simple syntax to create an array in C++ pro-
An array is a collection of similar data type that are used to allocate memory in a sequential gramming :
manner.
Syntax :

This is called a single-dimensional array. The arraySize must be an integer constant


An array is a data structure, which can store a fixed-size collection of elements of greater than zero and type can be any valid C data type. For example, now to declare a 10-
the same data type. When more than one memory location is designated for a single variable, it element array called number of type int, use this statement −int number[10];
is called an array. Here, number is a variable array, which is sufficient to hold up to 10 integer numbers.

Initializing Arrays
Consider a situation where we need to store five integer numbers. If we use program- You can initialize an array in C either one by one or using a single statement as follows
ming's simple variable and data type concepts, then we need five variables of int data type and the − int number[5] = {10, 20, 30, 40, 50};
program will be like in the sample code in C++. The number of values between braces { } cannot be larger than the number of elements
that we declare for the array between square brackets [ ].
It was simple, because we had to store just If you omit the size of the array, an array just big enough to hold the initialization is creat-
five integer numbers. Now let's assume we have to ed. Therefore, if you write −int number[] = {10, 20, 30, 40, 50};
store 5000 integer numbers. Are we going to use You will create exactly the same array as you did in the previous example. Following is
5000 variables? an example to assign a single element of the array −number[4] = 50;
The above statement assigns element number 5th in the array with a value of 50. All
Instead of declaring individual variables, arrays have 0 as the index of their first element which is also called the base index and the last
such as number1, number2, ..., number99, you index of an array will be the total size of the array minus 1. The image below shows the pictorial
just declare one array variable number of integer representation of the array we discussed above −
type and use number1[0], number1[1], and ...,
number1[99] to represent individual variables.
Here, 0, 1, 2, .....99 are index associated
with var variable and they are being used to repre-
sent individual elements available in the array.
All arrays consist of contiguous memory
locations. The lowest address corresponds to the Accessing Array Elements
first element and the highest address to the last
element. An element is accessed by indexing the array name. This is done by placing the index of
the element within square brackets after the name of the array. For example −
int var = number[9];

The above statement will take the 10th element from the array and assign the value
to var variable. The following example uses all the above-mentioned three concepts viz. crea-
tion, assignment, and accessing arrays −

page 5 page 6
Arrays in Java

Following is the equivalent program written in Java. Java supports arrays, but there is a
little difference in the way they are created in Java using the new operator.
You can try to execute the following program to see the output, which must be identical to the
result generated by
the below C example.

Results:

Results:

Note: you can also used C++ compiler with this link
https://www.onlinegdb.com/online_c++_compiler

Using Bluej or any Java android app, create a code using the Arrays in Java and
have a screenshots of the codes and the results.

page 7 page 8
For clarifications, feel free to chat, call, text (09975503794) or send an email
(sharita.norsu@gmail.com) message to me if you have questions, reactions, or reflections Please run the codes in Bluej/Java app and any C++ compiler so that you can run it cor-
about the contents or activities in the lesson. Please read or study also this link to rectly and got the correct answers. Good Luck!
understand more about arrays. https://www.javatpoint.com/array-in-java
Watch this full course Java tutorial in YouTube with this link https://
www.youtube.com/watch?v=xk4_1vDrzzo&t=7450s

Write a codes in C++ compiler that gives this output. Take a screenshot of the
codes.
What will output of the following codes in 2D Array? Take a Screenshots .
Note: Use this link to compile your codes in C++ or you
can download C++ android app in your phone.
https://www.onlinegdb.com/online_c++_compiler

page 9 page 10
ARRAY ALGORITHMS Here are some common algorithms that you should be familiar with to examine arrays:
 Determine the minimum or maximum value in an array
 Compute a sum, average, or mode of array elements
 Search for a particular element in the array
At the end of the lesson you will be able to:  Determine if at least one element has a particular property
 Know the common algorithms that you should be familiar with to examine arrays.
 Create single program/code that displays the minimum and the maximum of the  Determine if all elements have a particular property
Numbers in the arrays and a code that rotates array elements to the left.  Access all consecutive pairs of elements
 Identify errors while running the single program or codes through Bluej or any Java app
and in C++ Compiler  Determine the presence or absence of duplicate elements
 Familiarize the application of the basic operations used in Array Algorithms.
 Determine the number of elements meeting specific criteria
 Shift or rotate elements left or right
 Reverse the order of the elements
Note: Please see sample codes of the common algorithms in this link https://
Reflects to this quotes. docs.google.com/document/d/11C3KyM_ukjrAC4dhITAvdiiOL8rJVIAq/edit?
usp=sharing&ouid=103745448796606768654&rtpof=true&sd=true

Two common array traversal loops that can be used for these algorithms:
1. for (int value : array)
{
if (value ....)
...
}
https:// 2. for(int i=0; i < array.length; i++)
www.azquotes.com/ {
quote/765148 if (array[i] ....)
...
}

page 11 page 12
The code below finds the minimum (smallest element) in an array. {
public class MinMax values[i] = values[i+1];
{ }
public static void main(String[] args) else {
{ // last element gets first
int[ ] values = {6, 2, 1, 7, 12, 5}; values[i] = first;
int min = values[0]; // initialize min to the first element }
for (int val : values) }
{ // print them out to see the results
if (val < min) // found a new min! for (int val : values)
min = val; {
} System.out.print(val + " ");
System.out.println("Min is " + min ); }
} }
} }
The code below rotates array elements to the left. Note that you need to use an indexed
loop for this because you need to change the array and access two elements at different indices.
Basic Operations
public class Rotate
Following are the basic operations supported by an array.
{
1. Traverse Operation
public static void main(String[] args)
This operation is to traverse through the elements of an array.
{
Traverse − print all the array elements one by one.
int[ ] values = {6, 2, 1, 7, 12, 5};
int first = values[0]; Note: See examples in the “Examples of the Basic Operations” Documents
for (int i = 0; i < values.length; i++)
{ 2. Insertion Operation
// if it's not the last element, copy the next one over Insert operation is to insert one or more data elements into an array. Based on the require-
ment, a new element can be added at the beginning, end, or any given index of array.
if (i < values.length - 1)

page 13 page 14
Algorithm
Insertion − Adds an element at the given index.
Consider LA is a linear array with N elements and K is a positive integer such that K<=N. Fol-
We can see a practical implementation of insertion operation, where we add data at the end lowing is the algorithm to find an element with a value of ITEM using sequential search.
of the array .
1. Start
Note: See examples in the “Examples of the Basic Operations” Documents
2. Set J = 0
3. Repeat steps 4 and 5 while J < N
3. Deletion Operation 4. IF LA[J] is equal ITEM THEN GOTO STEP 6
Deletion refers to removing an existing element from the array and re-organizing all ele- 5. Set J = J +1
ments of an array.
6. PRINT J, ITEM
Deletion − Deletes an element at the given index. 7. Stop

Algorithm Note: See examples in the “Examples of the Basic Operations” Documents
Consider LA is a linear array with N elements and K is a positive integer such that K<=N.
Following is the algorithm to delete an element available at the Kth position of LA.
1. Start 5. Update Operation
2. Set J = K Update operation refers to updating an existing element from the array at a given index.
3. Repeat steps 4 and 5 while J < N Update − Updates an element at the given index.
4. Set LA[J] = LA[J + 1]
Algorithm
5. Set J = J+1
Consider LA is a linear array with N elements and K is a positive integer such that K<=N. Fol-
6. Set N = N-1 lowing is the algorithm to update an element available at the Kth position of LA.
7. Stop 1. Start

Note: See examples in the “Examples of the Basic Operations” Documents 2. Set LA[K-1] = ITEM
3. Stop

4. Search Operation Note: See examples in the “Examples of the Basic Operations” Documents

You can perform a search for an array element based on its value or its index.

Search − Searches an element using the given index or by the value.

page 15 page 16
Take a screenshot of the codes and the output.
1. Create a simple program that displays the minimum and the maximum of the Num-
bers in the arrays. Take a screenshot of the codes and the output.
2. Create a code that rotates array elements to the left. 1. Create a simple program or codes that Compute a sum, average, or mode of array ele-
3. In a C++ compiler, what is the output of this simple program/code? And what is the opera- ments.
tions used in this codes? 2. Create a simple program or codes using the Deletion and Insertion Basic Operations.
#include <stdio.h> 3. Describe in your own words the 5 basic operations used in Array Algorithms.
main() {
int LA[] = {2,4,6,8,10};
int item = 10, k = 3, n = 5;
int i = 0, j = n;
printf("The original array elements are :\n");
for(i = 0; i<n; i++) {
printf("LA[%d] = %d \n", i, LA[i]);
}
}

For clarifications, feel free to chat, call, text (09975503794) or send an email
(sharita.norsu@gmail.com) message to me if you have questions, reactions, or reflections
about the contents or activities in the lesson. Please see the EXAMPLES OF THE BASIC
OPERATIONS link https://docs.google.com/document/d/1ITgG4_t2xIpfZXPm- Please run the code or program in Bluej or any java app and in C++ compiler so that you
H0J1amVZ_PR1afc/edit? can get the correct answers. All of the activities are given in the discussions so please read, un-
usp=sharing&ouid=103745448796606768654&rtpof=true&sd=true derstand and practice.

page 17 page 18
1. Introduction to Programming with Java: A Problem Solving Approach, Second Edition, John Dean
Do a research on Two common array traversal loops that can be used for algorithms . & Raymond Dean, McGraw-Hill Higher Education, January 2013 ISBN-10: 007337606X ISBN-13:
Create a codes in each of the common array traversal loops. Have a screenshot of the codes
978-0073376066
and the output.
2. https://www.iare.ac.in/sites/default/files/lecture_notes/C%20LECTURE%20NOTES%
20FULL_1.pdf
3. https://www.tutorialspoint.com/computer_programming/computer_programming_arrays.html
4. https://www.javatpoint.com/array-in-java
5. https://csawesome.runestone.academy/runestone/books/published/csawesome/Unit6-Arrays/topic
-6-4-array-algorithms.html
6. https://www.tutorialspoint.com/data_structures_algorithms/array_data_structure.htm

page 19 Page 20

You might also like