0% found this document useful (0 votes)
164 views

Sc025 Assignment Array

Uploaded by

Zikry Aizuddin
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
164 views

Sc025 Assignment Array

Uploaded by

Zikry Aizuddin
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 7

UNIT SAINS KOMPUTER

KOLEJ MATRIKULASI MELAKA

COMPUTER SCIENCE 2 (SC025)


INDIVIDUAL ASSIGNMENT
SEMESTER II & IV, SESSION 2023/2024
--------------------------------------------------------------------------------------------------------------------------------------
TO BE COMPLETED BY STUDENT

Name : MUHAMMAD ZIKRY AIZUDDIN BIN ZAHERMAN


Practicum : F1P2
Matric Number : MS2311102108
Lecturer Name : ABDUL RAHIM BIN MAT DAIM

STUDENT’S DECLARATION (PB / PTP)

I declare this task is my own work except for the citations and summaries of which I acknowledged
the source.

………………………………..
Name : MUHAMMAD ZIKRY AIZUDDIN BIN ZAHERMAN
Date : 28th MARCH 2024

TO BE COMPLETED BY EXAMINER

SUB-ATTRIBUTE EXAMINER MODERATOR


Problem Analysis

Design A Solution

Implementation

Testing & Verification

Documentation

TOTAL (20 MARKS)

CONTINUOUS ASSESSMENT FEEDBACK (PB / MTP)

Attribute’s strength:  Excellent  Moderate


Please tick ( / )  Good  Weak
Attribute/s that can be
improved:

Date Submitted:  On time submission


……………………………….  Late submission

STUDENT’S CONFIRMATION EXAMINER NAME AND SIGNATURE

I declare that I understand the feedback given by


the lecturer.

………………………………………………………… ……………………………………………………...
Name: Name:
Date: Date:

1
1.0 Problem Analysis

- IPO Chart

Input Process Output


- Name of 8 - Search a specific - Display the index location where
employees letter of employee’s elements are found and the
- Age of 8 initial. corresponding age if employee’s
employees - Determine whether initial is equal to employee’s name.
- Specific the specific letter - Display total employees that share
letter to be searched the same specific letter (employee’s
searched (employee’s initial) initial)
(employee’ is equal to - Display “No results found, sorry!” if
s initial) employee’s name employee’s initial is not equal to
- Calculate total employee’s name
employees with
same initial

2
2.0 Design Solution

a) Pseudocode

Start
declare arrays employName and employAge for 8 elements
set i=0
while i<8
input employName and employAge
end while
input searchLetter
set j=0
set total=0
while j<8
if employName[j]==searchLetter
total=total+1
display index location
display employAge[j]
j=j+1
else
j=j+1
end if
end while
if total==0
display “No results found, sorry!”
else
display total
end if
Stop

3
b) Flowchart

4
5
3.0 Implementation
- Java Code

6
4.0 Sample Output

1)

2)

You might also like