Las Ict7 Java Q3 Las 3

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 13

9

Schools Division of Koronadal City

JUNIOR HIGH SCHOOL


ICT 7 – Java
Learning Activity Sheet 3:
Arrays

QUARTER 3 WEEK 3
Learning Activity Sheet
Quarter 3 – Activity Sheet 3: Arrays
Unang Edisyon, 2023

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.

Inilathala ng Kagawaran ng Edukasyon


Kalihim: Leonor Magtolis Briones
Pangalawang Kalihim: Diosdado M. San Antonio

Learning Activity Sheet Development Team

Writers: Arnold John B. De Vera, James Aldrin S. Estabillo and


Editor: Name
Reviewers: Evelyn C. Frusa PhD, Grace J. Miravalles, Rolex H. Lotilla and Arvin M.
Tejada
Illustrator: Name
Layout Artist: Name
Management Team: Crispin A. Soliven Jr, CESE - Schools Division Superintendent
Levi Butihin - Asst. Schools Division Superintendent
Prima Roullo - CID Chief
Grace J. Miravalles - EPS, EPP/TLE
Evelyn C. Frusa, PhD - Division EPS In Charge of LRMS
Bernardita M. Villano - Division ADM Coordinator
Inilimbag sa Pilipinas ng ________________________

Department of Education – Region XII – Koronadal City Division


Office Address: ____________________________________________
____________________________________________
Telefax: ____________________________________________
E-mail Address: ____________________________________________
9

The Java Program


(TLE_ICTJAVA1 1-12POAD-IIf-i-29)
Specific Objective/s

This Learning Activity Module (LAS) was designed and written with you in mind. It is
here to help you master Java Technology and the Java Programming Language. The
scope of this module permits it to be used in many different learning situations. The
language used recognizes the diverse vocabulary level of students. The lessons are
arranged to follow the standard sequence of the course. But the order in which you
read them can be changed to correspond with the textbook you are now using.
The LAS is divided into one (1) learning outcome, specifically:

• LO1 - Demonstrate knowledge of Java technology and Java


programming;
o 1.6 Demonstrate creating and using Arrays in accordance with
Java framework

After going through this Learning Activity Sheets, you are expected to:

1. Analyze patterns of programming in Java Programming Language;


2. Write simple Java Programs;
3. Compile and execute Java Programs;
4. Compile Java Programs using BlueJ;
5. Execute Java Programs using BlueJ;
6. Debug Java Programs;
7. Declare, create, initialize and print arrays; and
8. Develop programs that use arrays.
Directions/Instructions

In this Learning Activity Sheet, you will study about Java technology and
Java programming.

Notes to the Students

1. Study the lessons and answer religiously the activities. These will guide you on
what you will learn at the end of this Learning Activity Sheet.

2. Discover what you already know by answering the learning activities.

3. Apply what you have learned in real-life situation.


Activity

Activity 1:

Directions: Arrange the given objects alphabetically in each item. Write 0 for
the first, 1 for the second, and 2 for the last on the space provided.

ist the steps, activities, and o


Procedure

What is an array?

An array is simply a sequence of either objects or primitives, all of the same type
and packaged together under one identifier name.

Creating an array

There are three steps to create an array:


Creating an array construction

Creating an array initialization

Manipulating an array
? Questions
Activity 2:

Directions: Read and analyze each statement. Write check (/) if the statement is
correct and (x) if otherwise.

_________1 Arrays can be used to group similar data together.

_________2. An array can be declared by providing only the data type and the
number of elements it contains.

_________3. Array elements can be given initial values when an array is declared.
_________4. Individual elements of an array can be addressed by appending an
array indexed enclosed in curly brackets at the end of an array name.

_________5. A variable with an int data type can be used as a subscript to address
individual array elements.

_________6. The elements of arrays can only have primitive data types.

_________7. The individual elements of one array can have different data types.

_________8. The array indices should be whole numbers.

_________9. Sequentially accessing individual array elements can be simplified


using loops.

_________10. All arrays have a property named size that contains the number of
elements in the array.
Activity 3

Directions: Answer each item based from the given array declaration below.

int [] hours = new int[20];

________________ 1. What is the array name?


________________ 2. What is the data type of each element of the array?
________________ 3. What is the maximum number of elements the array
can contain?
________________ 4. What is the index of the first element?
________________ 5. What is the index of the last element?
________________ 6. How can you access/print the first element of the
array?
________________ 7. How can you access/print the last element of the
array?

Activity 4.

Directions: Provide the output in each item given the following array declaration
below. Write your answer on the space provided in the table below.

char [] fb = {‘A’,’*’,’$’,’t’,’h’,’+’,’G’};

Code Output

1. System.out.println(fb[1]);
2. System.out.println(fb[4]);
3. System.out.println(fb[2]);
4. System.out.println(fb[6]);
5. System.out.println(fb[3]);
Closure

What I have learned in this activity?

1. I have learned that_________________________________________________________


__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________

2. I need to know more about_________________________________________________


__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
References

RAMILO, R. V., & PASCO, D. M. (n.d.). COMPUTER HARDWARE SERVICING. K TO


12 - TECHNOLOGY AND LIVELIHOOD EDUCATION.
Blanco, E. (2017, September 12). CSS NC II learning Module. Retrieved June 03,
2020, from https://www.slideshare.net/edmundblanco/css-nc-ii-learningmodule
K to 12 Basic Education Curriculum Technology Livelihood Education Learning
module -Computer hardware servicing
https://www.liveworksheets.com/w/en/la-word-recognition/1409925
Department of Education, Soccsksargen Region. TLE CSS Quarter 1 Module 5:
Preparing and Interpreting Technical Drawing.
De Jesus Jr. J., et al. (2012). Programming and Databases 2 nd Edition. TechFactors
Inc.
Para sa mga katanungan o puna, sumulat o tumawag sa:

Department of Education – Koronadal City Division

-------------------------------------
-------------------------------------
-------------------------------------

Telefax: -------------------------

Email Address: ------------------------------------


PAHATID – LIHAM

You might also like