[go: up one dir, main page]

0% found this document useful (0 votes)
45 views4 pages

Quiz #3

This document contains a quiz and research questions for a computer programming student. The quiz covers topics like the creators of Java, applets, garbage collection, and platform independence. The research questions ask the student to identify high-level programming languages and their features, Java literals and data types, arithmetic and assignment operators, and logical operators.
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)
45 views4 pages

Quiz #3

This document contains a quiz and research questions for a computer programming student. The quiz covers topics like the creators of Java, applets, garbage collection, and platform independence. The research questions ask the student to identify high-level programming languages and their features, Java literals and data types, arithmetic and assignment operators, and logical operators.
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/ 4

Name: Ferreras, Welfredo Jr. A.

Subject: Computer Programming 1


Course & Year: BSIT- 1 Instructor: Engr. Chester C. Naguit

QUIZ #3:

IDENTIFICATION. Write your answer in a clean short bond paper.

1. Who lead the development of Java Programming language?


Patrick Naugthon and James Gosling.

2. What is the original name of Java Programming language?


Oak

3. These are small applications that are run inside applications.


Applets

4. What feature of Java which programs are not required to delete objects allocated in the
memory?
Garbage Collection

5. What feature of Java which programs developed can run on any computer system with no
changes long as JRE is installed in the computer?
Portable and Platform-Independent

RESEARCH

Please do research the following. Write it in a clean short bond paper.

1. Five (5) example of high-level programming languages (not mentioned in this module)
and its features.

 Python - is an interpreted high-level general-purpose programming language. Its


design philosophy emphasizes code readability with its use of significant
indentation.

 PERT - is a method of analyzing the tasks involved in completing a given


project, especially the time needed to complete each task, and to identify the
minimum time needed to complete the total project.

 PHP - is known as a general-purpose scripting language that can be used to


develop dynamic and interactive websites.
 Ruby – is a dynamic, open source programming language with a focus on
simplicity and productivity. It has an elegant syntax that is natural to read and
easy to write.

 Delphi - is a software product that uses the Delphi dialect of the Object Pascal
programming language and provides an integrated development environment for
rapid application development of desktop, mobile, web, and console software,
currently developed and maintained by Embarcadero Technologies.

2. Enumerate the different Java literals and Data types.

Literal is a source code representation of a fixed value. They are represented directly in the code
without any computation. Literals can be assigned to any primitive type variable. Java Literals
can be classified into six types, as below:

 Integral Literals
 Floating-point Literals
 Char Literals
 Boolean Literals
 Null Literals

Data types are those which specify the type of data represented by the variable and literal is the
that is stored in to the variable. Data types are divided into two groups:

 Primitive data types - includes byte, short, int, long, float, double, boolean and
char

 Non-primitive data types - such as String, Arrays and Classes (you will learn
more about these in a later chapter)

QUIZ #4:

I. MODIFIED TRUE OR FALSE. Write the word TRUE if the statement is correct and if
otherwise change the underlined word/s to make the statement correct.

1. Double Qoute - String is a sequence of characters within single quote.


2. TRUE - Literal is an item of data used to store the state of objects.
3. TRUE - Identifiers are used to label variables, methods, classes, etc.
4. TRUE - Comment is an optional statement used to describe what a program or a
line of program doing.
5. Operator - Variables are special symbols that perform specific operation on one,
two or more operands

II. IDENTIFICATION. Write your answer on the space provided.


1. Java - A high-level programming language developed by Sun
Microsystem led by James Gosling.
2. Statement - is one or more lines of code terminated by a semicolon.
3. Block Statement - It is formed by enclosing statements by curly braces.
4. Reference - Type of variable that stores the address in the memory location.
5. Premitive Variable - type of variable which stores data in the actual memory location
where variable is.

III. PROGRAM TRACING

1. Trace the output program. Write your answer inside the box.

public class SampleJavaOutput


Hello Students!
{
Welcome toJava Programming!
public static void main(String[] args)
_*_*_*_*
{
String s = “Hello Students!”;

System.out.println(s);
System.out.print(“Welcome to ”);
System.out.println(“Java Programming!”);
System.out.print(“_*_*_*_*”);
}
}

RESEARCH
Please do research on the following. Write it in a clean short bond paper.

1. Arithmetic Operators

Arithmetic operators are used to perform arithmetic operations on variables and data. For

example,
a + b;

Here, the + operator is used to add two variables a and b. Similarly, there are various other

arithmetic operators in Java.

Operator Operation
+ Addition
- Subtraction
* Multiplication
/ Division
% Modulo
Operation
(Remainder
after division)

2. Assignment Operators in Java

Assignment operators are used in Java to assign values to variables. For example,
int age;

age = 5 ;

Here,   =   is the assignment operator. It assigns the value on its right to the variable on its left.

That is,   5   is assigned to the variable   age .

Let's see some more assignment operators available in Java.

Operat Examp
Equivalent to
or le
= a = b; a = b;
+= a += b; a = a + b;
-= a -= b; a = a - b;
*= a *= b; a = a * b;
/= a /= b; a = a / b;
a %=
3. %= a = a % b; Logical Operators
b;
Operat Example Meaning
or
Logical operators are used to check whether an expression
""(Logi expressi true only if
cal on1 both
AND) ""expres expression1 is true or false. They are used in decision making.
sion2 and
expression2
are true
|| || true if
(Logica expressi either
l OR) on2 expression1
or
expression2
is true
! ! true if
(Logica expressi expression
l NOT) on is false and
vice versa

You might also like