CC102 Midterm Ay2023 2024 - 1ST
CC102 Midterm Ay2023 2024 - 1ST
CC102 Midterm Ay2023 2024 - 1ST
12. It is an implementation of an algorithm in the form of annotations and informative text written in plain
English.
a. Algorithm c. Flowchart
b. Pseudocode d. Annotations
13. Described as the blueprint of program during the program development, it uses graphical
representation to the solution of a problem.
a. Algorithm c. Flowchart
b. Pseudocode d. Annotations
14. It consists of the use of a series of English-like words that humans can understand easily to write
instructions. It is also called procedural language.
a. Machine Language c. High-Level Language
b. Assembly Language d. Very High-Level Language
15. A type casting used in converting a smaller type to a larger type size.
a. Converting c. Implicit Casting
b. Assignment d. Explicit Casting
TEST II – Fill in the Blanks. (10pts.)
Direction: For items 1 to 5, draw the symbol/shape being asked. For items 6 to 10, give the appropriate data
type for each declaration.
1. Input/output
2. Start
3. Process
4. Decision
5. Initialization/preparation
6. _________ name = "NAME";
7. _________ age = 20;
8. _________ value = 20.4f;
9. _________ letter = 'C';
10. _________ isActive = true;
OUTPUT:
Test III-B. Direction: Analyze the given code snippets and give the output. (9pts.)
CODE OUTPUT
Number 1. (3pts.)
public class Midterm {
Republic of the Philippines
Catanduanes State University
College of Information and Communications Technology
Virac, Catanduanes
__________________________________________________________________________________________________
Number 3. (3pts.)
public class Midterm {
public static void main(String[] args) {
for (int i = 1; i <= 5; i++) {
for (int j = 1; j <= 5; j++) {
System.out.print(i * j + " ");
}
System.out.println();
}
}
}
1. Draw a flowchart that will compute for the average of five inputted grades from different subject. If the
average is above 75 print “PASSED” otherwise “FAILED”. (5pts.)
2. Write a program that will compute for the average of five inputted grades from different subject. If the
average is above 75 print “PASSED” otherwise “FAILED”. (10pts.)
Prepared By:
ARNOLD T. MANLANGIT
Instructor I
Noted:
Department Chairperson,
Computing Programs
Republic of the Philippines
Catanduanes State University
College of Information and Communications Technology
Virac, Catanduanes
__________________________________________________________________________________________________
KEY TO CORRECTION
CC102 – COMPUTER PROGRAMMING 1
BS INFORMATION TECHNOLOGY 1___
MIDTERM EXAM 1st Semester / AY: 2023-2024
Test III-A.
Test III-B.
1. Average: 94
2. RESULT: 6
3. 1 2 3 4 5
2 4 6 8 10
3 6 9 12 15
4 8 12 16 20
5 10 15 20 25
Test III-C.
Republic of the Philippines
Catanduanes State University
College of Information and Communications Technology
Virac, Catanduanes
__________________________________________________________________________________________________
import
java.util.Sca
nner;
public class
Activity04 {
public
static void
main(String[
] args) {
Scanner
scan = new
Scanner(Syst
em.in);
System.out.
print("Enter
Grade 1: ");
double
g1 =
scan.nextInt
();
System.out.
print("Enter
Grade 2: ");
Prepared By:
ARNOLD T. MANLANGIT
Instructor I
Noted:
Republic of the Philippines
Catanduanes State University
College of Information and Communications Technology
Virac, Catanduanes
__________________________________________________________________________________________________