0% found this document useful (0 votes)
5 views6 pages

CC102 Fundamentals of Programming Midterm Exams First Term 2024 2025 Final Updated 2

The document is a midterm examination for a course on Fundamentals of Programming for the academic year 2024-2025. It includes sections for identification, true/false questions, matching types, problem-solving, and coding tasks related to programming concepts and Java code. The exam is designed to assess students' understanding of programming fundamentals, coding syntax, and problem-solving skills.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views6 pages

CC102 Fundamentals of Programming Midterm Exams First Term 2024 2025 Final Updated 2

The document is a midterm examination for a course on Fundamentals of Programming for the academic year 2024-2025. It includes sections for identification, true/false questions, matching types, problem-solving, and coding tasks related to programming concepts and Java code. The exam is designed to assess students' understanding of programming fundamentals, coding syntax, and problem-solving skills.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

CC102 - FUNDAMENTALS OF PROGRAMMING

MIDTERM Examination
First Term, S.Y. 2024 – 2025

Name: ____________________________________ Date: ___________ Score: _____


Course & Section: ___________________________ Instructor: ___________________

I. IDENTIFICATION. Directions: Write your answer on the space provided. Strictly NO


ERASURES.

____________ 1. It is a person who prepares instructions for computers.


____________ 2. They are also known as software developers.
____________ 3. It is a set of instructions for a computer.
____________ 4. It refers to the process of writing, testing, debugging/troubleshooting,
and maintaining the source code of computer programs.
____________ 5. It refers to an artificial language that can be used to write programs
that control the behavior of a machine, particularly a computer.
____________ 6. She is portrayed in popular culture as the "World's First Computer
Programmer."
____________ 7. It is used to represent a group of program instructions that perform a
processing function of the program such as arithmetic operations.
____________ 8. It denotes a point in the program where more than one path can be
taken.
____________ 9. It can be used to designate the beginning and the end of a program,
or a point of interruption
____________ It refers to a list of instructions for carrying out some process step by
10. step.
____________ It is a method for solving a well-structured problem.
11.
____________ It consists of labeled geometrical symbols that are interconnected to
12. provide a pictorial representation of a data processing procedure.
____________ It is a visual representation of an algorithm.
13.
____________ 14 It is a graphical representation of the procedures involved in
converting data on input media to data in output form.
____________ It describes graphically in detail the logical operations and steps
15. within a program and the sequence in which these steps are to be
executed for the transformation of data to produce the needed
output.

II. TRUE / FALSE. Write T on the space provided if the statement is correct;
otherwise, write F if the statement is incorrect.

____________ 1. The byte can hold whole number between -128 to 127.
____________ 2. Short is greater than integer and byte in terms of size.
____________ 3. Float is use in fractional number/s.
____________ 4. Boolean can hold either true or false only.
____________ 5. The symbol == means not Equal to.
____________ 6. The symbol >= means Less than or Equal to.
____________ 7. The symbol || means Or.
____________ 8. The use of “import java.util.Scanner;” is to import library into the program.
____________ 9. The “System.out.println();” keyword computes the input and output.
____________ 10. The “System.out.printf();” keyword formats the input or output.
III. MATCHING TYPE. Match the column A (flowchart names) into column B (flowchart
symbols). Write the correct answer on the space provided.
A B

_____ 1. Decision
A

_____ 2. Input / Output Symbol


B
_____ 3. Terminal Symbol
C

_____ 4. Processing Symbol


D

_____ 5. Preparation
E

_____ 6. On-page Connector


F

_____ 7. Off-page Connector


G

_____ 8. Flow Line


H

_____ 9. Flow Direction Indicators (Arrowheads)


I

_____ 10. Predefined Process Symbol J

K.

IV. PROBLEM SOLVING. Solve the given problems and write the answer on the space
provided.

A. Write the missing code. Read and analyze the given codes below, then provide the
correct code in order to display the correct output.

import java.util.Scanner;
public (1.) _____________ Midterm_Exam
{
public (2.) _____________ void main (String [ ] args)
{
Scanner (3.) _____________ = new Scanner( (4.) _____________ );
String FN, LN, MN, CurrentCourse ;
int age ;
String gender, prog = "Program by: ", myName = "Eddiemar" ;

System.out.print("Enter your Firstname: ");


FN = Personal.nextLine();
System.out.print("Enter your Lastname: ");
LN = Personal.nextLine();
System.out.print("Enter your Middlename: ");
MN = Personal.nextLine();

System.out.print("Course: ");
CurrentCourse = Personal.nextLine();
System.out.print("Other Course: ");
String oc = Personal.nextLine();
System.out.print("Enter your gender: ");
gender = Personal. (5.) _____________ ();
System.out.print("Enter your Age: ");
age = Personal. (6.) _____________ ();

System.out.println("*********************************************");
System.out.println("PERSONAL PROFILE");
System.out.println("--------------------------------------------");
System.out.println("Name: " + FN +"\t" + MN + "\t" + LN );
System.out.println("Course: " + (7.) _____________ + "\t and \t" + oc );
System.out.println("*********************************************");
System.out.println("Gender: " + (8.) _____________ + "\n");
System.out.println(prog + " " + (9.) _____________ );

}
}

Sample INPUT:

Enter your Firstname: Eddiemar


Enter your Lastname: Sinco
Enter your Middlename: Garcia
Current Course: MSCS
Other Course: BSCS
Enter your gender: Male
Enter your Age: 123

Sample OUTPUT:
--------------------------------------------
PERSONAL PROFILE
--------------------------------------------
Name: Eddiemar Garcia Sinco
Course: MSCS and BSCS
--------------------------------------------
Age: 123
Gender: Male

Program by: Eddiemar

B. Identify the output. Analyze the following Java codes and then give the correct
values of each variables. Write your answers on the space provided based on the
code's logic and calculations.

public class evaluate


{
public static void main(String [ ] args)
{
//INPUT
int x = 40, y = 41, z = 42, a = 43 ;

//PROCESS
int sum = x + y +z ;
int product = z * a ;
float dif = sum - a ;
double quotient = (product / sum) ;
float average = sum / (float)3 ;

//OUTPUT
System.out.println("\nSUM: " + sum);
System.out.println("Product: " + product);
System.out.println("Difference: " + dif);
System.out.printf("Average: %.4f\n", average);
System.out.printf("Quotient: %.3f\n", quotient);
}
}

____________ 1. Give the value of sum. (2.50 pts)


____________ 2. Give the value of product. (2.50 pts)
____________ 3. Give the value of difference. (2.50 pts)
____________ 4. Give the value of quotient. (2.50 pts)

C. Program Implementation. Analyze the given program; then answer what is


required. Write your answer on the space provided.

For 1-6.
import java.util.Scanner;

/**
*
* @author Eddiemar
*/
public class Midterm_Exam
{
public static void main(String [ ] args)
{
double minutesInYear = 60 * 24 * 365;

Scanner eddiemar = new Scanner(System.in);

System.out.print("Input the number of minutes: ");


double min = eddiemar.nextDouble();

long years = (long) (min / minutesInYear);


int days = (int) (min / 60 / 24) % 365;

System.out.println((int) min + " minutes is approximately " + years + " years and " +
days + " days");
}
}

____________ 1. What is the scanner name?


____________ 2. What is the name of the class in the program?
____________ 3. Give at least one data type that being used in the program.
____________ 4. How many variable/s declared as double?
____________ 5. What text is written inside the comment section of the program?
____________ 6. How many data types were use in the program?

D. Coding. Create a program that will be able to compute area of a triangle using the
following formula: Area = (width*height)/2.

Midterm Exam Rubrics


Name: ____________________________________ Score: ____________
Section: ____________________

Fundaments of Programming

Criteria 20 16 12 8 4 1 0
Program Completely Somewhat Somewhat Rarely Rarely Didn’t No
Code understands understands understands understands understands understands codes
the use of the use of the use of the use of the use of the use of
variables and variables and variables and variables and variables and variables and
their syntax their syntax their syntax their syntax their syntax their syntax,
in a Java in a Java in a Java in a Java in a Java it didn’t run
program program with program with program with program with
Criteria 20 16 12 8 4 1 0
1 error 2-3 error only 4-5 6-7 errors
errors

Criteria 2.50 2 1.50 1 .50 0


Output Fully correct, well- Correct Correct Correct but Incorrect No value
formatted, and with and with minor lacks clear but shows provided or
comments clearly formatting explanation attempt incorrect
explaining the code presented issues calculation

Prepared by:

EDDIEMAR G. SINCO, BSCS GIAN PAOLO MARTIN CABANAS, MIT

Faculty Faculty

HAROLD COSTALES, MIT


Faculty

Reviewed by:

FERNANDINO PERILLA, DIT HONEY GIRL A. AVO, DIT

Program Head, BSCS Program Head, BSInfoTech

Reviewed by:

MARIBEL T. TACLA, MBA, MIT


Assistant Dean, CCIT

Approved:

ROSANNE S. AGUP, MIS


Dean, CCIT

You might also like