0% found this document useful (0 votes)
235 views167 pages

Amaleaks Blogspotcom Prog113a Grade 12 Week1 20

This document contains a 20 question quiz about programming concepts and quality attributes from the ISO/IEC 25010:2011 standard. The quiz covers topics like SQL, environmental policies, product quality attributes, and programming fundamentals. It tests understanding of terms like maintainability, reliability, compatibility and other ISO/IEC 25010:2011 quality characteristics. The document aims to assess knowledge of programming, quality standards, and related technical subjects.

Uploaded by

Joseph Lapso
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)
235 views167 pages

Amaleaks Blogspotcom Prog113a Grade 12 Week1 20

This document contains a 20 question quiz about programming concepts and quality attributes from the ISO/IEC 25010:2011 standard. The quiz covers topics like SQL, environmental policies, product quality attributes, and programming fundamentals. It tests understanding of terms like maintainability, reliability, compatibility and other ISO/IEC 25010:2011 quality characteristics. The document aims to assess knowledge of programming, quality standards, and related technical subjects.

Uploaded by

Joseph Lapso
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/ 167

lOMoARcPSD|11508527

[ Amaleaks. Blogspot.COM] PROG113A Grade 12 week1-20

Information Technology (AMA Computer Learning Center)

Studocu is not sponsored or endorsed by any college or university


Downloaded by Joseph Lapso ([email protected])
AMALEAKS.BLOGSPOT.COM
PROG113A WEEK 1-20

SQL stands for LONG QUIZ PROG-113


LONG QUIZ NO. 4

1. Read the questions carefully and choose your answer from the word pool provided.
Mobile app XYZ, which is an RPG game, has been deployed and launched to the public six (6)
months ago. Some volunteers are testing XYZ in accordance with the ISO/IEC 25010:2011. Read
their feedback below and decide which product quality attribute is being described.
“So far, XYZ has 2 updates and it is working smoothly. Some bugs were fixed and there have been
improvements
ANSWER: – like additional characters and skills.”
Maintainability

2. One good practice is to use water filtration system instead of buying bottled water every time. ANSWER:

TRUE

3, Quality improvement process is conducted to avoid errors and faults from recurring in the future. ANSWER:

TRUE

4. Big business companies are the only ones responsible for enforcing environmental policies since they can
afford alternative cleaner technology.
ANSWER: FALSE

5. Presidential Decree No. 856 is an international treaty that imposes limitations on the greenhouse gas
emissions of several countries.

ANSWER: FALSE

6. Kyoto protocol addresses environmental issues through the campaign of


.

ANSWER: reducing greenhouse gas emissions

7. Categorize the following subcharacteristics of the ISO/IEC 25010:2011’s product quality model and
write the letter that corresponds to your answer.
Testability

ANSWER: Maintainability

8. Pre-review activities in the review process includes review planning, preparation and individual review.

ANSWER: TRUE

Downloaded by Joseph Lapso ([email protected])


9. is when you conduct regular audits and inspections to evaluate your
work performance.

ANSWER: Shitsuke

10. The Kyoto protocol requires the participation of both industrialized and developing nations in
reducing environmental harm.
ANSWER: FALSE

11. This body was tasked to implement the provisions of P.D. No. 856.
ANSWER: DEPARTMENT OF HEALTH

12. Every country, whether industrialized or still developing, must actively cooperate in enforcing
environmental measures.

ANSWER: TRUE

13. Read
“One the questions
good thing carefully
I find with XYZ andmy
as when choose yourdown
laptop shuts answer from themy
accidentally, word
gamepool
scoreprovided.
and status can
still be recovered. No need to repeat a level.”
Mobile app XYZ, which is an RPG game, has been deployed and launched to the public six (6)
months ago.
ANSWER: Some volunteers are testing XYZ in accordance with the ISO/IEC 25010:2011. Read
Reliability
their feedback below and decide which product quality attribute is being described.
14. Categorize the following subcharacteristics of the ISO/IEC 25010:2011’s product quality model and
write the letter that corresponds to your answer.
Accessibility
ANSWER: Usability

15. Seiri is making work easier by reducing unnecessary items to deal with.
ANSWER: TRUE
16. As long as the demands of the clients are met and the business is flourishing, there’s no more need to
bother about the effects of one’s business to the environment.

ANSWER: FALSE

“I17. Read
find the enjoying
it really questions carefully
to play andIchoose
XYZ since can inviteyour answer
my friends from
from themedia
social wordprofile.
pool provided.
It works well
with this social media app!”
Mobile app XYZ, which is an RPG game, has been deployed and launched to the public six (6)
months ago.
ANSWER: Some volunteers are testing XYZ in accordance with the ISO/IEC 25010:2011. Read
Compatibility
their feedback below and decide which product quality attribute is being described.
18. Read the questions carefully and choose your answer from the word pool provided.

Downloaded by Joseph Lapso ([email protected])


Mobile app XYZ, which is an RPG game, has been deployed and launched to the public six (6)
months ago. Some volunteers are testing XYZ in accordance with the ISO/IEC 25010:2011. Read
their feedback below and decide which product quality attribute is being described.
“XYZ is so cool! I tried to install it in my old computer and it still runs smoothly. Given that the computer’s
video card is a bit faulty.“

ANSWER: Reliability

19.
ANSWER: Seiketsu is setting the best practices in the workplace as your work standards.

20. The 5S Method is a Japanese perspective technique developed by Eiichiro Oda.


ANSWER: FALSER

21. Companies can freely make their own set of environmental policies without consulting the
workers’ union, or any local or national laws about it.

ANSWER: FALSE

22. Categorize the following subcharacteristics of the ISO/IEC 25010:2011’s product quality model and
write the letter that corresponds to your answer.
Interoperability

ANSWER: Compatibility

23. ISO/IEC 25010:2011’s product quality model has eight (8) major characteristics.

ANSWER: TRUE

24. Categorize the following subcharacteristics of the ISO/IEC 25010:2011’s product quality model and
write the letter that corresponds to your answer.
Installability

ANSWER: Portability
25. According to Humphrey, a quality plan starts with product introduction where the product qualities and
target market are identified.

ANSWER: TRUE

26. Environmental policies won’t really make a difference, businesses will still strive and be
successful without giving a care for the environment.

ANSWER: FALSE

27. Categorize the following subcharacteristics of the ISO/IEC 25010:2011’s product quality model and
write the letter that corresponds to your answer.
Recoverability
ANSWER: Reliability

28. Montreal protocol protects the ozone layer by .

Downloaded by Joseph Lapso ([email protected])


ANSWER: phasing out harmful substances

29. Critical thinking skills is an essential skill which includes listening effectively, adapting
communication skills and understanding underlying issues.

ANSWER: FALSE

30. Standards are based on untested concepts and theories that the company has yet to encounter. ANSWER:
FALSE

LONG QUIZ NO. 6

1. Observe the names of the following variables and routines and decide whether its format is
CORRECT or WRONG.
passingSCORE for a constant variable.

ANSWER: WRONG

2. Refer to the image below to answer the following question. What process is illustrated in the
diagram?
ANSWER Social media login limit

3. Jamie finished debugging her program. What is the next step she should do?
ANSWER: Formalize the Solution

4. The following are statements that describe milestones in the programming language. I.
FORTRAN, the first modern computer language, was developed.
II. Java was released by Sun Microsystems
III. C was developed based on some of B’s features.
IV.Ada Lovelace invented the first computer program for analytical engine application. V.
COBOL was created by the US Department of Defense
Which of the following shows the correct order of events?
ANSWER: IV, I, V, III, II

5. The set of rules that must be strictly followed when using a programming language is called
ANSWER: SYNTAX

6. Lizzy printed her reports in all the major subjects. She forgot if she has already printed her English report.
What can she do to avoid printing it twice?

ANSWER: Right click on the printer and choose See what’s printing.

7. Refer to the pseudocode below and answer the following question: If the calculated BMI results to 26, what
will the program do?

ANSWER: display Overweight

8. You will find running application programs and process in the Task Manager.
ANSWER: TRUE

9. We were playing games locally and I got disconnected. I think something’s wrong with this port.

Downloaded by Joseph Lapso ([email protected])


ANSWER: E

10. Java is an example of

ANSWER: HIGH-LEVEL LANGUAGE

11. To check if your operating system is up to date, click Start then click Control Panel and choose
.
ANSWER: Windows Update
12. C# was released by
ANSWER: MICROSOFT

13. He is known as the father of the Java programming language.


ANSWER: JAMES GOSLING

14. .MPEG, .MP3 and .MOV are filename extensions for videos.
ANSWER: FALSE

15. is a type of programming language that is composed of symbols and words that follow some rules
similar to that of a natural language.

ANSWER: High-level language

16. Programs written in high-level languages are translated into machine-readable form using
interpretersTRUE
ANSWER: or compilers.

17. was the first language implemented for BINAC.


ANSWER: Short Code

18. A deleted file or folder found in the Recycle Bin can still be restored.
ANSWER: TRUE

19. Even when you close all running application programs, there are still process running in the
background.

ANSWER: TRUE

20. I found out that the keyboard is defective so I switched to the old keyboard which uses PS/2 port, where
should I plug it in?

ANSWER: A

21. Refer to the pseudocode below and answer the following question: What happens after weight is given?

ANSWER: ASK FOR HEIGHT

22. A is the code or language that allows a user to instruct a computer to perform specific tasks.

Downloaded by Joseph Lapso ([email protected])


ANSWER: Programming Language

23. Refer to the image below to answer the following question. What type of image is shown?

ANSWER: FLOWCHART

24. My headset is working but the microphone is not. Which port should I check?

Answer: F;

25. Refer to the image below to answer the following question. What type of flowchart symbol
contains the text “Limit >=3?”?
ANSWER: DECISION

26. Who is considered as a user (component of an operating system)?


ANSWER: ALL OF THE CHOICES

27. Over time, man’s efforts to find better ways to communicate with computers resulted to the
evolution of programming languages.

ANSWER: TRUE

28. Observe the names of the following variables and routines and decide whether its format is
CORRECT or WRONG.
studentAge for a variable name.

ANSWER: CORRECT

29. Observe the names of the following variables and routines and decide whether its format is
CORRECT or WRONG.
Employees for a table name.

ANSWER: WRONG

30. Refer to the pseudocode below and answer the following question: What if the computed BMI equals
to 10, what will the program do?
ANSWER: PRINT UNDERWEIGHT

Question text
Observe the following statements and decide whether the variable result’s value is TRUE or FALSE.
Given that:
int x = -
77; int z =
43;
result = (z < x && 1 != 10) ? true :
false; result = (z != 43) ? true : false;
Select one:
False
Question text
Read each statement carefully and decide whether it’s TRUE or FALSE.
The last line of code, with a close brace { symbol, is properly indented.
Select one:
False

Downloaded by Joseph Lapso ([email protected])


Question text
True or False: Brackets [] are also separators used in declaring arrays.
Answer:
True
Question text
Refer to the block of codes below. Read each statement carefully and decide whether
it’s TRUE or FALSE.
There is an error in line
9. Answer:
TRUE
Question text
True or False: Operators, in Java programming language, use special symbols to call
methods and their objects.
Answer:
False
Question text
Read each statement carefully and decide whether it’s TRUE or FALSE.
There are no errors in the program.
Select one:
False
Question text
Refer to the block of codes below. Read each statement carefully and decide whether
it’s TRUE or FALSE.
Line 9 uses a traditional comment which uses double forward slash.
Answer: False
Question text
True or False: Many programmers can be literate with Java programming language for it
is intended to be that way.
Answer:
True
Question text
True or False: You’ll know there’s an error if you see a red circle with an exclamation
point in Netbeans IDE.
Answer:
True
Question text
Observe the following statements and decide whether the variable result’s value is
TRUE or FALSE.
Given that:
int x = -
77; int z =
43;
result = (z < x && 1 != 10) ? true :
false; result = (x = 100) >= z;
Select one:
True
The file is accurately named – Students.java.

-false
There are three (3) separators found in line 13.

Downloaded by Joseph Lapso ([email protected])


-FALSE
There is an error in line 9.

-True
result = 90 < x || -1 < z;

-True

The last line of code, with a close brace { symbol, is properly indented.
-False
Assuming there are no errors in the code, line 13 would display When I graduate, I’d be 18.

-True
Figure 2 shows the Netbeans Integrated Development Environment.

-True

The last line of code will output 100.0.

-True
True or False: An exclamation point in Java means NOT. Therefore, != means not equal to.

-True
There are two types of comments used in the program above – end of line and Javadoc comments.

-True
result = (z < x && 1 != 10) ? true : false;

-False

There are keywords found in line 7.

-True
In line 11, the value of personage is 18.

-TRUE
If there are no errors in the program, the first line of output would read Hi, I’m a normal person.

-False
result = (x * z + (z += 7)) >= 100;
-False
True or False: Logical OR operator will result to false if one of the expressions is false.

-False
True or False: Semicolon (;) is a separator used to end a Java statement.

-True

Downloaded by Joseph Lapso ([email protected])


True or False: There are five types of integer data types – byte, short, int, long and float.

-False
True or False: Single equal sign (=) is used for assigning values while double equal sign (==) is used in
comparing values.

-True
True or False: Java’s ternary operator is a short hand for the if-then-else statement which uses a question mark
and a colon.

-True
True or False: JDK or Java Design Kit is required to compile and run Java apps and applets.

-True
On line 6, average is equal to 0. But on line 9, average will be equal to 100.
-False
True or False: Identifiers in Java are, in simple words, name that you give to Java class, variables and
methods.

-True
True or False: When you run javac in a command line interface, it will automatically create another file with a
filename extension .class.

-True
Line 9 uses a traditional comment which uses double forward slash.

-FALSE
There are five (5) separators used in line 8.

-TRUE
There are no errors on line 8.

-FALSE
True or False: Syntax is basically the spelling and grammar errors compiled in a Java programming language. It
should be avoided in writing apps and applets.

-False
True or False: Operators, in Java programming language, use special symbols to call methods and their objects.

-False
If you run this program, the second line of output will read Your score is:.
-True
True or False: Java is a low level programming language.

Downloaded by Joseph Lapso ([email protected])


-False
There are also punctuators used in line 10, in between System, out and println, the parentheses and semicolon.

-TRUE
If there are no errors and this simple program runs through CLI, the first line will display: Hi, students!
-False
True or False: Brackets [] are also separators used in declaring arrays.

-True

Substrings can contain 1 or 2 arguments.


-true
Determine the output.

-bar

The index of the letter “y” in string “Doggy” is 5.


-False
Determine the output.
-foo

TRUE OR FALSE: The value “val_3” is a white space “ “.

-False

True or False: Variable 1st_num is a good variable name in Java programming.


-False

TRUE OR FALSE: “val_2” contains “The”


-True
True or False: Instance variables are declared inside a method but outside a class.
-False

True or False: Variable names in Java are not necessarily case sensitive.
-False

Determine the output

-36

True or False: Public, private and protected are some of the return types used in Java programming.
-False

Downloaded by Joseph Lapso ([email protected])


True or False: Divide and conquer strategy, in programming, is also known as the top-down design.
-True

If there are no errors in the program, line 9 would display I weigh 160.
-False

True or False: A boolean variable can only have two values; it is either true or false.
-True

result = !((x * 10) < z);


-False

result = -(-z) == 43;


-True

True or False: If you get an error while running the javac command in the CLI, it could be resolved by editing
the Path value in Environment Variables.
-True

True or False: The subtraction assignment operator subtracts the left and right operand and assigns the
difference to the operand at the right.
-False

-False
x += x;
result
The = x ==
second line154;
of output will be: You are in Year 11.
-True

True or False: The conditional AND operator uses two ampersand (&&) symbols.
-True

result = 43 <= z;
-True

True or False: You’ll know that a variable is a class variable when you see that variable inside a class with
the word static.
-True

The string method “length( )” returns the number of characters within a string.
-True

A string can contain numbers.

-True

TRUE OR FALSE: This is an example of concatenation.

Downloaded by Joseph Lapso ([email protected])


-True

TRUE OR FALSE: The value of “val_4” is “fox”


-False

TRUE OR FALSE: “val_2” contains “The”.


-True

Determine the output.

-f6

Languages which use procedural programming include C, (Answer) FORTRAN, Pascal and BASIC.

-C++

True or False: Local variables are declared inside the default method.
-False

Strings can be declared with str.


-False

True or False: Procedural programming involves instructing the system as to how to complete a task.
-True

TRUE OR FALSE: The output of this code is “The quick brown fox”
-False

Among the expressions below which is a statement?


-True

Expressions can be long and complex.


-true
number++; is an expression
-true

For-loops has a set number of iterations before starting.


-True

The equals( ) method can compare more than 2 arrays.


-False

While loops can use Booleans at test expressions.


-True

The test expression of the if statement is


-less than or equal to

Downloaded by Joseph Lapso ([email protected])


There are four (4) major features of an object-oriented programming language – encapsulation, inheritance,
polymorphism and abstraction.
-True

Using a break; statement causes the loop to jump to the next iteration.

- is example of a statement.
x+1

-
number++; is a block

-
Arrays are

-Integers

The operator “new” allocates a memory block the size of what is declared.
-true

A class block can be an expression

-
Statements can be expressions.

-
Integer arrays can be populated with characters.

-
Declaration clauses are declared as “number + 1”.

-
Loops can be stopped with a break; statement.
-True

The equivalent of Paragraphs in coding is?


-Expressions

If statements cannot be nested in switches


-true

The length( ) method returns the size (number of indices) has.


-True

When polymorphism is used, the Java object can only take one form. Subclasses should have the same function
with the parent class.

Downloaded by Joseph Lapso ([email protected])


Arrays can contain (Answer) number of elements.

-Any

“||” and “&&” can be used in conditional statements.


-True

A class statement has three (3) major parts – declaration, initialization and instantiation.
-False

Declaring an object in Java uses the new keyword to create a new object.
-False

Please refer to Figure 2 to answer the question below: If the expression “num = 0” is changed to “num = 5”
the final output will be

-5

Expressions can be statements.


-True

Blocks can contain more blocks of code.


-True

If-else statements can be nested in?


-All of the choices

Statements are equivalent to paragraphs.


-False

A (answer) array is an array containing true or false values.

-boolean

Switches are always used with if-else statements


-False

True or False: The modulus operator returns the remainder of a division operation instead of the quotient.
-true

Determine the output.


String val_1 = “564298”;

-5698

Determine the output.


String val_1 = “35”;

-4

Downloaded by Joseph Lapso ([email protected])


The return value of the length( ) method is an integer
-true

A superclass is also known as a parent class.


-true

For-loops can be nested in while loops.


-true

In instantiating an object, the keyword instance is used.


-False

Object oriented programming utilizes the top down method


-False

Expressions are like clauses.


-true

The sort( ) method is always ascending.


-true

Arrays are data types.


-False

Variables must be declared as (Answer) for it to be fully hidden.

-private

While statements check the test expression at the end.


-False

The else statement can be used alone.


-False

The fill( ) method (Answer) the array with specific values.

-Fills

The output of println is

-55555

The person’s weight is declared correctly with the correct data type (byte) and value (160).
-FALSE

Determine the output.


String val_1 = “foo”

String val_2 = “bar”

Downloaded by Joseph Lapso ([email protected])


val_2 = val_1;
val_1 = val_3;

System.out.println(val_1);

-bar

Determine the output.


String val_1 = “foo”

String val_2 = “bar”


val_2 = val_1; val_1
= val_3;

System.out.println(val_2);

-foo

Switches can work properly even without the “break” expression.


-True

Blocks can be one liner or huge classes.


-True

The test expressions in conditional statements can be left empty.


-False

Abstraction works by hiding the implementation details and showing only the functions necessary.
-True

A single array can hold multiple data types


-False

A polymorphic object can pass more than one Is-a test.


-True

Another loop can be used as test expression.


-False

True or False: Public, static and void are sample of Java reserved keywords.
-True

The value of “pStr” in line 24 is

-True

The default syntax of a constructor is <class_name>(parameter, parameter){ }


-False

Downloaded by Joseph Lapso ([email protected])


A nested class is not an inner class.
-False

Nested classes causes them to become abstracted


-False

A nested class is also called

-inner class

If you want some variables and methods hidden from other classes, you could implement encapsulation where
these variables and methods are wrapped in a single unit.
-True

A constructor can only have 1-2 overloads or parameters.


-False

All possible data types of an array can be retuned as a string by the toString( ) method.
-True

Abstracted classes can contain 1 or more abstract methods.


-True

Abstraction shows the every bit of detail and implementation on how an application does something.
-False

Initialization is a process where the constructor is called for.


-True

The default syntax of a constructor is <class_name>( ){ }


-True

Classes cannot be nested.


-False

Abstract classes cannot have nested classes.


-False

The parent class of a nested class is called an outer class


-True

An inner class can be constructed directly without reference to the outer class.
-False

Arrays can be read backwards


-True

A single array can hold

Downloaded by Joseph Lapso ([email protected])


-One data type

Abstracted methods already have implementations inside.


-False

are special methods to initialize objects.

-constructors

Constructors have 3 basic rules to follow.


-False

Nesting classes increases encapsulation.


-True

Each index can only contain (Answer) element.


-one

The sort( ) method can be set to sort only a part of an array.


-False

Subclasses or child classes could have different behaviors but still share the same functions from their parent
class.
-True

Abstract methods must have an explicit return value


-False

An abstract class must not contain abstract methods.


-False

Abstracted classes can be nested.


-True

A subclass constructor cannot invoke a superclass constructor.


-False

A class acquiring fields and methods of another class is called inheritance.


-True

Parallelsorting utilizes

-More cpu processing cores

method can copy one array to another.

-arraycopy

SHORT QUIZ PROG 111- PROG111 - Programming (Java) NC II Part 1

Downloaded by Joseph Lapso ([email protected])


SHORT QUIZ 8.
1. The 5s method is based on the
ANSWER: Toyota Production Sytem
2. Environmental issues have no relation to the workplace
ANSWER: FALSE
3. Protecting the environment and natural resources also means
protecting stable employment.
ANSWER: TRUE
4. In the 5S method, this stage refers to arranging items in a way that they
are easy to find and pick up.
ANSWER: SEITON
5. Seiso refers to cleaning your workplace on a regular basis.
ANSWER: TRUE
6. Humans rely on natural resources for survival.
ANSWER: TRUE
7. These are developed by industries as a guide for establishments and
business enterprises to conduct their operations in a way that prevents or
reduces environmental harm.
ANSWER: Environmental codes of practice
8. Business industries will not be affected by the environmental crisis.
ANSWER: FALSE
9. Presidential Decree No. 856, one of the Philippine environmental laws, is
also known as .
ANSWER: Code on Sanitation of the Philippines
10. The protection of the natural resources is possible through the
collective efforts of each group in the society.
ANSWER: TRUE

Downloaded by Joseph Lapso ([email protected])


SHORT QUIZ 9

1. Readtothe
“Thanks XYZ,questions
I can baby carefully
sit my littleand choose
brother. your
It’s so easyanswer from
to use that the
a 5-year
word
old canpool
play provided.
it as well.”
Mobile appUsability
ANSWER: XYZ, which is an RPG game, has been deployed and launched to
the public six (6) months ago. Some volunteers are testing XYZ in
2.accordance
Categorizewith
the following subcharacteristics
the ISO/IEC 25010:2011. Read of thetheir
ISO/IEC 25010:2011’s
feedback below and
product quality
decide which model quality
product and write the letter
attribute that corresponds
is being described. to your
answer. Maturity
ANSWER: Reliability
3. Categorize the following subcharacteristics of the ISO/IEC 25010:2011’s
product quality model and write the letter that corresponds to your
answer. Reusability
ANSWER: Maintainability
4. ISO 9001 international standard for quality’s core processes are divided
into two (2) – product delivery process and support process.
ANSWER: TRUE
5. ISO/IEC 25010:2011’s SQuaRE stands for System Quality Assurance and
Requirements Evaluation. This standard is used in evaluating the quality
of software.
ANSWER: FALSE

6. Read the questions carefully and choose your answer from the word
pool provided.
Mobile app XYZ, which is an RPG game, has been deployed and launched to the
public six (6) months ago. Some volunteers are testing XYZ in accordance with

Downloaded by Joseph Lapso ([email protected])


the ISO/IEC 25010:2011. Read their feedback below and decide which product
quality attribute is being described.
“XYZ is so cool I can play it with my phone, laptop, Xbox and PS4!”
ANSWER: Portability

7. Readwethe
“Finally canquestions carefully enough,
play XYZ! Surprising and choose your and
all features answer fromare
functions the
word pool
present. provided.
It has all the controls a gamer needs.”
Mobile appFunctional
ANSWER: XYZ, whichStability
is an RPG game, has been deployed and launched to
the public six (6) months ago. Some volunteers are testing XYZ in
8.accordance
Categorizewith
the following subcharacteristics
the ISO/IEC 25010:2011. Read of thetheir
ISO/IEC 25010:2011’s
feedback below and
product quality
decide which model quality
product and write the letter
attribute that corresponds
is being described. to your
answer. Operability
ANSWER: Usability
9. Reading a lot can help improve you reading comprehension skills but
make sure you only read short articles.
ANSWER: FALSE
10. Categorize the following subcharacteristics of the ISO/IEC
25010:2011’s product quality model and write the letter that corresponds
to your answer. Functional Appropriateness
ANSWER: Functional Suitability

SHORT QUIZ 10
1. The mouse suddenly stopped working. Which port should I check?
ANSWER: B

Downloaded by Joseph Lapso ([email protected])


2. Ctrl + S is the shortcut key for Save while Ctrl + S + A is the shortcut key
for Save As.
ANSWER: FALSE
3. The earphones is an example of a , while Internet Explorer is
an example of .
ANSWER: peripheral device, application program
4. I’ve purchased a modern gaming mouse but it doesn’t have a PS/2
plug. Where I connect it?
ANSWER: D
5. Arlan right clicked on his taskbar and unchecked the Lock Taskbar. What
will happen if he drags his taskbar to the right side of his screen?
ANSWER: Taskbar will display vertically at the right.
6. Something’s wrong with the serial port. Which port should I investigate?
ANSWER: C
7. Windows is to Personal Computer (PC) while Mac OSX is to Mac laptops
and computers.
ANSWER: TRUE
8. An operating system has three major components – hardware,
application program or software and the user.
ANSWER: FALSE
9. Which of the following is not a default margin options when setting up
the page for printing?
ANSWER: REGULAR
10. If you are confused on what to do, press F2 on your keyboard and
the Windows Help feature will open.
ANSWER: FALSE

SHORT QUIZ 11

Downloaded by Joseph Lapso ([email protected])


1. This type of programming language uses series of 0s and 1s to represent data.
ANSWER: Machine language
2. C++, an extension of the C language, introduced object-oriented programming.
ANSWER: True
3. C# has features that are directly based on the Short Code.
ANSWER: FALSE
4. COBOL stands for Convenient Business Oriented Language.
ANSWER: FALSE
5. Which of the following statements is TRUE?
ANSWER: A programming language may have its own area of
specialization.

6. Using the language, you can write windowed applications,


build databases, as well as control handheld devices.
ANSWER: Java

7. is the father of computer.


ANSWER: CHARLES BABBAGE
8. Since natural languages are vaguely structured, they cannot be used
for programming.
ANSWER: TRUE
9. COBOL is the programming language ideally used for
purposes.
ANSWER: Business
10. PASCAL is an example of a low-level language.
ANSWER: FALSE

SHORT QUIZ 12

Downloaded by Joseph Lapso ([email protected])


1. Refer to the image below to answer the following question. What
happens every time the given username and password is incorrect?
ANSWER: 1 IS ADDED TO THE LIMIT
2. Refer to the image below to answer the following question. What symbol
is used to begin and end the program?
ANSWER: Terminal
3. Observe the names of the following variables and routines and decide
whether its format is CORRECT or WRONG. limitIsReached for a Boolean
variable.
ANSWER: CORRECT
4. Refer to the image below to answer the following question. When will
the program end?
ANSWER: When home page is loaded.
5. Jet is writing the pseudocode for his program. Which phase of
program development life cycle is he in?
ANSWER: Design the Program.
6. Ana is working on a new project and she was asking for the program’s
purpose, processes, algorithm, restrictions and some notes. According to
the program development life cycle, in which phase is Ana working on?
ANSWER: ANALYZE THE PROBLEM
7. Observe the names of the following variables and routines and decide
whether its format is CORRECT or WRONG.
ContactNumber for a column name in the table “Student”.
ANSWER: CORRECT
8. Observe the names of the following variables and routines and decide
whether its format is CORRECT or WRONG.
PresentAdress for a column name in the table “Student”
ANSWER: WRONG
9. Refer to the image below to answer the following question. What will
happen if the username is incorrect but the password given is correct?

Downloaded by Joseph Lapso ([email protected])


ANSWER: 3
10. Refer to the image below to answer the following question. What
happens when Limit is equal to 3?
ANSWER: Program goes back to login page

JAVA II

True or False: Evaluating the options require determining the advantages and
disadvantages of each option. - TRUE
True or False: According to Hicks, the first step in an effective problem solving process is
clearly defining the problem. - TRUE
Who among the following can give feedback to an employee? - All of the choices
True or False: In identifying the problem, it should be specific and not broad or vague. -
TRUE
True or False: You should also look at the problem from a different point of view and listen to
others’ suggestion. This is the third step – listing all possible solutions. - FALSE
Which one of the following statements is FALSE? - Communication involves talking and
listening only.
Few programmers are complaining about slow Internet connection and this affects their work.
This cause is categorized in - EQUIPMENT
I’ve purchased a modern gaming mouse but it doesn’t have a PS/2 plug. Where I connect it? -
D
Windows is to Personal Computer (PC) while Mac OSX is to Mac laptops and computers. -
True
COBOL stands for Convenient Business Oriented Language. - False
C++, an extension of the C language, introduced object-oriented programming. - True
LISP and PROLOG are programming languages that are best used when dealing with Artificial
Intelligence. - True
FORTRAN was the first ever “modern” computer language. - true
I think I plugged the speakers wrong. The power is turned on but I can’t hear any sound Which
port should I check? - F

Downloaded by Joseph Lapso ([email protected])


Enforcing environmental policies is one of the major causes of job loss and
unemployment. - False
True or False: Dates in file names should be written in YYYY-MM-DD format. - False
Big business companies are the only ones responsible for enforcing environmental policies since
they can afford alternative cleaner technology. - False
Pre-review activities in the review process includes review planning, preparation and individual
review. - true
Increase work productivity by arranging items in such a way that they are easy to find and pick
up. - true
Montreal protocol protects the ozone layer by . - phasing out
harmful substances
Business industries will not be affected by the environmental crisis. - False
True or False: Protocols are set of standards rules which describes how something should be
done and different companies have different protocols as well. - true
Presidential Decree No. 856 is an international treaty that imposes limitations on the greenhouse
gas emissions of several countries. - True
True or False: Organizational aims are different from the mission statement; they refer to the
results an organization is aspiring for. - true
The cost / benefit analysis document is appropriately named. - False
A printed progress report to be submitted to the adviser. - purpose
True or False: Statutory requirements are identified by the vendors or suppliers and they include
value, stability, diversity and capacity. - False
As long as the demands of the clients are met and the business is flourishing, there’s no more
need to bother about the effects of one’s business to the environment. - False
Identify whether the statement is a strength, weakness, opportunity or threat: The student
record system could be used by other schools other than Ricka’s school. - opportunity
True or False: Reviewing the related literature includes review of concepts, theories and previous
research findings. - true
Companies can freely make their own set of environmental policies without consulting the
workers’ union, or any local or national laws about it. - False
Kyoto protocol addresses environmental issues through the campaign of
. - reducing greenhouse gas emissions

Downloaded by Joseph Lapso ([email protected])


Humans rely on natural resources for survival. - true
Quantitative research, compared to qualitative research, uses measurable - Data ISO/IEC
25010:2011’s product quality model has eight (8) major characteristics. - true True or False:
Usually, the summary of the report is the first thing that’s being read. -
true
is when you conduct regular audits and inspections to
evaluate your work performance. - Shitsuke
“XYZ is so cool! I tried to install it in my old computer and it still runs smoothly. Given that
the computer’s video card is a bit faulty.“ - Reliability
True or False: There are five main elements of a written report – topic, style, structure, facts and
contents. - false
True or False: To gather data, you can either conduct an interview, survey, observation, mail
questionnaire, coding and tabulation. - false

LONG QUIZ PROG-

111 LONG QUIZ NO. 4

1. Read the questions carefully and choose your answer from the word pool provided.
Mobile app XYZ, which is an RPG game, has been deployed and launched to the public six (6)
months ago. Some volunteers are testing XYZ in accordance with the ISO/IEC 25010:2011. Read
their feedback below and decide which product quality attribute is being described.
“So far, XYZ has 2 updates and it is working smoothly. Some bugs were fixed and there have been
improvements
ANSWER: – like additional characters and skills.”
Maintainability

2. One good practice is to use water filtration system instead of buying bottled water every time. ANSWER:

TRUE

3, Quality improvement process is conducted to avoid errors and faults from recurring in the future. ANSWER:

TRUE

4. Big business companies are the only ones responsible for enforcing environmental policies since they can
afford alternative cleaner technology.
ANSWER: FALSE

5. Presidential Decree No. 856 is an international treaty that imposes limitations on the greenhouse gas
emissions of several countries.

ANSWER: FALSE

Downloaded by Joseph Lapso ([email protected])


6. Kyoto protocol addresses environmental issues through the campaign of
.

ANSWER: reducing greenhouse gas emissions

7. Categorize the following subcharacteristics of the ISO/IEC 25010:2011’s product quality model and
write the letter that corresponds to your answer.
Testability

ANSWER: Maintainability

8. Pre-review activities in the review process includes review planning, preparation and individual review.

ANSWER: TRUE
work
9. performance. is when you conduct regular audits and inspections to evaluate your
ANSWER: Shitsuke

10. The Kyoto protocol requires the participation of both industrialized and developing nations in
reducing environmental harm.
ANSWER: FALSE

11. This body was tasked to implement the provisions of P.D. No. 856.
ANSWER: DEPARTMENT OF HEALTH

12. Every country, whether industrialized or still developing, must actively cooperate in enforcing
environmental measures.

ANSWER: TRUE

13. Read
“One the questions
good thing carefully
I find with XYZ andmy
as when choose yourdown
laptop shuts answer from themy
accidentally, word
gamepool
scoreprovided.
and status can
still be recovered. No need to repeat a level.”
Mobile app XYZ, which is an RPG game, has been deployed and launched to the public six (6)
months ago.
ANSWER: Some volunteers are testing XYZ in accordance with the ISO/IEC 25010:2011. Read
Reliability
their feedback below and decide which product quality attribute is being described.
14. Categorize the following subcharacteristics of the ISO/IEC 25010:2011’s product quality model and
write the letter that corresponds to your answer.
Accessibility
ANSWER: Usability

15. Seiri is making work easier by reducing unnecessary items to deal with.
ANSWER: TRUE
16. As long as the demands of the clients are met and the business is flourishing, there’s no more need to
bother about the effects of one’s business to the environment.

Downloaded by Joseph Lapso ([email protected])


ANSWER: FALSE

“I17. Read
find the enjoying
it really questions carefully
to play andIchoose
XYZ since can inviteyour answer
my friends from
from themedia
social wordprofile.
pool provided.
It works well
with this social media app!”
Mobile app XYZ, which is an RPG game, has been deployed and launched to the public six (6)
months ago.
ANSWER: Some volunteers are testing XYZ in accordance with the ISO/IEC 25010:2011. Read
Compatibility
their feedback below and decide which product quality attribute is being described.
18. Read
“XYZ is so the
cool!questions carefully
I tried to install and
it in my oldchoose your
computer and answer from
it still runs the word
smoothly. pool
Given that provided.
the computer’s
video card is a bit faulty.“
Mobile app XYZ, which is an RPG game, has been deployed and launched to the public six (6)
months ago.
ANSWER: Some volunteers are testing XYZ in accordance with the ISO/IEC 25010:2011. Read
Reliability
their feedback below and decide which product quality attribute is being described.

19.
ANSWER: Seiketsu is setting the best practices in the workplace as your work standards.

20. The 5S Method is a Japanese perspective technique developed by Eiichiro Oda.


ANSWER: FALSER

21. Companies can freely make their own set of environmental policies without consulting the
workers’ union, or any local or national laws about it.

ANSWER: FALSE

22. Categorize the following subcharacteristics of the ISO/IEC 25010:2011’s product quality model and
write the letter that corresponds to your answer.
Interoperability

ANSWER: Compatibility

23. ISO/IEC 25010:2011’s product quality model has eight (8) major characteristics.

ANSWER: TRUE

24. Categorize the following subcharacteristics of the ISO/IEC 25010:2011’s product quality model and
write the letter that corresponds to your answer.
Installability

ANSWER: Portability
25. According to Humphrey, a quality plan starts with product introduction where the product qualities and
target market are identified.

ANSWER: TRUE

Downloaded by Joseph Lapso ([email protected])


26. Environmental policies won’t really make a difference, businesses will still strive and be
successful without giving a care for the environment.

ANSWER: FALSE

27. Categorize the following subcharacteristics of the ISO/IEC 25010:2011’s product quality model and
write the letter that corresponds to your answer.
Recoverability

ANSWER: Reliability

28. Montreal protocol protects the ozone layer by .

ANSWER: phasing out harmful substances

29. Critical thinking skills is an essential skill which includes listening effectively, adapting
communication skills and understanding underlying issues.
ANSWER: FALSE

30. Standards are based on untested concepts and theories that the company has yet to encounter. ANSWER:
FALSE

LONG QUIZ NO. 6

1. Observe the names of the following variables and routines and decide whether its format is
CORRECT or WRONG.
passingSCORE for a constant variable.

ANSWER: WRONG

2. Refer to the image below to answer the following question. What process is illustrated in the
diagram?
ANSWER Social media login limit

3. Jamie finished debugging her program. What is the next step she should do?
ANSWER: Formalize the Solution
4. The following are statements that describe milestones in the programming language. I.
FORTRAN, the first modern computer language, was developed.
II. Java was released by Sun Microsystems
III. C was developed based on some of B’s features.
IV.Ada Lovelace invented the first computer program for analytical engine application. V.
COBOL was created by the US Department of Defense
Which of the following shows the correct order of events?
ANSWER: IV, I, V, III, II

5. The set of rules that must be strictly followed when using a programming language is called
ANSWER: SYNTAX

6. Lizzy printed her reports in all the major subjects. She forgot if she has already printed her English report.
What can she do to avoid printing it twice?

Downloaded by Joseph Lapso ([email protected])


ANSWER: Right click on the printer and choose See what’s printing.

7. Refer to the pseudocode below and answer the following question: If the calculated BMI results to 26, what
will the program do?

ANSWER: display Overweight

8. You will find running application programs and process in the Task Manager.
ANSWER: TRUE

9. We were playing games locally and I got disconnected. I think something’s wrong with this port.
ANSWER: E

10. Java is an example of

ANSWER: HIGH-LEVEL LANGUAGE

11. To check if your operating system is up to date, click Start then click Control Panel and choose
.
ANSWER: Windows Update
12. C# was released by
ANSWER: MICROSOFT

13. He is known as the father of the Java programming language.

ANSWER: JAMES GOSLING

14. .MPEG, .MP3 and .MOV are filename extensions for videos.

ANSWER: FALSE

15. is a type of programming language that is composed of symbols and words that follow some rules
similar to that of a natural language.
ANSWER: High-level language

16. Programs written in high-level languages are translated into machine-readable form using
interpretersTRUE
ANSWER: or compilers.

17. was the first language implemented for BINAC.

ANSWER: Short Code

18. A deleted file or folder found in the Recycle Bin can still be restored.

ANSWER: TRUE

19. Even when you close all running application programs, there are still process running in the
background.
ANSWER: TRUE

Downloaded by Joseph Lapso ([email protected])


20. I found out that the keyboard is defective so I switched to the old keyboard which uses PS/2 port, where
should I plug it in?

ANSWER: A

21. Refer to the pseudocode below and answer the following question: What happens after weight is given?

ANSWER: ASK FOR HEIGHT

22. A is the code or language that allows a user to instruct a computer to perform specific tasks.

ANSWER: Programming Language

23. Refer to the image below to answer the following question. What type of image is shown?

ANSWER: FLOWCHART

24. My headset is working but the microphone is not. Which port should I check?

Answer: F;

25. Refer to the image below to answer the following question. What type of flowchart symbol
contains the text “Limit >=3?”?
ANSWER: DECISION

26. Who is considered as a user (component of an operating system)?


ANSWER: ALL OF THE CHOICES

27. Over time, man’s efforts to find better ways to communicate with computers resulted to the
evolution of programming languages.

ANSWER: TRUE

28. Observe the names of the following variables and routines and decide whether its format is
CORRECT or WRONG.
studentAge for a variable name.

ANSWER: CORRECT

29. Observe the names of the following variables and routines and decide whether its format is
CORRECT or WRONG.
Employees for a table name.

ANSWER: WRONG

30. Refer to the pseudocode below and answer the following question: What if the computed BMI equals
to 10, what will the program do?
ANSWER: PRINT UNDERWEIGHT

PROG-113A / ► Week 18: Designing PL/SQL / ► Short Quiz 14


Which of the following is the syntax to open a cursor varial
Answer: OPEN cursor_variable_name

Downloaded by Joseph Lapso ([email protected])


FOR select_statement;
Which of the following is the syntax to define a REF CURSOR type?
Answer: TYPE ref_type_name IS REF
CURSOR [RETURN return_type];
Weak REF CURSOR is very
flexible. Answer: True
Evaluate the following. What will be the
output? DECLARE
SUBTYPE Accumulator IS NUMBER
(4,2); v_amount accumulator;
v_num1 NUMBER;
v_num2 NUMBER;
v_num3 NUMBER;
BEGIN
v_amount := 10.50;
v_num1 := 1;
v_num2 := 2;
v_num3 := 3;
v_num1 := v_amount;
v_num2 := v_num1 + v_amount;
v_num2 := v_num2 - v_num3;
dbms_output.put_line('Total is: ' ||
v_num2); END;
Answer: 18
Which of the following is the syntax to fetch from a cursor variable?
Answer: FETCH cursor_variable_name INTO variable_name1
[,variable_name2,. . .] | record_name;
Fetch into a record when fetching from a
cursor. Answer: True
Which of the following is the syntax to close a cursor?
Answer: CLOSE cursor_variable_name;
This is a subset of an existing data type that may place a constraint on its base type.
Answer: Subtype
Which of the following rules is INCORRECT about cursor variables?
Answer: None of the choices.
Use column aliases in cursors for calculated columns fetched into records declared with %COLUMNTYPE.
Answer: False

PROG-113A / ► Week 18: Designing PL/SQL / ► Learning Activity 14

Which of the following rules is INCORRECT about cursor variables?


Answer: None of the choices.
Which of the following describes weak REF CURSOR?
Answer: Associates with any query
Restrictive, specifies a RETURN type, associates only with type-compatible queries
are description of a .
Answer: Strong REF CURSOR

Downloaded by Joseph Lapso ([email protected])


Which of the following is INCORRECT about the guidelines for cursor design?
Answer: Use column aliases in cursors for calculated columns fetched into records declared with
%COLUMNTYPE.
This is a subset of an existing data type that may place a constraint on its base type.
Answer: Subtype

PROG-113A / ► Week 17: / ► Short Quiz


13 Evaluate the following PL/SQL.
CREATE OR REPLACE PROCEDURE
query_employee (p_id IN employees.employee_id
%TYPE,
p_name OUT employees.last_name%TYPE,
p_salary OUT employees.salary%TYPE) IS
BEGIN SELECT last_name, salary INTO p_name,
p_salary FROM employeesWHERE employee_id = p_id;
END query_employee
Answer: No error
Evaluate the following PL/SQL. Which of the following will line creates an error?
CREATE OR REPLACE PROCEDURE
query_emp (
p_department_id IN employees.department_id%TYPE,
p_name OUT employees.last_name%TYPE,
p_salary OUT employees.salary%TYPE
)
IS
BEGIN
SELECT last_name, salary, department_id INTO p_name, p_salary,
p_department_id FROM employees
WHERE salary >= p_salary AND department_id = p_department_id
; END query_emp;
Answer: Line 3
These are local variables declared in the parameter list of a subprogram specification.
Answer: Formal parameter
Given the answer in item , which of the folllowing stored procedure will display
the employee id and salary of Steven King?
Answer: DECLARE
v_employee_id employees.employee_id%TYPE;
v_emp_sal employees.salary%TYPE;
BEGIN
query_emp('King', 'Steven', v_employee_id, v_emp_sal);
DBMS_OUTPUT.PUT_LINE('Employee ID ' || v_employee_id ||' earns '|| to_char(v_emp_sal,
'$999,999.00'));
END;

Downloaded by Joseph Lapso ([email protected])


Which of the following stored procedure to create a procedure to that will be used to display the
employee id and salary of Steven King?
Answer: CREATE OR REPLACE PROCEDURE
query_emp (p_last_name IN employees.last_name%TYPE,
p_first_name IN employees.first_name%TYPE,
p_employee_id OUT employees.employee_id%TYPE,
p_salary OUT employees.salary%TYPE) IS
BEGIN
SELECT employee_id, salary INTO p_employee_id,
p_salary FROM employees
WHERE last_name = p_last_name AND first_name =
p_first_name; END query_emp;
What is the default parameter mode when no mode is specified?
Answer: IN

PROG-113A / ► Week 16: Creating Procedures / ► Learning Activity 13


Procedure can be stored in the database as a schema object.
Answer: True
The PL/SQL code block helps modularize code by using:
Answer: All of the choices
Which of the following command is used to create a stand-alone procedure that is stored in the Oracle
database?
Answer: CREATE PROCEDURE
Which of the folllowing does NOT describes subprogram?
i. Compiled only once
ii. Stored in the database
iii. Do not return values
iv. Can take parameters
v. Unnamed PL/SQL
blocks Answer: iii & v
Which if the following is NOT a benefits of using modular program constructs?
Answer: None of the choices

PROG-113A / ► Week 18: Designing PL/SQL / ► Short Quiz 14


Which of the following is the syntax to open a cursor varial
Answer: OPEN cursor_variable_name
FOR select_statement;
Which of the following is the syntax to define a REF CURSOR type?
Answer: TYPE ref_type_name IS REF
CURSOR [RETURN return_type];
Weak REF CURSOR is very
flexible. Answer: True
Evaluate the following. What will be the
output? DECLARE
SUBTYPE Accumulator IS NUMBER (4,2);

Downloaded by Joseph Lapso ([email protected])


v_amount accumulator;
v_num1 NUMBER;
v_num2 NUMBER;
v_num3 NUMBER;
BEGIN
v_amount := 10.50;
v_num1 := 1;
v_num2 := 2;
v_num3 := 3;
v_num1 := v_amount;
v_num2 := v_num1 + v_amount;
v_num2 := v_num2 - v_num3;
dbms_output.put_line('Total is: ' ||
v_num2); END;
Answer: 18
Which of the following is the syntax to fetch from a cursor variable?
Answer: FETCH cursor_variable_name INTO variable_name1
[,variable_name2,. . .] | record_name;
Fetch into a record when fetching from a
cursor. Answer: True
Which of the following is the syntax to close a cursor?
Answer: CLOSE cursor_variable_name;
This is a subset of an existing data type that may place a constraint on its base type.
Answer: Subtype
Which of the following rules is INCORRECT about cursor variables?
Answer: None of the choices.
Use column aliases in cursors for calculated columns fetched into records declared with %COLUMNTYPE.
Answer: False

PROG-113A / ► Week 18: Designing PL/SQL / ► Learning Activity 14

Which of the following rules is INCORRECT about cursor variables?


Answer: None of the choices.
Which of the following describes weak REF CURSOR?
Answer: Associates with any query
Restrictive, specifies a RETURN type, associates only with type-compatible queries
are description of a .
Answer: Strong REF CURSOR
Which of the following is INCORRECT about the guidelines for cursor design?
Answer: Use column aliases in cursors for calculated columns fetched into records declared with
%COLUMNTYPE.
This is a subset of an existing data type that may place a constraint on its base type.
Answer: Subtype

Downloaded by Joseph Lapso ([email protected])


PROG-113A / ► Week 15: Long Quiz / ► Long Quiz 3
(30/30) (Correction)
How do you test the output of a PL/SQL block?
Answer: Use a predefined Oracle package and its procedure
Which of the folllowing statement describes PL/SQL?
Answer: PL/SQL is an Oracle proprietary, procedural, 3GL programming
language Which of the following syntax to declare EXCEPTION named
e_invalid_id?
Answer: e_invalid_id EXCEPTION;
In PL/SQL Block Structure, which of the following are
mandatory? Answer: BEGIN and END
This is a type of cursor which is created and managed internally by the Oracle server to process
SQL statements
Answer: Implicit
PL/SQL stands for
Answer: Procedural Language extension to SQL
Which of the following PL/SQL will execute successfully?
Answer: DECLARE
v_salary INTEGER(20);
BEGIN
SELECT salary INTO v_salary FROM employees WHERE employee_id = 150;
END;
What is the last clause in trapping exceptions?
Answer: WHEN OTHERS
PL/SQL Provides a block structure for executable units of .
Answer: Code
Evaluate the following PL/SQL.
DECLARE
v_email VARCHAR(20);
BEGIN
SELECT email INTO v_email FROM EMPLOYEES WHERE email like 'D%';
DBMS_OUTPUT.PUT_LINE ('Employees whose email address starts with letter D :'
|| v_email);
EXCEPTION
WHEN TOO_MANY_ROWS THEN
DBMS_OUTPUT.PUT_LINE (' Your select statement retrieved multiple rows.');
END;
Answer: The PL/SQL block will run
successfully. Which of the folllowing is TRUE?
Answer: SQL code are embedded within PL/SQL statements
You can trap any error by including a corresponding handler within the exception-handling
section of the PL/SQL block.
Answer: True
When an exception is user defined, the exception is raised .
Answer: Explicitly
Evaluate the PL/SQL
DECLARE

Downloaded by Joseph Lapso ([email protected])


v_first_name VARCHAR2(50);
v_last_name VARCHAR2(50);
v_salary INTEGER(20);
BEGIN
SELECT first_name, last_name, salary INTO v_first_name, v_last_name, v_salary FROM
employees WHERE department_id = 60;
DBMS_OUTPUT.PUT_LINE('Firstname : '||
v_first_name); DBMS_OUTPUT.PUT_LINE('Lastname : '||
v_last_name); DBMS_OUTPUT.PUT_LINE('Salary : '||
v_salary);
END;
Answer: Error in Line 6.
Evaluate the following PL/SQL.
DECLARE
v_employee_id employees.employee_id%TYPE :=
114; BEGIN
DELETE employees WHERE employee_id =
v_employee_id; END;
Answer: The PL/SQL will delete employee number 114.
Which of the following does NOT describes SELECT Statement in a PL/SQL.
Answer: Queries must return only one column.
What are the three PL/SQL block types?
Answer: Anonymous, Procedure,
Function
What is the exception name when PL/SQL has an internal
problem Answer: PROGRAM_ERROR
You have been tasked to update the database by creating a PL/SQL to increase the salary of all IT
Programmer employees by 100% of their existing salary. Which of the following will execute
successfully?
Answer: DECLARE
v_job_id employees.job_id%TYPE := 'IT_PROG';
BEGIN
UPDATE employees SET salary = salary * 2 WHERE job_id =
v_job_id; END;
What is the error trapping function that returns the numeric value of the error code?
Answer: SQLCODE
What is the exception name when single row SELECT returned no
data. Answer: NO_DATA_FOUND
Which of the following DOES NOT describes an exception?
Answer: Exception is a PL/SQL error that is raised before program execution.
Evaluate the following PL/SQL.
DECLARE
v_employee_id employees.employee_id%TYPE :=
114; BEGIN
DELETE employees WHERE employee_id =
v_employee_id; END;
Answer: The PL/SQL will delete employee number
114. In the DECLARE section of the PL/SQL block,

Downloaded by Joseph Lapso ([email protected])


Answer: All of the choices
When an exception is predefined by Oracle server, the exception is raised .
Answer: Explicitly
Which of the will display the Employee ID and number of years in service with employee ID
150?
Answer: DECLARE
v_salaryemployees.salary%TYPE := 10000;
v_employee_idemployees.employee_id%TYPE := 150;
v_years INTEGER(10);
BEGIN
SELECT employee_id, ROUND((SYSDATE - hire_date) /365,0) INTO v_employee_id,
v_years FROM employees WHERE employee_id = v_employee_id ;
DBMS_OUTPUT.PUT_LINE('Employee ID:' || v_employee_id);
DBMS_OUTPUT.PUT_LINE('Number of years : ' || v_years);
END;
Actions are being performed when error occurs during PL/SQL execution in
the Answer: EXCEPTION
You can use this procedure to issue user-defined error messages from stored subprograms.
Answer: RAISE_APPLICATION_ERROR

PROG-113A / ► Week 14: Handling Exceptions / ► Short Quiz

12 Evaluate the following PL/SQL.


DECLARE
v_email VARCHAR(20);
BEGIN
SELECT email INTO v_email FROM EMPLOYEES WHERE email like 'D%';
DBMS_OUTPUT.PUT_LINE ('Employees whose email address starts with letter D :'
|| v_email);
EXCEPTION
WHEN TOO_MANY_ROWS THEN
DBMS_OUTPUT.PUT_LINE (' Your select statement retrieved multiple rows.');
END;
Answer: The PL/SQL block will run successfully.
Which of the following DOES NOT describes an exception?
Answer: Exception is a PL/SQL error that is raised before program execution.
What is the exception name when single row SELECT returned no data.
Answer: NO_DATA_FOUND
RAISE_APPLICATION_ERROR is used in two different places. These are
.

Downloaded by Joseph Lapso ([email protected])


Answer: Executable and exceptions section
What is the error trapping function that returns the numeric value of the error code?
Answer: SQLCODE
What is the exception name when PL/SQL has an internal
problem Answer: PROGRAM_ERROR
Evaluate the following PL/SQL. At what line number is the error of the
PL/SQL? DECLARE
v_deptno NUMBER := 800;
e_invalid EXCEPTION;
BEGIN
DELETE FROM departments
WHERE department_id = v_deptno;
IF SQL % NOT_FOUND THEN
RAISE e_invalid;
END IF;
COMMIT;
EXCEPTION
WHEN e_invalid THEN
DBMS_OUTPUT.PUT_LINE('No such department
id.'); END;
Answer: 7
What is the last clause in trapping exceptions?
Answer: WHEN OTHERS
Complete the diagram in Trapping Non-Predefined Oracle Server
Errors. Answer: Declare, Associate, Reference

PROG-113A / ► Week 14: Handling Exceptions / ► Learning Activity 12

You can use this procedure to issue user-defined error messages from stored subprograms.
Answer: RAISE_APPLICATION_ERROR
Which of the following syntax to declare EXCEPTION named
e_invalid_id? Answer: e_invalid_id EXCEPTION;
When an exception is predefined by Oracle server, the exception is raised .
Answer: Explicitly
When an exception is user defined, the exception is raised .
Answer: Explicitly
You can trap any error by including a corresponding handler within the exception-handling
section of the PL/SQL block.
Answer: True

PROG-113A / ► Week 13: Interacting with Oracle Server / ► Learning Activity 11

Which of the following does NOT describes SELECT Statement in a PL/SQL.


Answer: Queries must return only one column.
Evaluate the following PL/SQL.
1 DECLARE

Downloaded by Joseph Lapso ([email protected])


2 v_employee_id employees.employee_id%TYPE := 114;

3 BEGIN

4 DELETE employees WHERE employee_id =

v_employee_id; 5 END;
Answer: The PL/SQL will delete employee number 114.
Which of the following PL/SQL that will display the total number employees whose salary is
10000 and above?
Answer: DECLARE
v_salary employees.salary%TYPE := 10000;
BEGIN
SELECT COUNT(*) INTO v_salary FROM employees WHERE salary >= v_salary;
DBMS_OUTPUT.PUT_LINE(v_salary);
END;
This is a type of cursor which is created and managed internally by the Oracle server to process
SQL statements
Answer: Implicit
You have been tasked to update the database by creating a PL/SQL to increase the salary of all IT
Programmer employees by twice of their existing salary. Which of the following will execute
successfully?
Answer: DECLARE
v_job_id employees.job_id%TYPE := 'IT_PROG';
BEGIN
UPDATE employees SET salary = salary * 2 WHERE job_id =
v_job_id; END;

PROG-113A / ► Week 12: Introduction to PLSQL / ► Short Quiz

10 Which of the folllowing is TRUE?


Answer: SQL code are embedded withing PL/SQL
statements In the DECLARE section of the PL/SQL block
Answer: All of the choices
In PL/SQL Block Structure, which of the following are
OPTIONAL? Answer: None of the choices
What are the three PL/SQL block types?
Answer: Anonymous, Procedure, Function
How do you test the output of a PL/SQL
block?
Answer: Use a predefined Oracle package and its procedure
You want to display the name, salary and tax of employee #150. Which of the PL/SQL will
execute successfully? Note tax is computed as 2% of the salary.
Answer: DECLARE
v_first_name VARCHAR2(50);
v_last_name VARCHAR2(50);
v_salary INTEGER(20);

Downloaded by Joseph Lapso ([email protected])


v_tax INTEGER(10);
BEGIN
SELECT first_name, last_name, salary, salary * 0.02 INTO v_first_name, v_last_name, v_salary,
v_tax FROM employees WHERE employee_id = 150;
DBMS_OUTPUT.PUT_LINE('Firstname : '||
v_first_name); DBMS_OUTPUT.PUT_LINE('Lastname : '||
v_last_name); DBMS_OUTPUT.PUT_LINE('Salary : '||
v_salary); DBMS_OUTPUT.PUT_LINE('Tax : '|| v_tax);
END;
Which of the folllowing statement describes PL/SQL?
Answer: PL/SQL is an Oracle proprietary, procedural, 3GL programming language

PROG-113A / ► Week 12: Introduction to PLSQL / ► Learning Activity 10


PL/SQL stands for
Answer: Procedural Language extension to SQL
PL/SQL Provides a block structure for executable units of .
Answer: Code
In PL/SQL Block Structure, which of the following are mandatory?
Answer: BEGIN and END
Which of the following PL/SQL will execute successfully?
Answer: DECLARE
v_salary INTEGER(20);
BEGIN
SELECT salary INTO v_salary FROM employees WHERE employee_id = 150;
END;
Actions are being performed when error occurs during PL/SQL execution in the
Answer: EXCEPTION

PROG-113A / ► Week 11: Using Subqueries to Solve Queries / ► Short Quiz 9

You want to display the department name the same with the location of the
Purchasing department.
Answer: SELECT department_name from departments where location_id = (SELECT
location_id from departments where department_name = 'Purchasing')

Evaluate the SQL command


SELECT employee_id, job_id, salary from employees where salary < ALL (SELECT salary
FROM employees WHERE job_id = 'FI_ACCOUNT') AND job_id = 'IT_PROG'
Answer: This has no error.

You want to display all records in the database whose salary is above the salary of Alexander
Hunold.
Answer: SELECT * from employees WHERE salary < (SELECT salary FROM employees
WHERE first_name = 'Alexander' AND last_name = 'Hunold')

Downloaded by Joseph Lapso ([email protected])


Evaluate the SQL command
SELECT employee_id, last_name, first_name, job_id FROM employees WHERE department_id
= (SELECT max(department_id) FROM employees GROUP BY department_id)
Answer: This will return an error. Single-row subquery returns more than one
row.

You want to display all employee id, name, hired date and salary who are hired after employee
104 was hired.
Answer: SELECT employee_id, last_name, hire_date, salary FROM employees WHERE
TO_NUMBER(TO_CHAR(hire_date, 'YYYY')) >
(SELECT TO_NUMBER(TO_CHAR(hire_date, 'YYYY')) FROM employees WHERE
employee_id = 104)

PROG-113A / ► Week 11: Using Subqueries to Solve Queries / ► Learning Activity 9


Which of the following is INCORRECT?
Answer: Use single-row operators with multiple-row subqueries
Which of the folllowing is required in a subquery?
Answer: SELECT
Which of the following is CORRECT about sub-queries?
Answer: Subquery execute before the main query
executes. Evaluate the SQL Command
SELECT job_id, job_title FROM jobs J WHERE INCLUDES
(SELECT * FROM employees WHERE J.job_id = e.job_id );
Answer: The SQL will return an error. Invalid "INCLUDES" parameter.
Evaluate the SQL command
SELECT employee_id, salary from employees where salary = ANY (SELECT salary FROM employees
WHERE job_id = 'IT_PROG') AND job_id = 'ST_CLERK'
Answer: This has no error.

True or False: Foreign co-workers having conversation issues with everyone in


the office are better left off on their own.
A: False

True or False: Presentations must be interesting, lively and engaging. Answer: true

True or False: You can do as you please in the workplace, just remember to show
that you working hard only when the boss is around.
Answer: false

Downloaded by Joseph Lapso ([email protected])


True or False: Understanding everyone’s interest is the second step in the problem
solving process. This is when you choose the optimal solution.
Answer: false

These kind of words or terms are often discouraged to be used during a


presentation, especially if the audience is not that familiar with programming
terms.
A: technical words

Referring to the figure below, determine if the statement is TRUE or FALSE.

The first version of the risk management file should be named Risk Management V01.
A: true

PROG-113A / ► Week 20: Second Quarter Exam / ► Second Quarter Exam (50/50) (PS: Pabago bago ang
questions, pero same lang sa ibang short quizes or learning activity yung questions and sagot)
<3 :)

Which of the following does NOT describes SELECT Statement in a PL/SQL.


Answer: Queries must return only one column.
You want to display all the records of employee the same with the salary employee number 103. Answer:
SELECT * FROM employees WHERE salary = (SELECT salary from employees where employee_id=
103)
Which of the following stored procedure to create a procedure to that will be used to display the
employee id and salary of Steven King?
Answer: CREATE OR REPLACE PROCEDURE query_emp
(p_last_name IN employees.last_name%TYPE, p_first_name IN
employees.first_name%TYPE, p_employee_id OUT
employees.employee_id%TYPE, p_salary OUT employees.salary
%TYPE) IS
BEGIN
SELECT employee_id, salary INTO p_employee_id, p_salary
FROM employees
WHERE last_name = p_last_name AND first_name = p_first_name; END
query_emp;
Which of the folllowing is TRUE?
Answer: SQL code are embedded within PL/SQL statements
When an exception is user defined, the exception is raised .
Answer: Explicitly
Which of the folllowing is TRUE?
Answer: SQL code are embedded withing PL/SQL statements Weak
REF CURSOR is very flexible.
Answer: True
How do you test the output of a PL/SQL block?

Downloaded by Joseph Lapso ([email protected])


Answer: Use a predefined Oracle package and its procedure
Restrictive, specifies a RETURN type, associates only with type-compatible queries are description of a .
Answer: Strong REF CURSOR
Which of the following DOES NOT describes an exception?
Answer: Exception is a PL/SQL error that is raised before program execution.
These are local variables declared in the parameter list of a subprogram specification. Answer:
Formal parameter
Which of the following rules is INCORRECT about cursor variables?
Answer: None of the choices.
When an exception is predefined by Oracle server, the exception is raised .
Answer: Explicitly
Which of the following DOES NOT describes an exception?
Answer: Exception is a PL/SQL error that is raised before program execution. Evaluate
the following PL/SQL.
CREATE OR REPLACE PROCEDURE query_employee
(p_id IN employees.employee_id%TYPE,
p_name OUT employees.last_name%TYPE,
p_salary OUT employees.salary%TYPE) IS
BEGIN SELECT last_name, salary INTO p_name, p_salary
FROM employeesWHERE employee_id = p_id;
END query_employee
Answer: No error
You want to know the total number of employees whose firstname starts with letter D. Which
of the folllowing PLS/SQL executes successfully?
Answer: DECLARE
v_first_name employees.first_name%TYPE := 'D%';
BEGIN
SELECT COUNT(*) INTO v_first_name FROM employees WHERE first_name LIKE v_first_name;
DBMS_OUTPUT.PUT_LINE(v_first_name);
END;
What is the error trapping function that returns the numeric value of the error code? Answer:
SQLCODE
You want to display the name, salary and tax of employee #150. Which of the PL/SQL will execute
successfully? Note tax is computed as 2% of the salary.
Answer: DECLARE
v_first_name VARCHAR2(50);
v_last_name VARCHAR2(50);
v_salary INTEGER(20);
v_tax INTEGER(10);
BEGIN
SELECT first_name, last_name, salary, salary * 0.02 INTO v_first_name, v_last_name, v_salary, v_tax
FROM employees WHERE employee_id = 150;
DBMS_OUTPUT.PUT_LINE('Firstname : '|| v_first_name);
DBMS_OUTPUT.PUT_LINE('Lastname : '|| v_last_name);
DBMS_OUTPUT.PUT_LINE('Salary : '|| v_salary);
DBMS_OUTPUT.PUT_LINE('Tax : '|| v_tax);
END;
Which of the following is the syntax to close a cursor?
Answer: CLOSE cursor_variable_name;
Which of the following rules is INCORRECT about cursor variables?
Answer: None of the choices.
What are the three PL/SQL block types?

Downloaded by Joseph Lapso ([email protected])


Answer: Anonymous, Procedure, Function
You can trap any error by including a corresponding handler within the exception-handling section of the
PL/SQL block.
Answer: True
Which of the following describes weak REF CURSOR?
Answer: Associates with any query
Given the answer in item , which of the folllowing stored procedure will display the
employee id and salary of Steven King?
Answer: DECLARE
v_employee_id employees.employee_id%TYPE;
v_emp_sal employees.salary%TYPE;
BEGIN
query_emp('King', 'Steven', v_employee_id, v_emp_sal); DBMS_OUTPUT.PUT_LINE('Employee ID
' || v_employee_id ||' earns '|| to_char(v_emp_sal, '$999,999.00'));
END;
You have been tasked to update the database by creating a PL/SQL to increase the salary of all IT Programmer
employees by 50% of their existing salary.
Which of the following will execute successfully?
Answer: DECLARE
v_job_id employees.job_id%TYPE := 'IT_PROG';
BEGIN
UPDATE employees SET salary = salary *0.50 WHERE job_id = v_job_id;
END;
Which of the folllowing is required in a subquery?
Answer: SELECT
What is the exception name when PL/SQL has an internal problem
Answer: PROGRAM_ERROR
In the DECLARE section of the PL/SQL block,
Answer: All of the choices
Actions are being performed when error occurs during PL/SQL execution in the Answer:
EXCEPTION
What is the exception name when PL/SQL has an internal problem
Answer: PROGRAM_ERROR
Which of the folllowing statement describes PL/SQL?
Answer: PL/SQL is an Oracle proprietary, procedural, 3GL programming language Evaluate
the following PL/SQL.
DECLARE
v_employee_id employees.employee_id%TYPE := 114;
BEGIN
DELETE employees WHERE employee_id = v_employee_id;
END;
Answer: The PL/SQL will delete employee number 114.
Which of the following command is used to create a stand-alone procedure that is stored in the Oracle
database?
Answer: CREATE PROCEDURE
Evaluate the following PL/SQL.
DECLARE
v_email VARCHAR(20);
BEGIN
SELECT email INTO v_email FROM EMPLOYEES WHERE email like 'D%';
DBMS_OUTPUT.PUT_LINE ('Employees whose email address starts with letter D :'
|| v_email);

Downloaded by Joseph Lapso ([email protected])


EXCEPTION
WHEN TOO_MANY_ROWS THEN
DBMS_OUTPUT.PUT_LINE (' Your select statement retrieved multiple rows.'); END;
Answer: The PL/SQL block will run successfully.
Which of the following is the syntax to define a REF CURSOR type?
Answer: TYPE ref_type_name IS REF CURSOR
[RETURN return_type];
The PL/SQL code block helps modularize code by using:
Answer: All of the choices
Which of the following is the syntax to fetch from a cursor variable? Answer:
FETCH cursor_variable_name INTO variable_name1 [,variable_name2,. . .] |
record_name;
You want to display all records in the database whose salary is above the salary of Alexander Hunold.
Answer: SELECT * from employees WHERE salary < (SELECT salary FROM employees WHERE first_name
= 'Alexander' AND last_name = 'Hunold')
Procedure can be stored in the database as a schema object.
Answer: True
In PL/SQL Block Structure, which of the following are mandatory? Answer:
BEGIN and END
PL/SQL stands for
Answer: Procedural Language extension to SQL
Which of the following is CORRECT about sub-queries?
Answer: Subquery execute before the main query executes.
Which of the following does NOT describes SELECT Statement in a PL/SQL. Answer:
Queries must return only one column.
PL/SQL Provides a block structure for executable units of .
Answer: Code
Evaluate the SQL command
SELECT employee_id, salary from employees where salary = ANY (SELECT salary FROM employees
WHERE job_id = 'IT_PROG') AND job_id = 'ST_CLERK'
Answer: This has no error.
Which of the following PL/SQL will execute successfully?
Answer: DECLARE
v_salary INTEGER(20);
BEGIN
SELECT salary INTO v_salary FROM employees WHERE employee_id = 150; END;
In PL/SQL Block Structure, which of the following are OPTIONAL?
Answer: None of the choices
Evaluate the following PL/SQL. At what line number is the error of the PL/SQL? DECLARE
v_deptno NUMBER := 800;
e_invalid EXCEPTION;
BEGIN
DELETE FROM departments WHERE
department_id = v_deptno; IF SQL %
NOT_FOUND THEN
RAISE e_invalid;
END IF;
COMMIT;
EXCEPTION

Downloaded by Joseph Lapso ([email protected])


WHEN e_invalid THEN DBMS_OUTPUT.PUT_LINE('No
such department id.'); END;
Answer: 7
What is the error trapping function that returns the numeric value of the error code? Answer:
SQLCODE
Fetch into a record when fetching from a cursor.
Answer: True

LA2

Display the name, jobs id and salary of the all the employees whose department id is 100 and salary is
below 8000. Arrange the output by salary in ascending order.
SELECT first_name, last_name, salary FROM employees WHERE department_id = 100 AND salary <
8000 ORDER BY salary

Display employee's name and id whose firstname starts with letter D and job id is SA_REP. Sort the
output by department.
SELECT employee_id, first_name, last_name FROM employees WHERE first_name LIKE 'D%' and job_id
= 'IT_PROG' ORDER BY department_id

List all the employee_id of all employees whose salary is 5000 and below and belong to department 60
or 100.
SELECT employee_id,salary, department_id FROM employees WHERE salary < 5000 AND
department_id IN (60,100)

----------------------------------------
SQ2

Display all the records sorted by price from most expensive to the cheapest parts.
SELECT * FROM parts ORDER BY price DESC

Display all the records whose stock is below 20 and in warehouse number 3.
SELECT * FROM parts WHERE onhand< 20 AND warehouse = 3;

Ronnie is the stockman in the warehouse of ATR Corporation. The General Manager wants to know
the parts whose price is above 10000 and above. Which of the following SQL command that Ronnie
will run to generate the list.
SELECT * FROM parts WHERE price >= 10000;

Which of the following SQL command will display all records with class code of AP?
SELECT * FROM parts WHERE class = ‘AP’;

Downloaded by Joseph Lapso ([email protected])


Which of the following SQL commands will display all stocks whose class is HW or AP.
SELECT * FROM parts WHERE IN class ('HW', 'AP');

LA3

Display the first 5 letter in the surname of all the employees whose firstname starts with letter 'D'
SELECT SUBSTR(last_name,1,5), first_name FROM employees WHERE SUBSTR(first_name,1,1) = 'D'

Display the employee id, number of years and the hiring date of every employee in the company.
SELECT employee_id, hire_date, ROUND((SYSDATE - hire_date) /365,0) FROM employees;

Every employee will get a bonus of 150% of his/her current salary. Display the employee id, salary and
the bonus of every employee. Label the computed bonus with Bonus
The correct answer is: SELECT employee_id, salary, salary * 1.5 AS Bonus FROM employees

----------------------------------------
SQ3

Display the montly salary of every employee. Round the salary in 2 decimal places.
SELECT ROUND( (salary/12),2 ) FROM employees;

Display the total number of characters of the last name of all the employees.
SELECT LENGTH(last_name) FROM employees;

Display the first 3 letter in the first name of all the employees.
SELECT SUBSTR(first_name,1,3) FROM employees;

Display the last day of the month and the hiring date when the employees are hired in the company.
SELECT LAST_DAY(hire_date), hire_date FROM employees;

----------------------------------------
LA4

You want to display the employee id and the year when an employee was hired.
Which SQL statement give the required output?
SELECT employee_id, TO_CHAR(hire_date,'YYYY') FROM employees;

You want to display the employee id and the month an employee was hired.
Which SQL statement give the required output?

Downloaded by Joseph Lapso ([email protected])


SELECT employee_id, hire_date, TO_CHAR(hire_date,'Month') AS "Hired Month" FROM employees;

You want to display the employee's last name whose salary is below 10,000.
Which SQL statement give the required output format of the salary?
Required output :
SELECT last_name, TO_CHAR(salary, '$999,999.99') AS "MONTHLY SALARY" FROM employees WHERE
salary < 10000

----------------------------------------
SQ4

You want to display the last name and the year when an employee was hired whose job id is IT_PROG.
Which SQL statement give the required output?
SELECT last_name, TO_CHAR(hire_date,'YYYY') FROM employees WHERE job_id = ‘IT_PROG’;

You want to display all the employee id and the month an employee was hired excluding employees
whose job id is AD_VP. Which SQL statement give the required output?
SELECT employee_id, hire_date, TO_CHAR(hire_date,'Month') AS "Hired Month", job_id FROM
employees WHERE job_id NOT IN ('AD_VP');

You want to display the employee's id and formatted date hired as shown below.
Which SQL statement give the required output?
Required output :
SELECT employee_id, TO_CHAR(hire_date, 'fmMonth DD, YYYY') AS "Hired Date" FROM employees;

----------------------------------------
LA5

The General Manager request to the Database Administrator to generate the total salary per month of
every department in the company.
SELECT department_id, SUM(salary) FROM employees GROUP BY department_id

Ms. Ella what to generate the average salary of all employees whose job function is IT_PROG.
Which of the following SQL command will produce the output.
SELECT AVG(salary) FROM employees WHERE job_id = 'IT_PROG';

Aldrin wants to know the highest salary in every department. Which of the following SQL command will
display the required output?
SELECT department_id, MAX(salary) FROM employees GROUP BY department_id

What is the SQL command to display the date of the first employee that was hired?
SELECT MIN(hire_date) FROM employees;

Downloaded by Joseph Lapso ([email protected])


John want to know how many employees receiving salary below 10,000. What SQL command he need to
run?
SELECT COUNT(*) FROM employees WHERE salary < 10000;

----------------------------------------
LQ1

John want to know how many part items are there in warehouse number 3.
What SQL command he need to run?
SELECT COUNT(*) FROM parts WHERE warehouse = 3;

Which of the following SQL command will display all records with part number contains the number 9?
SELECT * from parts WHERE partnum LIKE '%9%'

What will be the output of the following SQL?


SELECT * FROM parts WHERE (warehouse = 1 or warehouse = 2) AND class IN ('HW', 'AP') AND (price >
200 AND price < 500);
2 rows returned

What will be the output of the SQL command?


SELECT SUM(onhand) FROM PARTS where class = 'HW' OR class = 'AP' AND warehouse = 1;
137

There was 10% price increase in the all the parts in warehouse number 3. The Store Manager asked the
Database Administrator to generate a report showing the part number, the old and new price.
Which of the following SQL statement would satisfy the requirement of the Store Manager.
SELECT partnum, price, price * 1.1 FROM parts WHERE warehouse = 3

Which of the following SQL command will display the summary table showing the total quantity on hand
per class.
SELECT class, sum(onhand) AS "QTY ON HAND" FROM parts GROUP BY class

Aldrin wants to know the outstanding total balance on hand on every class per warehouse.
SELECT warehouse, class, sum(onhand) FROM parts GROUP BY warehouse, class

----------------------------------------
LA6

The HR Manager instruct the Database Officer to display employee's name and the minimum and
maximum salary the employee can received. Which of the following SQL command will generate the

Downloaded by Joseph Lapso ([email protected])


output?
SELECT first_name, last_name, job_id, min_salary, max_salary FROM employees JOIN jobs USING
(job_id);

What will be the output of the SQL command below?


SELECT first_name, last_name, job_title FROM employees CROSS JOIN jobs ORDER BY last_name;
A Cartesian product

What will be the output of the SQL command below?


SELECT last_name, job_id, job_title FROM employees NATURAL JOIN jobs
List of names and job title of matched records from the employees and jobs table

----------------------------------------
SQ6

Given the SQL command


SELECT * FROM employees JOIN departments USING (department_id)
Which of the following describes the SQL command?
Joined table from the employees and department table

Display the location id of all employee's name and salary whose salary is from 5000 to 10000.
SELECT first_name, last_name, salary FROM employees JOIN departments USING
(department_id) WHERE salary >= 5000 AND salary <= 10000

Display the manager id and employee id of every employee


SELECT E.employee_id, D.manager_id FROM employees E JOIN departments D ON E.department_id =
D.department_id

Given the SQL command


SELECT employees.first_name, employees.last_name, employees.salary,departments.department_name
FROM employees, departments
WHERE employees.department_id =
departments.department_id; Which of the following describes
the SQL command?
List of employees name, salary and department name

----------------------------------------
LA7

Remove the Shareholder Services department in the department table


DELETE FROM departments WHERE department_name = ‘Shareholder Services’

A new department name Training with department id 300 was created in the company. This will be
managed by a Manager with ID of 203 and will located at location id 2400.

Downloaded by Joseph Lapso ([email protected])


Create a SQL command to update the information in the department table.
INSERT INTO departments VALUES (300, 'Training', 203, 2400)

Create a SQL command to add a new position Database Administrator with job id of DB_ADMIN whose
salary ranges from 10,000 to 18,000.
INSERT INTO jobs VALUES ('DB_ADMIN', 'Database Administrator', 10000, 18000)

Remove all Manager positions in the department table.


DELETE FROM jobs WHERE job_title LIKE '%Manager%';

SQ7

Create a SQL command to add a new position Java Developer with job id of JAVA_DEV whose salary
ranges from 7,000 to 8,000.
INSERT INTO jobs VALUES ('JAVA_DEV', 'Java Developer', 7000, 8000)

Add a 500 pesos increase in salary of all employees who have rendered services 10 years and above.
UPDATE employees SET salary = salary + 500 where TO_CHAR(sysdate,'YYYY') -
TO_CHAR(hire_date,'YYYY') >= 10

Which of the following DOES NOT describes the state of the data after the COMMIT command
None of the choices

Which of the following describes the command below?


SELECT * FROM employees WHERE department = 60 FOR UPDATE
Locks the rows in the EMPLOYEES table with department id is 60.

Which of the following will erase all records in the departments table
TRUNCATE TABLE departments

SQL command to create a marker in the current transaction.


SAVEPOINT

Nathaniel had accidentally deleted all the records in the newly updated ORACLE database using the
DELETE SQL command. What is the best solution that he can do to restore all the deleted records in the
database.
Run the ROLLBACK command

LA8

Which of the following will grant a query privileges on the STUDENT table
GRANT select ON student TO matt

Downloaded by Joseph Lapso ([email protected])


You want to cancel the privilege of matt to add records from the employees table.
REVOKE insert ON employees FROM matt;

This has the highest level of privileges for task such as creating new users, removing users and tables and
backing up tables.
DBA

SQ8

TRUE OR FALSE.
An owner has all the privileges on the object.
True

Which of the following provide privilege to update the employees table?


GRANT update (salary) ON employees TO matt

Which of the following will is the correct command to create a role.


CREATE ROLE gen_manager

Matt wants to change his password from 1234 to abcd.


Which of the following will perform the task?
ALTER USER matt IDENTIFIED abcd;

The DBA will create a new user name sales.


Which of the following SQL command will perform the creation?
CREATE sales ACCESS 1234

Which of the following SQL command that the DBA will run to provide Matt to create a table in the
Oracle Database.
GRANT create table TO matt

What privileges that manipulates the content of the database objects.


Object Privileges

1st Q Exam

Evaluate the following SQL command


SELECT employee_id, salary, department_id FROM employees WHERE department_id IN (60,70)

Downloaded by Joseph Lapso ([email protected])


The SQL command will display employees with department id 60 or 70.

True or False. The AND, OR, NOT are comparison operators.


False

What is the SQL command to count the number of records in the employees table?
SELECT COUNT(*) FROM employees

What will be the SQL command if every employee will be given a productivity bonus which is equivalent
to 3% of the monthly salary?
Display the employee id, salary and the productivity bonus.
SELECT employee_id, salary, salary * .03 FROM employees

Display the employee id, salary, number of years and the hiring date of every employee in the company.
SELECT employee_id, salary, hire_date, ROUND((SYSDATE - hire_date) /365,0) FROM employees;

You what to generate the average salary of all employees whose job function is FI_ACCOUNT.
Which of the following SQL command will produce the output.
SELECT AVG(salary) FROM employees WHERE job_id = 'FI_ACCOUNT';

You want to display all the job position titles whose salary is salary from 5,000 to 12,000 arrange from
highest to lowest
SELECT job_title FROM jobs WHERE min_salary >= 5000 AND max_salary<= 10000

List all employees except for IT_PROG job id.


All of the choices

Austin David was transferred to Purchasing Department. You are assigned to update the database.
Which of the following SQL command will satisfy the requirements?
UPDATE employees SET department_id = 30 WHERE first_name = ‘David’ AND last_name = ‘Austin’

Display the lastname of every employee in the company. Display the output in a single column and label
it as Fullname
Format: JuanReyes
SELECT CONCAT(first_name, last_name) AS Fullname FROM employees

Evaluate the following SQL command


SELECT * FROM jobs WHERE job_title LIKE 'Manager%'
No records will be displayed

Display all the records in the employee table. Arrange the output in by lastname from A-Z order.
SELECT * FROM employees ORDER BY lastname

You want to generate the total salary per month of every department in the company.
SELECT department_id, SUM(salary) FROM employees GROUP BY department_id

Downloaded by Joseph Lapso ([email protected])


You want to display the employee's last name whose salary is below 10,000 and whose lastname starts
with letter D.
Which SQL statement give the required output format of the salary?
SELECT last_name, TO_INTEGER(salary, $999,999.99) AS "MONTHLY SALARY" FROM employees WHERE
salary < 10000 WHERE last_name IN 'D%'

In creating Joins,the NATURALJOIN and USING clauses are


Mutually Exclusive

Display employee id, lastname, firstname, department name, annual salary, location id of employees
whose location id is 1700 and working in Finance Department. Label the annual salary to ANNUAL
SALARY.
Sort the output in from highest to lowest salary. (4 POINTS)
SELECT E.employee_id, E.last_name, E.first_name, D.department_name, E.salary*12 AS "ANNUAL
SALARY", D.location_id
FROM employees E
JOIN jobs J ON E.job_id = J.job_id
JOIN departments D ON E.department_id = D.department_id
WHERE D.location_id = 1700 AND D.department_name = 'Finance'
ORDER BY "ANNUAL SALARY" DESC

Question text
Observe the following statements and decide whether the variable result’s value is TRUE or FALSE.
Given that:
int x = -
77; int z =
43;
result = (z < x && 1 != 10) ? true :
false; result = (z != 43) ? true : false;
Select one:
False
Question text
Read each statement carefully and decide whether it’s TRUE or FALSE.
The last line of code, with a close brace { symbol, is properly indented.
Select one:
False
Question text
True or False: Brackets [] are also separators used in declaring arrays.
Answer:
True
Question text
Refer to the block of codes below. Read each statement carefully and decide whether
it’s TRUE or FALSE.
There is an error in line
9. Answer:
TRUE

Downloaded by Joseph Lapso ([email protected])


Question text
True or False: Operators, in Java programming language, use special symbols to call
methods and their objects.
Answer:
False
Question text
Read each statement carefully and decide whether it’s TRUE or FALSE.
There are no errors in the program.
Select one:
False
Question text
Refer to the block of codes below. Read each statement carefully and decide whether
it’s TRUE or FALSE.
Line 9 uses a traditional comment which uses double forward slash.
Answer: False
Question text
True or False: Many programmers can be literate with Java programming language for it
is intended to be that way.
Answer:
True
Question text
True or False: You’ll know there’s an error if you see a red circle with an exclamation
point in Netbeans IDE.
Answer:
True
Question text
Observe the following statements and decide whether the variable result’s value is
TRUE or FALSE.
Given that:
int x = -
77; int z =
43;
result = (z < x && 1 != 10) ? true :
false; result = (x = 100) >= z;
Select one:
True
The file is accurately named – Students.java.

-false
There are three (3) separators found in line 13.

-FALSE
There is an error in line 9.

-True
result = 90 < x || -1 < z;

-True

The last line of code, with a close brace { symbol, is properly indented.

Downloaded by Joseph Lapso ([email protected])


-False
Assuming there are no errors in the code, line 13 would display When I graduate, I’d be 18.

-True
Figure 2 shows the Netbeans Integrated Development Environment.

-True

The last line of code will output 100.0.

-True
True or False: An exclamation point in Java means NOT. Therefore, != means not equal to.

-True
There are two types of comments used in the program above – end of line and Javadoc comments.

-True
result = (z < x && 1 != 10) ? true : false;

-False

There are keywords found in line 7.

-True
In line 11, the value of personage is 18.

-TRUE
If there are no errors in the program, the first line of output would read Hi, I’m a normal person.

-False
result = (x * z + (z += 7)) >= 100;
-False
True or False: Logical OR operator will result to false if one of the expressions is false.

-False
True or False: Semicolon (;) is a separator used to end a Java statement.

-True
True or False: There are five types of integer data types – byte, short, int, long and float.

-False
True or False: Single equal sign (=) is used for assigning values while double equal sign (==) is used in
comparing values.

-True

Downloaded by Joseph Lapso ([email protected])


True or False: Java’s ternary operator is a short hand for the if-then-else statement which uses a question mark
and a colon.

-True
True or False: JDK or Java Design Kit is required to compile and run Java apps and applets.

-True
On line 6, average is equal to 0. But on line 9, average will be equal to 100.
-False
True or False: Identifiers in Java are, in simple words, name that you give to Java class, variables and
methods.

-True
True or False: When you run javac in a command line interface, it will automatically create another file with a
filename extension .class.

-True
Line 9 uses a traditional comment which uses double forward slash.

-FALSE
There are five (5) separators used in line 8.

-TRUE
There are no errors on line 8.

-FALSE
True or False: Syntax is basically the spelling and grammar errors compiled in a Java programming language. It
should be avoided in writing apps and applets.

-False
True or False: Operators, in Java programming language, use special symbols to call methods and their objects.

-False
If you run this program, the second line of output will read Your score is:.
-True
True or False: Java is a low level programming language.

-False
There are also punctuators used in line 10, in between System, out and println, the parentheses and semicolon.

-TRUE
If there are no errors and this simple program runs through CLI, the first line will display: Hi, students!

Downloaded by Joseph Lapso ([email protected])


-False
True or False: Brackets [] are also separators used in declaring arrays.

-True

Substrings can contain 1 or 2 arguments.


-true
Determine the output.

-bar

The index of the letter “y” in string “Doggy” is 5.


-False
Determine the output.
-foo

TRUE OR FALSE: The value “val_3” is a white space “ “.

-False

True or False: Variable 1st_num is a good variable name in Java programming.


-False

TRUE OR FALSE: “val_2” contains “The”


-True
True or False: Instance variables are declared inside a method but outside a class.
-False

True or False: Variable names in Java are not necessarily case sensitive.
-False

Determine the output

-36

True or False: Public, private and protected are some of the return types used in Java programming.
-False

True or False: Divide and conquer strategy, in programming, is also known as the top-down design.
-True

If there are no errors in the program, line 9 would display I weigh 160.
-False

True or False: A boolean variable can only have two values; it is either true or false.
-True

Downloaded by Joseph Lapso ([email protected])


result = !((x * 10) < z);
-False

result = -(-z) == 43;


-True

True or False: If you get an error while running the javac command in the CLI, it could be resolved by editing
the Path value in Environment Variables.
-True

True or False: The subtraction assignment operator subtracts the left and right operand and assigns the
difference to the operand at the right.
-False

-False
x += x;
result
The = x ==
second line154;
of output will be: You are in Year 11.
-True

True or False: The conditional AND operator uses two ampersand (&&) symbols.
-True

result = 43 <= z;
-True

True or False: You’ll know that a variable is a class variable when you see that variable inside a class with
the word static.
-True

The string method “length( )” returns the number of characters within a string.
-True

A string can contain numbers.

-True

TRUE OR FALSE: This is an example of concatenation.


-True

TRUE OR FALSE: The value of “val_4” is “fox”


-False

TRUE OR FALSE: “val_2” contains “The”.


-True

Determine the output.

Downloaded by Joseph Lapso ([email protected])


-f6

Languages which use procedural programming include C, (Answer) FORTRAN, Pascal and BASIC.

-C++

True or False: Local variables are declared inside the default method.
-False

Strings can be declared with str.


-False

True or False: Procedural programming involves instructing the system as to how to complete a task.
-True

TRUE OR FALSE: The output of this code is “The quick brown fox”
-False

Among the expressions below which is a statement?


-True

Expressions can be long and complex.


-true

number++; is an expression
-true

For-loops has a set number of iterations before starting.


-True

The equals( ) method can compare more than 2 arrays.


-False

While loops can use Booleans at test expressions.


-True

The test expression of the if statement is


-less than or equal to

There are four (4) major features of an object-oriented programming language – encapsulation, inheritance,
polymorphism and abstraction.
-True

Using a break; statement causes the loop to jump to the next iteration.
-False

x+1 is example of a statement.


-False

Downloaded by Joseph Lapso ([email protected])


number++; is a block
-False
Arrays are

-Integers

The operator “new” allocates a memory block the size of what is declared.
-true

A class block can be an expression


-False

Statements can be expressions.


-False

Integer arrays can be populated with characters.


-False

Declaration clauses are declared as “number + 1”.


-False

Loops can be stopped with a break; statement.


-True

The equivalent of Paragraphs in coding is?


-Expressions

If statements cannot be nested in switches


-true

The length( ) method returns the size (number of indices) has.


-True

When polymorphism is used, the Java object can only take one form. Subclasses should have the same function
with the parent class.
-False

Arrays can contain (Answer) number of elements.

-Any

“||” and “&&” can be used in conditional statements.


-True

A class statement has three (3) major parts – declaration, initialization and instantiation.
-False

Declaring an object in Java uses the new keyword to create a new object.

Downloaded by Joseph Lapso ([email protected])


-False

Please refer to Figure 2 to answer the question below: If the expression “num = 0” is changed to “num = 5”
the final output will be

-5

Expressions can be statements.


-True

Blocks can contain more blocks of code.


-True

If-else statements can be nested in?


-All of the choices
Statements are equivalent to paragraphs.
-False

A (answer) array is an array containing true or false values.

-boolean

Switches are always used with if-else statements


-False

True or False: The modulus operator returns the remainder of a division operation instead of the quotient.
-true

Determine the output.


String val_1 = “564298”;

-5698

Determine the output.


String val_1 = “35”;

-4

The return value of the length( ) method is an integer


-true

A superclass is also known as a parent class.


-true

For-loops can be nested in while loops.


-true

In instantiating an object, the keyword instance is used.

Downloaded by Joseph Lapso ([email protected])


-False

Object oriented programming utilizes the top down method


-False

Expressions are like clauses.


-true

The sort( ) method is always ascending.


-true

Arrays are data types.


-False

Variables must be declared as (Answer) for it to be fully hidden.

-private

While statements check the test expression at the end.


-False

The else statement can be used alone.


-False

The fill( ) method (Answer) the array with specific values.

-Fills

The output of println is

-55555

The person’s weight is declared correctly with the correct data type (byte) and value (160).
-FALSE

Determine the output.


String val_1 = “foo”

String val_2 = “bar”


val_2 = val_1; val_1
= val_3;

System.out.println(val_1);

-bar

Determine the output.


String val_1 = “foo”

String val_2 = “bar”

Downloaded by Joseph Lapso ([email protected])


val_2 = val_1;
val_1 = val_3;

System.out.println(val_2);

-foo

Switches can work properly even without the “break” expression.


-True

Blocks can be one liner or huge classes.


-True

The test expressions in conditional statements can be left empty.


-False

Abstraction works by hiding the implementation details and showing only the functions necessary.
-True

A single array can hold multiple data types


-False

A polymorphic object can pass more than one Is-a test.


-True

Another loop can be used as test expression.


-False

True or False: Public, static and void are sample of Java reserved keywords.
-True

The value of “pStr” in line 24 is

-True

The default syntax of a constructor is <class_name>(parameter, parameter){ }


-False

A nested class is not an inner class.


-False

Nested classes causes them to become abstracted


-False

A nested class is also called

-inner class

If you want some variables and methods hidden from other classes, you could implement encapsulation where
these variables and methods are wrapped in a single unit.

Downloaded by Joseph Lapso ([email protected])


-True

A constructor can only have 1-2 overloads or parameters.


-False

All possible data types of an array can be retuned as a string by the toString( ) method.
-True

Abstracted classes can contain 1 or more abstract methods.


-True

Abstraction shows the every bit of detail and implementation on how an application does something.
-False

Initialization is a process where the constructor is called for.


-True

The default syntax of a constructor is <class_name>( ){ }


-True

Classes cannot be nested.


-False

Abstract classes cannot have nested classes.


-False

The parent class of a nested class is called an outer class


-True

An inner class can be constructed directly without reference to the outer class.
-False

Arrays can be read backwards


-True

A single array can hold

-One data type

Abstracted methods already have implementations inside.


-False

are special methods to initialize objects.

-constructors

Constructors have 3 basic rules to follow.


-False

Downloaded by Joseph Lapso ([email protected])


Nesting classes increases encapsulation.
-True

Each index can only contain (Answer) element.

-one

The sort( ) method can be set to sort only a part of an array.


-False

Subclasses or child classes could have different behaviors but still share the same functions from their parent
class.
-True

Abstract methods must have an explicit return value


-False

An abstract class must not contain abstract methods.


-False

Abstracted classes can be nested.


-True

A subclass constructor cannot invoke a superclass constructor.


-False

A class acquiring fields and methods of another class is called inheritance.


-True

Parallelsorting utilizes

-More cpu processing cores

method can copy one array to another.

-arraycopy()

Question text
Observe the following statements and decide whether the variable result’s value is TRUE or FALSE.
Given that:
int x = -
77; int z =
43;
result = (z < x && 1 != 10) ? true :
false; result = (z != 43) ? true : false;
Select one:
False
Question text
Read each statement carefully and decide whether it’s TRUE or FALSE.
The last line of code, with a close brace { symbol, is properly indented.

Downloaded by Joseph Lapso ([email protected])


Select one:
False
Question text
True or False: Brackets [] are also separators used in declaring arrays.
Answer:
True
Question text
Refer to the block of codes below. Read each statement carefully and decide whether
it’s TRUE or FALSE.
There is an error in line
9. Answer:
TRUE
Question text
True or False: Operators, in Java programming language, use special symbols to call
methods and their objects.
Answer:
False
Question text
Read each statement carefully and decide whether it’s TRUE or FALSE.
There are no errors in the program.
Select one:
False
Question text
Refer to the block of codes below. Read each statement carefully and decide whether
it’s TRUE or FALSE.
Line 9 uses a traditional comment which uses double forward slash.
Answer: False
Question text
True or False: Many programmers can be literate with Java programming language for it
is intended to be that way.
Answer:
True
Question text
True or False: You’ll know there’s an error if you see a red circle with an exclamation
point in Netbeans IDE.
Answer:
True
Question text
Observe the following statements and decide whether the variable result’s value is
TRUE or FALSE.
Given that:
int x = -
77; int z =
43;
result = (z < x && 1 != 10) ? true :
false; result = (x = 100) >= z;
Select one:
True
The file is accurately named – Students.java.

Downloaded by Joseph Lapso ([email protected])


-false
There are three (3) separators found in line 13.

-FALSE
There is an error in line 9.

-True
result = 90 < x || -1 < z;

-True

The last line of code, with a close brace { symbol, is properly indented.
-False
Assuming there are no errors in the code, line 13 would display When I graduate, I’d be 18.

-True
Figure 2 shows the Netbeans Integrated Development Environment.

-True

The last line of code will output 100.0.

-True
True or False: An exclamation point in Java means NOT. Therefore, != means not equal to.

-True
There are two types of comments used in the program above – end of line and Javadoc comments.

-True
result = (z < x && 1 != 10) ? true : false;

-False

There are keywords found in line 7.

-True
In line 11, the value of personage is 18.

-TRUE
If there are no errors in the program, the first line of output would read Hi, I’m a normal person.

-False
result = (x * z + (z += 7)) >= 100;
-False
True or False: Logical OR operator will result to false if one of the expressions is false.

-False

Downloaded by Joseph Lapso ([email protected])


True or False: Semicolon (;) is a separator used to end a Java statement.

-True
True or False: There are five types of integer data types – byte, short, int, long and float.

-False
True or False: Single equal sign (=) is used for assigning values while double equal sign (==) is used in
comparing values.

-True
True or False: Java’s ternary operator is a short hand for the if-then-else statement which uses a question mark
and a colon.

-True
True or False: JDK or Java Design Kit is required to compile and run Java apps and applets.

-True
On line 6, average is equal to 0. But on line 9, average will be equal to 100.
-False
True or False: Identifiers in Java are, in simple words, name that you give to Java class, variables and
methods.

-True
True or False: When you run javac in a command line interface, it will automatically create another file with a
filename extension .class.

-True
Line 9 uses a traditional comment which uses double forward slash.

-FALSE
There are five (5) separators used in line 8.

-TRUE
There are no errors on line 8.

-FALSE
True or False: Syntax is basically the spelling and grammar errors compiled in a Java programming language. It
should be avoided in writing apps and applets.

-False
True or False: Operators, in Java programming language, use special symbols to call methods and their objects.

-False
If you run this program, the second line of output will read Your score is:.

Downloaded by Joseph Lapso ([email protected])


-True
True or False: Java is a low level programming language.

-False
There are also punctuators used in line 10, in between System, out and println, the parentheses and semicolon.

-TRUE
If there are no errors and this simple program runs through CLI, the first line will display: Hi, students!
-False
True or False: Brackets [] are also separators used in declaring arrays.

-True

Substrings can contain 1 or 2 arguments.


-true
Determine the output.

-bar

The index of the letter “y” in string “Doggy” is 5.


-False
Determine the output.
-foo

TRUE OR FALSE: The value “val_3” is a white space “ “.

-False

True or False: Variable 1st_num is a good variable name in Java programming.


-False

TRUE OR FALSE: “val_2” contains “The”


-True
True or False: Instance variables are declared inside a method but outside a class.
-False

True or False: Variable names in Java are not necessarily case sensitive.
-False

Determine the output

-36

Downloaded by Joseph Lapso ([email protected])


True or False: Public, private and protected are some of the return types used in Java programming.
-False

True or False: Divide and conquer strategy, in programming, is also known as the top-down design.
-True

If there are no errors in the program, line 9 would display I weigh 160.
-False

True or False: A boolean variable can only have two values; it is either true or false.
-True

result = !((x * 10) < z);


-False

result = -(-z) == 43;


-True

True or False: If you get an error while running the javac command in the CLI, it could be resolved by editing
the Path value in Environment Variables.
-True

True or False: The subtraction assignment operator subtracts the left and right operand and assigns the
difference to the operand at the right.
-False

-False
x += x;
result
The = x ==
second line154;
of output will be: You are in Year 11.
-True

True or False: The conditional AND operator uses two ampersand (&&) symbols.
-True

result = 43 <= z;
-True

True or False: You’ll know that a variable is a class variable when you see that variable inside a class with
the word static.
-True

The string method “length( )” returns the number of characters within a string.
-True

A string can contain numbers.

Downloaded by Joseph Lapso ([email protected])


-True

TRUE OR FALSE: This is an example of concatenation.


-True

TRUE OR FALSE: The value of “val_4” is “fox”


-False

TRUE OR FALSE: “val_2” contains “The”.


-True

Determine the output.

-f6

Languages which use procedural programming include C, (Answer) FORTRAN, Pascal and BASIC.

-C++

True or False: Local variables are declared inside the default method.
-False

Strings can be declared with str.


-False

True or False: Procedural programming involves instructing the system as to how to complete a task.
-True

TRUE OR FALSE: The output of this code is “The quick brown fox”
-False

Among the expressions below which is a statement?


-True

Expressions can be long and complex.


-true

number++; is an expression
-true

For-loops has a set number of iterations before starting.


-True

The equals( ) method can compare more than 2 arrays.


-False

While loops can use Booleans at test expressions.


-True

Downloaded by Joseph Lapso ([email protected])


The test expression of the if statement is
-less than or equal to

There are four (4) major features of an object-oriented programming language – encapsulation, inheritance,
polymorphism and abstraction.
-True

Using a break; statement causes the loop to jump to the next iteration.

- is example of a statement.
x+1

-
number++; is a block

-
Arrays are

-Integers

The operator “new” allocates a memory block the size of what is declared.
-true

A class block can be an expression

-
Statements can be expressions.

-
Integer arrays can be populated with characters.

-
Declaration clauses are declared as “number + 1”.

-
Loops can be stopped with a break; statement.
-True

The equivalent of Paragraphs in coding is?


-Expressions

If statements cannot be nested in switches


-true

The length( ) method returns the size (number of indices) has.


-True

Downloaded by Joseph Lapso ([email protected])


When polymorphism is used, the Java object can only take one form. Subclasses should have the same function
with the parent class.
-False

Arrays can contain (Answer) number of elements.

-Any

“||” and “&&” can be used in conditional statements.


-True

A class statement has three (3) major parts – declaration, initialization and instantiation.
-False

Declaring an object in Java uses the new keyword to create a new object.
-False

Please refer to Figure 2 to answer the question below: If the expression “num = 0” is changed to “num = 5”
the final output will be

-5

Expressions can be statements.


-True

Blocks can contain more blocks of code.


-True

If-else statements can be nested in?


-All of the choices

Statements are equivalent to paragraphs.


-False

A (answer) array is an array containing true or false values.

-boolean

Switches are always used with if-else statements


-False

True or False: The modulus operator returns the remainder of a division operation instead of the quotient.
-true

Determine the output.


String val_1 = “564298”;

-5698

Determine the output.

Downloaded by Joseph Lapso ([email protected])


String val_1 = “35”;

-4

The return value of the length( ) method is an integer


-true

A superclass is also known as a parent class.


-true

For-loops can be nested in while loops.


-true

In instantiating an object, the keyword instance is used.


-False

Object oriented programming utilizes the top down method


-False

Expressions are like clauses.


-true

The sort( ) method is always ascending.


-true

Arrays are data types.


-False

Variables must be declared as (Answer) for it to be fully hidden.

-private

While statements check the test expression at the end.


-False

The else statement can be used alone.


-False

The fill( ) method (Answer) the array with specific values.

-Fills

The output of println is

-55555

The person’s weight is declared correctly with the correct data type (byte) and value (160).
-FALSE

Determine the output.

Downloaded by Joseph Lapso ([email protected])


String val_1 = “foo”
String val_2 = “bar”
val_2 = val_1; val_1
= val_3;

System.out.println(val_1);

-bar

Determine the output.


String val_1 = “foo”

String val_2 = “bar”


val_2 = val_1; val_1
= val_3;

System.out.println(val_2);

-foo

Switches can work properly even without the “break” expression.


-True

Blocks can be one liner or huge classes.


-True

The test expressions in conditional statements can be left empty.


-False

Abstraction works by hiding the implementation details and showing only the functions necessary.
-True

A single array can hold multiple data types


-False

A polymorphic object can pass more than one Is-a test.


-True

Another loop can be used as test expression.


-False

True or False: Public, static and void are sample of Java reserved keywords.
-True

The value of “pStr” in line 24 is

-True

Downloaded by Joseph Lapso ([email protected])


The default syntax of a constructor is <class_name>(parameter, parameter){ }
-False

A nested class is not an inner class.


-False

Nested classes causes them to become abstracted


-False

A nested class is also called

-inner class

If you want some variables and methods hidden from other classes, you could implement encapsulation where
these variables and methods are wrapped in a single unit.
-True

A constructor can only have 1-2 overloads or parameters.


-False

All possible data types of an array can be retuned as a string by the toString( ) method.
-True

Abstracted classes can contain 1 or more abstract methods.


-True

Abstraction shows the every bit of detail and implementation on how an application does something.
-False

Initialization is a process where the constructor is called for.


-True

The default syntax of a constructor is <class_name>( ){ }


-True

Classes cannot be nested.


-False

Abstract classes cannot have nested classes.


-False

The parent class of a nested class is called an outer class


-True

An inner class can be constructed directly without reference to the outer class.
-False

Arrays can be read backwards

Downloaded by Joseph Lapso ([email protected])


-True

A single array can hold

-One data type

Abstracted methods already have implementations inside.


-False

are special methods to initialize objects.

-constructors

Constructors have 3 basic rules to follow.


-False

Nesting classes increases encapsulation.


-True

Each index can only contain (Answer) element.

-one

The sort( ) method can be set to sort only a part of an array.


-False

Subclasses or child classes could have different behaviors but still share the same functions from their parent
class.
-True

Abstract methods must have an explicit return value


-False

An abstract class must not contain abstract methods.


-False

Abstracted classes can be nested.


-True

A subclass constructor cannot invoke a superclass constructor.


-False

A class acquiring fields and methods of another class is called inheritance.


-True

Parallelsorting utilizes

-More cpu processing cores

method can copy one array to another.

-arraycopy()

Downloaded by Joseph Lapso ([email protected])


The equivalent of clauses in coding is?
-Expressions
Int num = 1; for(num=num;num<=10;num++) is an acceptable code snippet.
-true
Loop that has a pre-determined number of iterations
-while
An int can be used even if it is declared outside a for-loop.
-true
Overload methods must be the same name as the class
-true
What the break statement in this example does is .
-Ends the whole instance of the loop
The random( ) method sorts the array randomly.
-False
The last part in a for loop setup can be an .
- both
The “1” in arrayName[1] is called an .
-Index
The continue; statement ends all the iterations of a loop.
- False
Which is not a proper increment?
- n+-;
Infine for-loops can be declared as for( ){ }.
- False
If-if is more logical than else-if.
- False
The else statement can be removed if not needed.
-True
Expressions, Statements and Blocks are like composing sentences and paragraphs.
-True
You can declare a new method in the subclass which is not declared in the superclass.
-True
The return value of the equals( ) method is .
-None of the choices
The Arrays.sort( ) method sorts an array into order.
-Ascending
This type of declaration is discouraged: “int myArray[ ]”
- True
An if-else-if-else statement is a block.
-True
If the increment num=num+2 is changed to num++, the final value of num will be
.
-5
The term of each pass through a loop makes is called?
-iteration
Loops must always have a continue or break statement.

Downloaded by Joseph Lapso ([email protected])


-False
1+2+3/4*5 is an unambiguous expression
-False
Conditional statements can contain more conditional statements.
- True
int num = 1;
if(num==1 && num<=1){
body;
}
The conditional statement will .
- execute the body
byte( ][ ][ ) myArray; is an example of .
- An error
An array hold objects.
- can
A reference variable can be reassigned to other objects provided that it is not declared
.
- final
The test expression of conditional statement cannot contain
-!
Each pass through of a loop is called a cycle.
- True
If the increment “num = num + 2” is changed to “num = num + 1” the final output will be
.
-0
Ifs and else-ifs test expressions return true or false.
- True
classes increase the encapsulation of you methods and data.
- nesting
Constructed methods are initialized with 0 or null depending on the data type.
- true
The else statement catches whatever argument the if and else-if didn’t
- True
An iteration of a loop is equivalent to one pass through.
- true
38. If we change the initial value of num in line 6 to “num = 0”, the println output will be

-0
The else-if statement can be used alone.
- false
Abstract methods need sub-classes to contain their implementations.
-true
The method arraycopy( ) does what?
- Copies the contents of an array to a destination array.
An array can be infinitely long.
- False

Downloaded by Joseph Lapso ([email protected])


A loop can contain no expressions or statements inside.
- true
Conditional statements are the same as declaration statements.
- False
You cannot use inherited methods directly in a child class.
- False
The equals( ) method compares 2 arrays.
- True
Method invocations are statements
- True
To implement encapsulation, you have to declare class variables with the private modifier.
- True
Inner class methods can be called by constructing the inner class.
- False
Encapsulated data are hidden from other classes.
- True
Procedural programming will be tricky for applications.
Answer: small
Strings can directly concatenated to an int.
Answer: False

1. Machine language and assembly language are collectively referred to as

Answer: LOW-LEVEL LANGUAGE


2. Observe the names of the following variables and routines and decide
whether its format is CORRECT or WRONG.
Employees for a table
name. Answer: WRONG

3. Machine language is also known as Answer language.


4. Kyoto protocol addresses environmental issues through the campaign of
.
Answer: reducing greenhouse gas emissions
5. Read the questions carefully and choose your answer from the
word pool provided.

Downloaded by Joseph Lapso ([email protected])


Mobile app XYZ, which is an RPG game, has been deployed and launched to
the public six (6) months ago. Some volunteers are testing XYZ in accordance
with the ISO/IEC 25010:2011. Read their feedback below and decide which
product quality attribute is being described.
“So far, XYZ has 2 updates and it is working smoothly. Some bugs were fixed
and there have been improvements – like additional characters and skills.”
Select one:
Answer: Maintainability
Micros
6. C# was released by Answer .

7. Lizzy printed her reports in all the major subjects. She forgot if she has already printed her English report.
What can she do to avoid printing it twice?

Answer: Right click on the printer and choose See what’s printing.

8. Refer to the image below to answer the following question. What process is illustrated in the
diagram?

Answer: Social media login limit.

9. Quality improvement process is conducted to avoid errors and faults from recurring in the future.
Answer: True

10. Refer to the image below and write only the letter of the correct answer in the space provided.

Downloaded by Joseph Lapso ([email protected])


I cannot type anything but my mouse is working, I am using a brand new USB keyboard, which port should I
check?

Answer: D

11. Observe the names of the following variables and routines and decide whether its format is
CORRECT or WRONG.
ComputeTotalScore() for a routine to sum up the scores

Answer: CORRECT
12. In adding a new printer, the will guide you on the steps to be taken.

ANSWER: PRINTER WIZARD

13. Big business companies are the only ones responsible for enforcing environmental policies since they can
afford alternative cleaner technology.

ANSWER: FALSE

14. Who is considered as a user (component of an operating system)?

ANSWER; ALL OF THE CHOICES

15. Categorize the following subcharacteristics of the ISO/IEC 25010:2011’s product quality model and
write the letter that corresponds to your answer.
Adaptability

ANSWER; PORTABILITY

16. One good practice is to use water filtration system instead of buying bottled water every time.

ANSWER; TRUE

17. is a type of programming language that is composed of symbols and words that follow
some rules similar to that of a natural language.

Downloaded by Joseph Lapso ([email protected])


ANSWER: High-Level Language

18. The following are statements that describe milestones in the programming language. I.
FORTRAN, the first modern computer language, was developed.
II. Java was released by Sun Microsystems
III. C was developed based on some of B’s features.
IV.Ada Lovelace invented the first computer program for analytical engine application. V.
COBOL was created by the US Department of Defense
Which of the following shows the correct order of events?

ANSWER: IV, I, V, III, II

19. The Kyoto protocol requires the participation of both industrialized and developing nations in
reducing environmental harm.

ANSWER: False

20. Categorize the following subcharacteristics of the ISO/IEC 25010:2011’s product quality model and
write the letter that corresponds to your answer.
Accessibility

ANSWER; USABILITY

21. The firstANALYTICAL


ANSWER; computer concept invented is called
ENGINE

22. Observe the names of the following variables and routines and decide whether its format is
CORRECT or WRONG.
Get_Average_Grade() for a routine to compute for average.

ANSWER: WRONG

23. Java is an example of

ANSWER: HIGH-LEVEL LANGUAGE

24. What type of flowchart symbol contains the text “Limit >=3?”?

ANSWER:DECISION

My brother gave me an external hard drive as a present. I wanted to save my movies and pictures in
it, where should
ANSWER: D it be connected?

26. Categorize the following subcharacteristics of the ISO/IEC 25010:2011’s product quality model and
write the letter that corresponds to your answer.
Installability

ANSWER: PORTABILITY

27. Java can only be used for business purposes like processing records and employees.

ANSWER:FALSE

Downloaded by Joseph Lapso ([email protected])


28. Observe the names of the following variables and routines and decide whether its format is
CORRECT or WRONG.
studentAge for a variable name.

ANSWER: CORRECT

“I29. ead
find the questions
it really enjoying tocarefully
play XYZ and
sincechoose your
I can invite myanswer fromsocial
friends from the word
mediapool provided.
profile. It works well
with this social media app!”
Mobile app XYZ, which is an RPG game, has been deployed and launched to the public six (6)
months ago.
ANSWER: Some volunteers are testing XYZ in accordance with the ISO/IEC 25010:2011. Read
COMPATIBILITY
their feedback below and decide which product quality attribute is being described.
30. ISO/IEC 25010:2011’s product quality model has eight (8) major characteristics.

ANSWER:TRUE

31. Categorize the following subcharacteristics of the ISO/IEC 25010:2011’s product quality model and
write the letter that corresponds to your answer.
Recoverability

ANSWER: RELIABILITY

32. Read the questions carefully and choose your answer from the word pool provided.

ANSWER:
Mobile appSECURITY
XYZ, which is an RPG game, has been deployed and launched to the public six (6)
months ago. Some volunteers are testing XYZ in accordance with the ISO/IEC 25010:2011. Read
33. Categorize
their feedback thebelow
following
and subcharacteristics of the quality
decide which product ISO/IECattribute
25010:2011’s product
is being quality model and
described.
write the letter that corresponds to your answer.
“The XYZ has in-app purchases or micro transactions and asks for my credit card details. It’s safe so far and
Capacity
didn’t have any issues with information leak.”
ANSWER: PERFORMANCE EFFICIENCY

34. Refer to the pseudocode below and answer the following question: What
is the first thing that the program will do?

ANSWER: ASK FOR HEIGHT

35. Montreal protocol protects the ozone layer by .

ANSWER: phasing out harmful substances

Downloaded by Joseph Lapso ([email protected])


36. Observe the names of the following variables and routines and decide whether its format is
CORRECT or WRONG.
passingSCORE for a constant variable.

ANSWER: WRONG

37. Refer to the image below to answer the following question. By


default, what is the value of limit?

ANSWER: 0

38. Categorize the following subcharacteristics of the ISO/IEC 25010:2011’s product quality model and
write the letter that corresponds to your answer.
Integrity

ANSWER: SECURITY
39. Seiri is making work easier by reducing unnecessary items to deal with.

ANSWER: TRUE

40. Even when you close all running application programs, there are still process running in the
background.

ANSWER: TRUE

41. Read
“XYZ is so the
cool!questions carefully
I tried to install and
it in my oldchoose your
computer and answer from
it still runs the word
smoothly. pool
Given that provided.
the computer’s
video card is a bit faulty.“
Mobile app XYZ, which is an RPG game, has been deployed and launched to the public six (6)
months ago.
ANSWER: Some volunteers are testing XYZ in accordance with the ISO/IEC 25010:2011. Read
Reliability
their feedback below and decide which product quality attribute is being described.
42. FORTRAN stands for .

ANSWER: FORmulaTRANslator

43. Monica accidentally unplugged the mouse PS/2 port. What will happen to the mouse connected thru the
universal serial bus port?

ANSWER: NONE OF THE CHOICES


44. Refer to the pseudocode below and answer the following question: What happens after weight is given?

Downloaded by Joseph Lapso ([email protected])


ANSWER: ASK FOR HEIGHT
45. Categorize the following subcharacteristics of the ISO/IEC 25010:2011’s product quality model and
write the letter that corresponds to your answer.
Learnability

ANSWER: USABILITY

46. Refer to the pseudocode below and answer the following question: If the calculated BMI results to 26,
what will the program do?

ANSWER: display Overweight


47. Axel is finally documenting his work. What could he be writing?

ANSWER: instructions for the users

48. Read
“One the questions
good thing carefully
I find with XYZ andmy
as when choose yourdown
laptop shuts answer from themy
accidentally, word
gamepool
scoreprovided.
and status can
still be recovered. No need to repeat a level.”
Mobile app XYZ, which is an RPG game, has been deployed and launched to the public six (6)
months ago.
ANSWER: Some volunteers are testing XYZ in accordance with the ISO/IEC 25010:2011. Read
Reliability
their feedback below and decide which product quality attribute is being described.
49.Battery level, Internet connection and date and time are usually located in the Notification Area.

ANSWER: TRUE
50.He is known as the father of the Java programming language.
ANSWER: JAMES GOSLING

Downloaded by Joseph Lapso ([email protected])


Flag question

Question text
Answer: accountable
Read the situation below as your basis for answering the following question:
Question text
True or False: Monitoring and evaluating means brainstorming.
Answer: False
Ricka is creating a student record system where the profile, educational attainment and
contact person of the students will be saved and restored. She is planning to implement it
during the second semester.
Identify whether the statement is a strength, weakness, opportunity or threat. Naughty students who might
try to hack the student record system and change the information saved.
Answer: threat

Question 2
Complete
Mark 1.00 out of 1.00

Flag question

Question text
Read the situation below as your basis for answering the following question:

Ricka is creating a student record system where the profile, educational attainment and
contact person of the students will be saved and restored. She is planning to implement it
during the second semester.
Identify whether Ricka’s role is accountable, responsible, consult or inform: Ricka should finish conducting
unit and system testing.

Downloaded by Joseph Lapso ([email protected])


Question 5
Complete
Mark 1.00 out of 1.00

Flag question

Question text
Question text
Axel is finally documenting his work. What could he be writing? Select
Machine language and assembly language are collectively referred to as
one: .
a. requirements of the program
Select one:
b. system analysis
c. bug
a. Average and
reviews levelerrors
language
d. instructions for the users
b. Low-level language
Question 6
c. Advanced language
Complete
Mark 1.00 out of 1.00
d. High-level language

Question 7
Question text
Complete
Mark 1.00 out of 1.00

Flag question

Flag question

Downloaded by Joseph Lapso ([email protected])


True or False: Nothing good ever comes from giving feedback. If anything, anyone who does give will
only get scolded by the boss.
Answer: False

Question 8
Complete
Mark 1.00 out of 1.00

Flag question
Question text
Analyze the diagram below to answer. Fill in the blanks with the correct answer or categorize the causes if they are considered pr

When the software used was checked, the project manager discovered that some of the programmers are using an old version of J

Answer. Materials

Question 9
Complete
Mark 1.00 out of 1.00

Downloaded by Joseph Lapso ([email protected])


Flag question
Question text
Read the situation below as your basis for answering the following question:

Ricka is creating a student record system where the profile, educational attainment and contact person of th
Identify whether Ricka’s role is accountable, responsible, consult or inform: Ricka should be told about the students who volunte

Answer: inform

Question 10
Complete
Mark 1.00 out of 1.00

Flag question

Question text
Machine language is also known as Binary language.

Question 11
Complete
Mark 1.00 out of 1.00

Flag question
Question text
The following can be used as a channel for conveying messages, EXCEPT: Select one:

email
social media

Downloaded by Joseph Lapso ([email protected])


c. hyperlinks
d. speaking

Question 12
Question text
Complete
Refer to the
Mark 1.00 outpseudocode
of 1.00 below and answer the following question: What
is the first thing that the program will do?
Select one:

a. ask for BMI


b. print height Flag question

c. ask for height


d. print BMI

Question 13
Question text
Complete
Mark 1.00 out of 1.00 in the workplace protection of sensitive business information through
precautionary measures like confidentiality clauses or non-disclosure agreements.
Select one:

a. Curiosity
b. Integrity Flag question

c. Secrecy
d. Confidentiality

Question 14
Complete
Mark 0.00 out of 1.00

Downloaded by Joseph Lapso ([email protected])


Flag question
Question text
Categorize the following subcharacteristics of the ISO/IEC 25010:2011’s product quality model and write the
letter that corresponds to your answer.
Capacity
Select one:

a. Security
b. Reliability
c. Compatibility
d. Functional Suitability
e. Maintainability
f. Portability
g. Usability
h. Performance Efficiency

Question 15
Complete
Mark 1.00 out of 1.00

Flag question

Question text
FORTRAN stands for . Formula Translator

Question 16
Complete
Mark 1.00 out of 1.00

Flag question

Question text
True or False: Documenting the decision is the last action needed to be taken to solve the problem.

Downloaded by Joseph Lapso ([email protected])


Answer: False

Question 17
Question text
Complete
InMark 1.00 out of 1.00 , the trainee’s learning is focused on utilizing existing abilities and
competencies, with the coach interacting with the trainee in a professional way.
Select one:

a. Coaching
b. Meeting Flag question

c. Problem Solving
d. Mentoring

Question 18
Complete
Mark 1.00 out of 1.00

Flag question
Question text
Determine whether the stated person / group is an internal or external stakeholder. Students

Answer: internal

Question 19
Complete
Mark 1.00 out of 1.00

Flag question

Question text
True or False: Organizational policies and procedures are used as a guide in decision making and help
employees understand the company’s goals and values.

Downloaded by Joseph Lapso ([email protected])


Answer: True

Question 20
Complete
Mark 1.00 out of 1.00

Flag question
Question text
Java can only be used for business purposes like processing records and employees. Select one:

True
False

Question 21
Complete
Mark 1.00 out of 1.00

Flag question
Question text
Battery level, Internet connection and date and time are usually located in the Notification Area. Select one:

True
False

Question 22
Complete
Mark 1.00 out of 1.00

Flag question
Question text
Actions that you need to take to reach the goals you set are called. Select one:

a. Standard

Downloaded by Joseph Lapso ([email protected])


Actions
Objectives
Process

Question 23
Question text
Complete
Categorize
Mark 1.00 outthe
of following
1.00 subcharacteristics of the ISO/IEC 25010:2011’s product quality model and write the
letter that corresponds to your answer.
Adaptability
Select one:

a. Usability
Flag question
b. Security
c. Compatibility
d. Reliability
e. Functional Suitability
f. Performance Efficiency
g. Maintainability
h. Portability

Question 24
Complete
Mark 1.00 out of 1.00

Flag question

Question text
True or False: To establish empathy means to interpret the message received. Answer: False

Question 25
Complete
Mark 1.00 out of 1.00

Downloaded by Joseph Lapso ([email protected])


Flag question
Question text
Analyze the diagram below to answer. Fill in the blanks with the correct answer or categorize the causes if they are considered pr

When the program was written, some team mates are talking too loud and distracted the others. This cause is categorized under:
Answer: Environment

Question 26
Complete
Mark 1.00 out of 1.00

Flag question

Question text
Identify whether the following task should be listed as a milestone or be included in the Gantt chart. Create
the project charter for the student record system.
Answer: Gantt chart

Downloaded by Joseph Lapso ([email protected])


Question 27
Complete
Mark 1.00 out of 1.00

Flag question
Question text
Refer to the image below to answer the following question. By
default, what is the value of limit?
Select one:

a. 0
b. 2
c. 1
d. 3

Question 28
Question
Complete text
Mark 1.00 out of 1.00

Flag question
Question text
Observe the names of the following variables and routines and decide whether its format is CORRECT or WRONG.
Get_Average_Grade() for a routine to compute for average.
Select one:

Correct
Wrong

Question 29
Complete
Mark 1.00 out of 1.00

Flag question

Downloaded by Joseph Lapso ([email protected])


In adding a new printer, the will guide you on the steps to be taken.
Select one:

a. Printer Guide
b. Printer Affix
c. Printer Install
d. Printer Wizard

Question 30
Question
Complete text
Mark 1.00 out of 1.00

Flag question

Question text
True or False: Gantt chart is one of the tools used in identifying workloads. It states who is responsible or
accountable for one task or activity.
Answer: False

Question 31
Complete
Mark 1.00 out of 1.00

Flag question

Downloaded by Joseph Lapso ([email protected])


Refer to the image below and write only the letter of the correct answer in the space provided.

My brother gave me an external hard drive as a present. I wanted to save my movies and pictures in it, where
should it be connected?
Answer: D

Question 32
Complete
Mark 1.00 out of 1.00

Flag question

Downloaded by Joseph Lapso ([email protected])


Question text
Identify whether the following task should be listed as a milestone or be included in the Gantt chart. Fix bugs
and errors detected in the system.
Answer: Gantt chart

Question 33
Question text
Complete
InMark
the1.00
correct
out oforder,
1.00 the essential parts of the communication process are: Select one:

a. Source, Message, Encoding, Channel, Decoding, Receiver, Feedback


b. Source, Message, Encoding, Channel, Receiver, Decoding, Feedback
Flag question
c. Source, Message, Encoding, Channel, Decoding, Feedback, Receiver
d. Source, Message, Encoding, Receiver, Decoding, Channel, Feedback

Question 34
Question
Complete text
Mark 1.00 out of 1.00

Flag question
Question text
Determine whether the stated person / group is an internal or external stakeholder. Programmers

Answer: internal

Question 35
Complete
Mark 1.00 out of 1.00

Flag question

Downloaded by Joseph Lapso ([email protected])


True or False: To solve a problem means to know first what the problem is before coming up with the
feasible solutions.
Answer: True

Question 36
Question
Complete text
Mark 1.00 out of 1.00
Categorize the following subcharacteristics of the ISO/IEC 25010:2011’s product quality model and write the
letter that corresponds to your answer.
Learnability
Select one:

a. Portability Flag question

Question
b. Security text
True
c. or False: Listing down the issues related to the problem is second to the last step in an effective
Maintainability
problem solving process.
d. Functional Suitability
Answer: False
e. Usability
Question 37
f.Complete
Compatibility
Mark 1.00 out of 1.00
g. Performance Efficiency
h. Reliability

Question 38
Complete
Mark 1.00 out of 1.00Flag question

Downloaded by Joseph Lapso ([email protected])


Flag
Question text
Monica accidentally unplugged the mouse PS/2 port. What will happen to the mouse connected thru the
universal serial bus port?
Select one:

a. The mouse will stop working.


b. None of the choices.
c. The mouse will freeze.
d. All of the choices
e. The mouse will be disabled.

Question 39
Complete
Mark 1.00 out of 1.00

Flag question

Question text
Read the situation below as your basis for answering the following question:

Ricka is creating a student record system where the profile, educational attainment and
contact person of the students will be saved and restored. She is planning to implement it
during the second semester.
Identify whether the statement is a strength, weakness, opportunity or threat. The student record system is
dependent on the Internet and will not function without Internet connection.
Answer: weakness

Question 40
Complete
Mark 1.00 out of 1.00

Downloaded by Joseph Lapso ([email protected])


Flag
Question text
Decide whether it is a communication instrument or purpose.
A Gantt chart that shows the schedule for the development process of the student record system.

Answer: instrument

Question 41
Question text
Complete
AMark
product or ofservice
1.00 out 1.00 must go through this phase to ensure that it is fit to use and that its quality matches with
the company’s standards.
Select one:

a. Performance Appraisal
b. Quality ControlFlag question
c. Safety Programs
d. Reflective Behavior

Downloaded by Joseph Lapso ([email protected])


Question 42
Complete
Mark 1.00 out of 1.00

Flag question
Question text
Observe the names of the following variables and routines and decide whether its format is CORRECT or WRONG.
ComputeTotalScore() for a routine to sum up the scores.
Select one:

Wrong
Correct

Question 43
Complete
Mark 1.00 out of 1.00

Flag question

Question text
Identify whether the following task should be listed as a milestone or be included in the Gantt chart. The
record system has undergone the function testing successfully.
Answer: milestone

Question 44
Complete
Mark 1.00 out of 1.00

Flag question

Question text
True or False: Stakeholders are people or group who are directly or indirectly affected by a company’s
decision, policies and objectives.
Answer: True

Question 45
Complete

Downloaded by Joseph Lapso ([email protected])


Mark 1.00 out of 1.00

Flag question

Question text
True or False: Distributing the information to the involved staff and/or department is the last step in the
planning process.
Answer: True

Question 46
Complete
Mark 1.00 out of 1.00

Flag question
Question text
Determine whether the stated person / group is an internal or external stakeholder. Programmers’ Adviser

Answer: internal

Question 47
Complete
Mark 1.00 out of 1.00

Flag question

Question text
True or False: Feedback is not needed in communication.
Answer: False

Question 48
Complete
Mark 1.00 out of 1.00

Flag question

Downloaded by Joseph Lapso ([email protected])


Question text
The first computer concept invented is called .
Select one:

a. COBOL
b. Analytical Engine
c. FORTRAN
d. PlanKalKul

Question 49
Question text
Complete
Read theoutquestions
Mark 1.00 of 1.00 carefully and choose your answer from the word pool provided.
Mobile app XYZ, which is an RPG game, has been deployed and launched to the public six (6)
months ago. Some volunteers are testing XYZ in accordance with the ISO/IEC 25010:2011. Read
their feedback below and decide which product quality attribute is being described.
“The XYZ has in-app purchases or micro transactions and asks for my credit card details. It’s safe so far and
didn’t have any issues with information leak.”
Flag question
Select one:

a. Portability
b. Performance Efficiency
c. Compatibility
d. Security
e. Maintainability
f. Reliability
g. Usability
h. Functional Stability

Question 50
Complete
Mark 0.00 out of 1.00

Downloaded by Joseph Lapso ([email protected])


Flag question
Question text
Categorize the following subcharacteristics of the ISO/IEC 25010:2011’s product quality model and write the
letter that corresponds to your answer.
Integrity
Select one:

a. Compatibility
b. Maintainability
c. Usability
d. Functional Suitability
e. Reliability
f. Performance Efficiency
g. Security
h. Portability

PROG-113A / ► Week 20: Second Quarter Exam / ► Second Quarter Exam (50/50) (PS: Pabago bago ang
questions, pero same lang sa ibang short quizes or learning activity yung questions and sagot)<3 :)

Which of the following does NOT describes SELECT Statement in a PL/SQL.


Answer: Queries must return only one column.
You want to display all the records of employee the same with the salary employee number 103. Answer:
SELECT * FROM employees WHERE salary = (SELECT salary from employees where employee_id=
103)
Which of the following stored procedure to create a procedure to that will be used to display the
employee id and salary of Steven King?
Answer: CREATE OR REPLACE PROCEDURE query_emp
(p_last_name IN employees.last_name%TYPE, p_first_name IN
employees.first_name%TYPE, p_employee_id OUT
employees.employee_id%TYPE, p_salary OUT employees.salary
%TYPE) IS
BEGIN
SELECT employee_id, salary INTO p_employee_id, p_salary
FROM employees
WHERE last_name = p_last_name AND first_name = p_first_name; END
query_emp;
Which of the folllowing is TRUE?
Answer: SQL code are embedded within PL/SQL statements
When an exception is user defined, the exception is raised .
Answer: Explicitly

Downloaded by Joseph Lapso ([email protected])


Which of the folllowing is TRUE?
Answer: SQL code are embedded withing PL/SQL statements Weak
REF CURSOR is very flexible.
Answer: True
How do you test the output of a PL/SQL block?
Answer: Use a predefined Oracle package and its procedure
Restrictive, specifies a RETURN type, associates only with type-compatible queries are description of a .
Answer: Strong REF CURSOR
Which of the following DOES NOT describes an exception?
Answer: Exception is a PL/SQL error that is raised before program execution.
These are local variables declared in the parameter list of a subprogram specification. Answer:
Formal parameter
Which of the following rules is INCORRECT about cursor variables?
Answer: None of the choices.
When an exception is predefined by Oracle server, the exception is raised .
Answer: Explicitly
Which of the following DOES NOT describes an exception?
Answer: Exception is a PL/SQL error that is raised before program execution. Evaluate
the following PL/SQL.
CREATE OR REPLACE PROCEDURE query_employee
(p_id IN employees.employee_id%TYPE,
p_name OUT employees.last_name%TYPE,
p_salary OUT employees.salary%TYPE) IS
BEGIN SELECT last_name, salary INTO p_name, p_salary
FROM employeesWHERE employee_id = p_id;
END query_employee
Answer: No error
You want to know the total number of employees whose firstname starts with letter D. Which
of the folllowing PLS/SQL executes successfully?
Answer: DECLARE
v_first_name employees.first_name%TYPE := 'D%'; BEGIN
SELECT COUNT(*) INTO v_first_name FROM employees WHERE first_name LIKE v_first_name;
DBMS_OUTPUT.PUT_LINE(v_first_name);
END;
What is the error trapping function that returns the numeric value of the error code? Answer:
SQLCODE
You want to display the name, salary and tax of employee #150. Which of the PL/SQL will execute
successfully? Note tax is computed as 2% of the salary.
Answer: DECLARE
v_first_name VARCHAR2(50);
v_last_name VARCHAR2(50);
v_salary INTEGER(20);
v_tax INTEGER(10);
BEGIN
SELECT first_name, last_name, salary, salary * 0.02 INTO v_first_name, v_last_name, v_salary, v_tax
FROM employees WHERE employee_id = 150;
DBMS_OUTPUT.PUT_LINE('Firstname : '|| v_first_name);
DBMS_OUTPUT.PUT_LINE('Lastname : '|| v_last_name);
DBMS_OUTPUT.PUT_LINE('Salary : '|| v_salary);
DBMS_OUTPUT.PUT_LINE('Tax : '|| v_tax);
END;

Downloaded by Joseph Lapso ([email protected])


Which of the following is the syntax to close a cursor?
Answer: CLOSE cursor_variable_name;
Which of the following rules is INCORRECT about cursor variables?
Answer: None of the choices.
What are the three PL/SQL block types?
Answer: Anonymous, Procedure, Function
You can trap any error by including a corresponding handler within the exception-handling section of the
PL/SQL block.
Answer: True
Which of the following describes weak REF CURSOR?
Answer: Associates with any query
Given the answer in item , which of the folllowing stored procedure will display the
employee id and salary of Steven King?
Answer: DECLARE
v_employee_id employees.employee_id%TYPE;
v_emp_sal employees.salary%TYPE;
BEGIN
query_emp('King', 'Steven', v_employee_id, v_emp_sal); DBMS_OUTPUT.PUT_LINE('Employee ID
' || v_employee_id ||' earns '|| to_char(v_emp_sal, '$999,999.00'));
END;
You have been tasked to update the database by creating a PL/SQL to increase the salary of all IT Programmer
employees by 50% of their existing salary.
Which of the following will execute successfully?
Answer: DECLARE
v_job_id employees.job_id%TYPE := 'IT_PROG';
BEGIN
UPDATE employees SET salary = salary *0.50 WHERE job_id = v_job_id;
END;
Which of the folllowing is required in a subquery?
Answer: SELECT
What is the exception name when PL/SQL has an internal problem
Answer: PROGRAM_ERROR
In the DECLARE section of the PL/SQL block,
Answer: All of the choices
Actions are being performed when error occurs during PL/SQL execution in the Answer:
EXCEPTION
What is the exception name when PL/SQL has an internal problem
Answer: PROGRAM_ERROR
Which of the folllowing statement describes PL/SQL?
Answer: PL/SQL is an Oracle proprietary, procedural, 3GL programming language Evaluate
the following PL/SQL.
DECLARE
v_employee_id employees.employee_id%TYPE := 114;
BEGIN
DELETE employees WHERE employee_id = v_employee_id;
END;
Answer: The PL/SQL will delete employee number 114.
Which of the following command is used to create a stand-alone procedure that is stored in the Oracle
database?
Answer: CREATE PROCEDURE
Evaluate the following PL/SQL.
DECLARE

Downloaded by Joseph Lapso ([email protected])


v_email VARCHAR(20);
BEGIN
SELECT email INTO v_email FROM EMPLOYEES WHERE email like 'D%';
DBMS_OUTPUT.PUT_LINE ('Employees whose email address starts with letter D :'
|| v_email);
EXCEPTION
WHEN TOO_MANY_ROWS THEN
DBMS_OUTPUT.PUT_LINE (' Your select statement retrieved multiple rows.'); END;
Answer: The PL/SQL block will run successfully.
Which of the following is the syntax to define a REF CURSOR type?
Answer: TYPE ref_type_name IS REF CURSOR
[RETURN return_type];
The PL/SQL code block helps modularize code by using:
Answer: All of the choices
Which of the following is the syntax to fetch from a cursor variable? Answer:
FETCH cursor_variable_name INTO variable_name1 [,variable_name2,. . .] |
record_name;
You want to display all records in the database whose salary is above the salary of Alexander Hunold.
Answer: SELECT * from employees WHERE salary < (SELECT salary FROM employees WHERE first_name
= 'Alexander' AND last_name = 'Hunold')
Procedure can be stored in the database as a schema object.
Answer: True
In PL/SQL Block Structure, which of the following are mandatory? Answer:
BEGIN and END
PL/SQL stands for
Answer: Procedural Language extension to SQL
Which of the following is CORRECT about sub-queries?
Answer: Subquery execute before the main query executes.
Which of the following does NOT describes SELECT Statement in a PL/SQL. Answer:
Queries must return only one column.
PL/SQL Provides a block structure for executable units of .
Answer: Code
Evaluate the SQL command
SELECT employee_id, salary from employees where salary = ANY (SELECT salary FROM employees
WHERE job_id = 'IT_PROG') AND job_id = 'ST_CLERK'
Answer: This has no error.
Which of the following PL/SQL will execute successfully?
Answer: DECLARE
v_salary INTEGER(20);
BEGIN
SELECT salary INTO v_salary FROM employees WHERE employee_id = 150; END;
In PL/SQL Block Structure, which of the following are OPTIONAL?
Answer: None of the choices
Evaluate the following PL/SQL. At what line number is the error of the PL/SQL? DECLARE
v_deptno NUMBER := 800;
e_invalid EXCEPTION;
BEGIN
DELETE FROM departments WHERE
department_id = v_deptno;

Downloaded by Joseph Lapso ([email protected])


IF SQL % NOT_FOUND THEN
RAISE e_invalid;
END IF;
COMMIT;
EXCEPTION
WHEN e_invalid THEN DBMS_OUTPUT.PUT_LINE('No
such department id.'); END;
Answer: 7
What is the error trapping function that returns the numeric value of the error code? Answer:
SQLCODE
Fetch into a record when fetching from a cursor.
Answer: True

PROG-113A / ► Week 18: Designing PL/SQL / ► Short Quiz 14


Which of the following is the syntax to open a cursor varial
Answer: OPEN cursor_variable_name
FOR select_statement;
Which of the following is the syntax to define a REF CURSOR type?
Answer: TYPE ref_type_name IS REF
CURSOR [RETURN return_type];
Weak REF CURSOR is very
flexible. Answer: True
Evaluate the following. What will be the
output? DECLARE
SUBTYPE Accumulator IS NUMBER
(4,2); v_amount accumulator;
v_num1 NUMBER;
v_num2 NUMBER;
v_num3 NUMBER;
BEGIN
v_amount := 10.50;
v_num1 := 1;
v_num2 := 2;
v_num3 := 3;
v_num1 := v_amount;
v_num2 := v_num1 + v_amount;
v_num2 := v_num2 - v_num3;
dbms_output.put_line('Total is: ' ||
v_num2); END;
Answer: 18
Which of the following is the syntax to fetch from a cursor variable?
Answer: FETCH cursor_variable_name INTO variable_name1
[,variable_name2,. . .] | record_name;
Fetch into a record when fetching from a
cursor. Answer: True
Which of the following is the syntax to close a cursor?
Answer: CLOSE cursor_variable_name;

Downloaded by Joseph Lapso ([email protected])


This is a subset of an existing data type that may place a constraint on its base type.
Answer: Subtype
Which of the following rules is INCORRECT about cursor
variables? Answer: None of the choices.
Use column aliases in cursors for calculated columns fetched into records declared with %COLUMNTYPE.
Answer: False

PROG-113A / ► Week 18: Designing PL/SQL / ► Learning Activity 14

Which of the following rules is INCORRECT about cursor variables?


Answer: None of the choices.
Which of the following describes weak REF CURSOR?
Answer: Associates with any query
Restrictive, specifies a RETURN type, associates only with type-compatible queries
are description of a .
Answer: Strong REF CURSOR
Which of the following is INCORRECT about the guidelines for cursor design?
Answer: Use column aliases in cursors for calculated columns fetched into records declared with
%COLUMNTYPE.
This is a subset of an existing data type that may place a constraint on its base type.
Answer: Subtype

PROG-113A / ► Week 17: / ► Short Quiz


13 Evaluate the following PL/SQL.
CREATE OR REPLACE PROCEDURE
query_employee (p_id IN employees.employee_id
%TYPE,
p_name OUT employees.last_name%TYPE,
p_salary OUT employees.salary%TYPE) IS
BEGIN SELECT last_name, salary INTO p_name,
p_salary FROM employeesWHERE employee_id = p_id;
END query_employee
Answer: No error
Evaluate the following PL/SQL. Which of the following will line creates an error?
CREATE OR REPLACE PROCEDURE
query_emp (
p_department_id IN employees.department_id%TYPE,
p_name OUT employees.last_name%TYPE,
p_salary OUT employees.salary%TYPE
)
IS
BEGIN
SELECT last_name, salary, department_id INTO p_name, p_salary,
p_department_id FROM employees
WHERE salary >= p_salary AND department_id = p_department_id
; END query_emp;

Downloaded by Joseph Lapso ([email protected])


Answer: Line 3
These are local variables declared in the parameter list of a subprogram specification.
Answer: Formal parameter
Given the answer in item , which of the folllowing stored procedure will display
the employee id and salary of Steven King?
Answer: DECLARE
v_employee_id employees.employee_id%TYPE;
v_emp_sal employees.salary%TYPE;
BEGIN
query_emp('King', 'Steven', v_employee_id, v_emp_sal);
DBMS_OUTPUT.PUT_LINE('Employee ID ' || v_employee_id ||' earns '|| to_char(v_emp_sal,
'$999,999.00'));
END;

Which of the following stored procedure to create a procedure to that will be used to display the
employee id and salary of Steven King?
Answer: CREATE OR REPLACE PROCEDURE
query_emp (p_last_name IN employees.last_name%TYPE,
p_first_name IN employees.first_name%TYPE,
p_employee_id OUT employees.employee_id%TYPE,
p_salary OUT employees.salary%TYPE) IS
BEGIN
SELECT employee_id, salary INTO p_employee_id,
p_salary FROM employees
WHERE last_name = p_last_name AND first_name =
p_first_name; END query_emp;
What is the default parameter mode when no mode is specified?
Answer: IN

PROG-113A / ► Week 16: Creating Procedures / ► Learning Activity 13


Procedure can be stored in the database as a schema object.
Answer: True
The PL/SQL code block helps modularize code by using:
Answer: All of the choices
Which of the following command is used to create a stand-alone procedure that is stored in the Oracle
database?
Answer: CREATE PROCEDURE
Which of the folllowing does NOT describes subprogram?
i. Compiled only once
ii. Stored in the database
iii. Do not return values
iv. Can take parameters
v. Unnamed PL/SQL
blocks Answer: iii & v
Which if the following is NOT a benefits of using modular program constructs?
Answer: None of the choices

Downloaded by Joseph Lapso ([email protected])


PROG-113A / ► Week 18: Designing PL/SQL / ► Short Quiz 14
Which of the following is the syntax to open a cursor varial
Answer: OPEN cursor_variable_name
FOR select_statement;
Which of the following is the syntax to define a REF CURSOR type?
Answer: TYPE ref_type_name IS REF
CURSOR [RETURN return_type];
Weak REF CURSOR is very
flexible. Answer: True
Evaluate the following. What will be the
output? DECLARE
SUBTYPE Accumulator IS NUMBER
(4,2); v_amount accumulator;
v_num1 NUMBER;
v_num2 NUMBER;
v_num3 NUMBER;
BEGIN
v_amount := 10.50;
v_num1 := 1;
v_num2 := 2;
v_num3 := 3;
v_num1 := v_amount;
v_num2 := v_num1 + v_amount;
v_num2 := v_num2 - v_num3;
dbms_output.put_line('Total is: ' ||
v_num2); END;
Answer: 18
Which of the following is the syntax to fetch from a cursor variable?
Answer: FETCH cursor_variable_name INTO variable_name1
[,variable_name2,. . .] | record_name;
Fetch into a record when fetching from a
cursor. Answer: True
Which of the following is the syntax to close a cursor?
Answer: CLOSE cursor_variable_name;
This is a subset of an existing data type that may place a constraint on its base type.
Answer: Subtype
Which of the following rules is INCORRECT about cursor variables?
Answer: None of the choices.
Use column aliases in cursors for calculated columns fetched into records declared with %COLUMNTYPE.
Answer: False

PROG-113A / ► Week 18: Designing PL/SQL / ► Learning Activity 14

Downloaded by Joseph Lapso ([email protected])


Which of the following rules is INCORRECT about cursor variables?
Answer: None of the choices.
Which of the following describes weak REF CURSOR?
Answer: Associates with any query
Restrictive, specifies a RETURN type, associates only with type-compatible queries
are description of a .
Answer: Strong REF CURSOR
Which of the following is INCORRECT about the guidelines for cursor design?
Answer: Use column aliases in cursors for calculated columns fetched into records declared with
%COLUMNTYPE.
This is a subset of an existing data type that may place a constraint on its base type.
Answer: Subtype

PROG-113A / ► Week 15: Long Quiz / ► Long Quiz 3


(30/30) (Correction)
How do you test the output of a PL/SQL block?
Answer: Use a predefined Oracle package and its procedure
Which of the folllowing statement describes PL/SQL?
Answer: PL/SQL is an Oracle proprietary, procedural, 3GL programming
language Which of the following syntax to declare EXCEPTION named
e_invalid_id?
Answer: e_invalid_id EXCEPTION;
In PL/SQL Block Structure, which of the following are
mandatory? Answer: BEGIN and END
This is a type of cursor which is created and managed internally by the Oracle server to process
SQL statements
Answer: Implicit
PL/SQL stands for
Answer: Procedural Language extension to SQL
Which of the following PL/SQL will execute successfully?
Answer: DECLARE
v_salary INTEGER(20);
BEGIN
SELECT salary INTO v_salary FROM employees WHERE employee_id = 150;
END;
What is the last clause in trapping exceptions?
Answer: WHEN OTHERS
PL/SQL Provides a block structure for executable units of .
Answer: Code
Evaluate the following PL/SQL.
DECLARE
v_email VARCHAR(20);
BEGIN
SELECT email INTO v_email FROM EMPLOYEES WHERE email like 'D%';
DBMS_OUTPUT.PUT_LINE ('Employees whose email address starts with letter D :'
|| v_email);
EXCEPTION

Downloaded by Joseph Lapso ([email protected])


WHEN TOO_MANY_ROWS THEN
DBMS_OUTPUT.PUT_LINE (' Your select statement retrieved multiple rows.');
END;
Answer: The PL/SQL block will run
successfully. Which of the folllowing is TRUE?
Answer: SQL code are embedded within PL/SQL statements
You can trap any error by including a corresponding handler within the exception-handling
section of the PL/SQL block.
Answer: True
When an exception is user defined, the exception is raised .
Answer: Explicitly
Evaluate the PL/SQL
DECLARE
v_first_name VARCHAR2(50);
v_last_name VARCHAR2(50);
v_salary INTEGER(20);
BEGIN
SELECT first_name, last_name, salary INTO v_first_name, v_last_name, v_salary FROM
employees WHERE department_id = 60;
DBMS_OUTPUT.PUT_LINE('Firstname : '||
v_first_name); DBMS_OUTPUT.PUT_LINE('Lastname : '||
v_last_name); DBMS_OUTPUT.PUT_LINE('Salary : '||
v_salary);
END;
Answer: Error in Line 6.
Evaluate the following PL/SQL.
DECLARE
v_employee_id employees.employee_id%TYPE :=
114; BEGIN
DELETE employees WHERE employee_id =
v_employee_id; END;
Answer: The PL/SQL will delete employee number 114.
Which of the following does NOT describes SELECT Statement in a PL/SQL.
Answer: Queries must return only one column.
What are the three PL/SQL block types?
Answer: Anonymous, Procedure,
Function
What is the exception name when PL/SQL has an internal
problem Answer: PROGRAM_ERROR
You have been tasked to update the database by creating a PL/SQL to increase the salary of all IT
Programmer employees by 100% of their existing salary. Which of the following will execute
successfully?
Answer: DECLARE
v_job_id employees.job_id%TYPE := 'IT_PROG';
BEGIN
UPDATE employees SET salary = salary * 2 WHERE job_id =
v_job_id; END;
What is the error trapping function that returns the numeric value of the error code?

Downloaded by Joseph Lapso ([email protected])


Answer: SQLCODE
What is the exception name when single row SELECT returned no
data. Answer: NO_DATA_FOUND
Which of the following DOES NOT describes an exception?
Answer: Exception is a PL/SQL error that is raised before program execution.
Evaluate the following PL/SQL.
DECLARE
v_employee_id employees.employee_id%TYPE :=
114; BEGIN
DELETE employees WHERE employee_id =
v_employee_id; END;
Answer: The PL/SQL will delete employee number
114. In the DECLARE section of the PL/SQL block,
Answer: All of the choices
When an exception is predefined by Oracle server, the exception is raised .
Answer: Explicitly
Which of the will display the Employee ID and number of years in service with employee ID
150?
Answer: DECLARE
v_salaryemployees.salary%TYPE := 10000;
v_employee_idemployees.employee_id%TYPE := 150;
v_years INTEGER(10);
BEGIN
SELECT employee_id, ROUND((SYSDATE - hire_date) /365,0) INTO v_employee_id,
v_years FROM employees WHERE employee_id = v_employee_id ;
DBMS_OUTPUT.PUT_LINE('Employee ID:' || v_employee_id);
DBMS_OUTPUT.PUT_LINE('Number of years : ' || v_years);
END;
Actions are being performed when error occurs during PL/SQL execution in
the Answer: EXCEPTION
You can use this procedure to issue user-defined error messages from stored subprograms.
Answer: RAISE_APPLICATION_ERROR

PROG-113A / ► Week 14: Handling Exceptions / ► Short Quiz

12 Evaluate the following PL/SQL.


DECLARE
v_email VARCHAR(20);
BEGIN
SELECT email INTO v_email FROM EMPLOYEES WHERE email like 'D%';
DBMS_OUTPUT.PUT_LINE ('Employees whose email address starts with letter D :'
|| v_email);
EXCEPTION
WHEN TOO_MANY_ROWS THEN

Downloaded by Joseph Lapso ([email protected])


DBMS_OUTPUT.PUT_LINE (' Your select statement retrieved multiple rows.');
END;
Answer: The PL/SQL block will run successfully.
Which of the following DOES NOT describes an exception?
Answer: Exception is a PL/SQL error that is raised before program execution.
What is the exception name when single row SELECT returned no data.
Answer: NO_DATA_FOUND
RAISE_APPLICATION_ERROR is used in two different places. These are
.
Answer: Executable and exceptions section
What is the error trapping function that returns the numeric value of the error code?
Answer: SQLCODE
What is the exception name when PL/SQL has an internal
problem Answer: PROGRAM_ERROR
Evaluate the following PL/SQL. At what line number is the error of the
PL/SQL? DECLARE
v_deptno NUMBER := 800;
e_invalid EXCEPTION;
BEGIN
DELETE FROM departments
WHERE department_id = v_deptno;
IF SQL % NOT_FOUND THEN
RAISE e_invalid;
END IF;
COMMIT;
EXCEPTION
WHEN e_invalid THEN
DBMS_OUTPUT.PUT_LINE('No such department
id.'); END;
Answer: 7
What is the last clause in trapping exceptions?
Answer: WHEN OTHERS
Complete the diagram in Trapping Non-Predefined Oracle Server
Errors. Answer: Declare, Associate, Reference

PROG-113A / ► Week 14: Handling Exceptions / ► Learning Activity 12

You can use this procedure to issue user-defined error messages from stored subprograms.
Answer: RAISE_APPLICATION_ERROR
Which of the following syntax to declare EXCEPTION named
e_invalid_id? Answer: e_invalid_id EXCEPTION;
When an exception is predefined by Oracle server, the exception is raised .
Answer: Explicitly
When an exception is user defined, the exception is raised .
Answer: Explicitly
You can trap any error by including a corresponding handler within the exception-handling

Downloaded by Joseph Lapso ([email protected])


section of the PL/SQL
block. Answer: True

PROG-113A / ► Week 13: Interacting with Oracle Server / ► Learning Activity 11

Which of the following does NOT describes SELECT Statement in a PL/SQL.


Answer: Queries must return only one column.
Evaluate the following PL/SQL.
1 DECLARE

2 v_employee_id employees.employee_id%TYPE := 114;

3 BEGIN

4 DELETE employees WHERE employee_id =

v_employee_id; 5 END;
Answer: The PL/SQL will delete employee number 114.
Which of the following PL/SQL that will display the total number employees whose salary is
10000 and above?
Answer: DECLARE
v_salary employees.salary%TYPE := 10000;
BEGIN
SELECT COUNT(*) INTO v_salary FROM employees WHERE salary >= v_salary;
DBMS_OUTPUT.PUT_LINE(v_salary);
END;
This is a type of cursor which is created and managed internally by the Oracle server to process
SQL statements
Answer: Implicit
You have been tasked to update the database by creating a PL/SQL to increase the salary of all IT
Programmer employees by twice of their existing salary. Which of the following will execute
successfully?
Answer: DECLARE
v_job_id employees.job_id%TYPE := 'IT_PROG';
BEGIN
UPDATE employees SET salary = salary * 2 WHERE job_id =
v_job_id; END;

PROG-113A / ► Week 12: Introduction to PLSQL / ► Short Quiz

10 Which of the folllowing is TRUE?


Answer: SQL code are embedded withing PL/SQL
statements In the DECLARE section of the PL/SQL block
Answer: All of the choices
In PL/SQL Block Structure, which of the following are
OPTIONAL? Answer: None of the choices

Downloaded by Joseph Lapso ([email protected])


What are the three PL/SQL block types?
Answer: Anonymous, Procedure, Function
How do you test the output of a PL/SQL
block?
Answer: Use a predefined Oracle package and its procedure
You want to display the name, salary and tax of employee #150. Which of the PL/SQL will
execute successfully? Note tax is computed as 2% of the salary.
Answer: DECLARE
v_first_name VARCHAR2(50);
v_last_name VARCHAR2(50);
v_salary INTEGER(20);
v_tax INTEGER(10);
BEGIN
SELECT first_name, last_name, salary, salary * 0.02 INTO v_first_name, v_last_name, v_salary,
v_tax FROM employees WHERE employee_id = 150;
DBMS_OUTPUT.PUT_LINE('Firstname : '||
v_first_name); DBMS_OUTPUT.PUT_LINE('Lastname : '||
v_last_name); DBMS_OUTPUT.PUT_LINE('Salary : '||
v_salary); DBMS_OUTPUT.PUT_LINE('Tax : '|| v_tax);
END;
Which of the folllowing statement describes PL/SQL?
Answer: PL/SQL is an Oracle proprietary, procedural, 3GL programming language

PROG-113A / ► Week 12: Introduction to PLSQL / ► Learning Activity 10


PL/SQL stands for
Answer: Procedural Language extension to SQL
PL/SQL Provides a block structure for executable units of .
Answer: Code
In PL/SQL Block Structure, which of the following are mandatory?
Answer: BEGIN and END
Which of the following PL/SQL will execute successfully?
Answer: DECLARE
v_salary INTEGER(20);
BEGIN
SELECT salary INTO v_salary FROM employees WHERE employee_id = 150;
END;
Actions are being performed when error occurs during PL/SQL execution in the
Answer: EXCEPTION

PROG-113A / ► Week 11: Using Subqueries to Solve Queries / ► Short Quiz 9

You want to display the department name the same with the location of the
Purchasing department.
Answer: SELECT department_name from departments where location_id = (SELECT
location_id from departments where department_name = 'Purchasing')

Downloaded by Joseph Lapso ([email protected])


Evaluate the SQL command
SELECT employee_id, job_id, salary from employees where salary < ALL (SELECT salary
FROM employees WHERE job_id = 'FI_ACCOUNT') AND job_id = 'IT_PROG'
Answer: This has no error.

You want to display all records in the database whose salary is above the salary of Alexander
Hunold.
Answer: SELECT * from employees WHERE salary < (SELECT salary FROM employees
WHERE first_name = 'Alexander' AND last_name = 'Hunold')

Evaluate the SQL command


SELECT employee_id, last_name, first_name, job_id FROM employees WHERE department_id
= (SELECT max(department_id) FROM employees GROUP BY department_id)
Answer: This will return an error. Single-row subquery returns more than one
row.

You want to display all employee id, name, hired date and salary who are hired after employee
104 was hired.
Answer: SELECT employee_id, last_name, hire_date, salary FROM employees WHERE
TO_NUMBER(TO_CHAR(hire_date, 'YYYY')) >
(SELECT TO_NUMBER(TO_CHAR(hire_date, 'YYYY')) FROM employees WHERE
employee_id = 104)

PROG-113A / ► Week 11: Using Subqueries to Solve Queries / ► Learning Activity 9


Which of the following is INCORRECT?
Answer: Use single-row operators with multiple-row subqueries
Which of the folllowing is required in a subquery?
Answer: SELECT
Which of the following is CORRECT about sub-queries?
Answer: Subquery execute before the main query
executes. Evaluate the SQL Command
SELECT job_id, job_title FROM jobs J WHERE INCLUDES
(SELECT * FROM employees WHERE J.job_id = e.job_id );
Answer: The SQL will return an error. Invalid "INCLUDES" parameter.
Evaluate the SQL command
SELECT employee_id, salary from employees where salary = ANY (SELECT salary FROM employees
WHERE job_id = 'IT_PROG') AND job_id = 'ST_CLERK'
Answer: This has no error.

Downloaded by Joseph Lapso ([email protected])


The General Manager request to the Database Administrator to generate the total number of parts and
total outstanding balance on hand of every class in warehouse number 1&2.
Which of the following SQL command will generate the required output.
-SELECT warehouse, class, count(partnum), sum(onhand) GROUP BY warehouse,class
HAVING warehouse = 1 or warehouse = 2 FROM parts;

Display the employee's name, job title, job_id and the department name of employees with department id of
100.

Display
-SELECTthe part number whose J.job_title,
E.employee_id, class is not HW, AG or SG.
e.job_id,
D.department_name FROM employees E
-SELECT
JOIN jobs partnum FROM parts
J ON E.job_id WHERE NOT IN class ('HW', 'AG', SG')
= J.job_id
JOIN of
Which departments
the followingDSELECT
ON E.department_id = D.department_id
statement is the correct report that will rename the column DESCRIPTION to
WHERE E.department_id = 100
TITLE, PARTNUM to ID and ONHAND to STOCK?

-. SELECT DESCRIPTION
-FULL OUTER JOIN RENAME AS TITLE, PARTNUM RENAME AS ID, ONHAND RENAME
AS STOCK FROM PARTS;
Which of the following is NOT a task of a Database Administrator
A join between two tables that returns the results of an INNER join as well as the results of a left and right
-None
join is of
a the choices .
SELECT employee_id, min_salary, max_salary FROM employees, departments WHERE salary>=
10000 && salary <= 20000

-The SQL command will produce an error.

These are collection of objects such as tables, views, and sequences.


-Container’

Display the first 5 letter in the surname of all the employees whose firstname starts with letter 'N'

-SELECT SUBSTR(last_name,1,5), first_name FROM employees WHERE


SUBSTR(first_name,1,1) IN 'N'

Which of the following SELECT statement is the correct PL/SQL that will display all rows and columns?
-SELECT FROM TABLE PARTS;

Display all employees whose job id contains the word 'ACCOUNT'.


-SELECT * FROM EMPLOYEES WHERE job_id LIKE '%ACCOUNT%';

Downloaded by Joseph Lapso ([email protected])


Display employee's name and id whose firstname starts with letter D and job id is IT_PROG.

-SELECT employee_id, first_name, last_name FROM employees ORDER BY department_id


WHERE first_name LIKE 'D%' and job_id = 'IT_PROG'

The following are capabilities of SQL SELECT


-Create records, Remove Table, Edit record

Display the part number whose class is not HW, AG or SG.


-SELECT partnum FROM parts WHERE class NOT IN = (‘HW’, AG’, SG’)

Each row of data in a table can be uniquely identified by a

-foreign key

Which of the following SELECT statement is the correct report that will display the unique value for
WAREHOUSE renames the column as "No. of Available Warehouse".
- SELECT DISTINCT COLUMN WAREHOUSE AS "No. of available warehouse" FROM PARTS;

Display the employee id and the last name of every employee in the company whose salary is between 5000 to
10000. Display the output in a single column with the format 100 : King Label the column as Employee
- SELECT CONCAT(CONCAT(employee_id, ':'), last_name) AS Employee, salary
FROM employees WHERE salary >= 5000 AND salary <= 10000

You want to display the employee's last name and date hired in year 2000 to2006 whose salary is above 5000.
Which SQL statement give the required output?
- SELECT last_name, hire_date FROM employees WHERE hire_date>=
TO_DATE('01-Jan-2000', 'DD-Mon-YYYYY') AND hire_date<= TO_DATE('31-Dec-2006', 'DD-
Mon-YYYY') AND salary ABOVE 5000;

Display all location id between 1000 to 2000.


- DISPLAY location_id FROM departments WHERE location_id BETWEEN 1000 TO 2000

PROG-113A / ► Week 20: Second Quarter Exam / ► Second Quarter Exam (50/50) (PS: Pabago bago ang
questions, pero same lang sa ibang short quizes or learning activity yung questions and sagot) <3 :)

Which of the following does NOT describes SELECT Statement in a PL/SQL.


Answer: Queries must return only one column.
You want to display all the records of employee the same with the salary employee number 103. Answer:
SELECT * FROM employees WHERE salary = (SELECT salary from employees where employee_id=
103)
Which of the following stored procedure to create a procedure to that will be used to display the
employee id and salary of Steven King?
Answer: CREATE OR REPLACE PROCEDURE query_emp
(p_last_name IN employees.last_name%TYPE, p_first_name IN
employees.first_name%TYPE, p_employee_id OUT
employees.employee_id%TYPE, p_salary OUT employees.salary
%TYPE) IS
BEGIN
SELECT employee_id, salary INTO p_employee_id, p_salary

Downloaded by Joseph Lapso ([email protected])


FROM employees
WHERE last_name = p_last_name AND first_name = p_first_name; END
query_emp;
Which of the folllowing is TRUE?
Answer: SQL code are embedded within PL/SQL statements
When an exception is user defined, the exception is raised .
Answer: Explicitly
Which of the folllowing is TRUE?
Answer: SQL code are embedded withing PL/SQL statements Weak
REF CURSOR is very flexible.
Answer: True
How do you test the output of a PL/SQL block?
Answer: Use a predefined Oracle package and its procedure
Restrictive, specifies a RETURN type, associates only with type-compatible queries are description of a .
Answer: Strong REF CURSOR
Which of the following DOES NOT describes an exception?
Answer: Exception is a PL/SQL error that is raised before program execution.
These are local variables declared in the parameter list of a subprogram specification. Answer:
Formal parameter
Which of the following rules is INCORRECT about cursor variables?
Answer: None of the choices.
When an exception is predefined by Oracle server, the exception is raised .
Answer: Explicitly
Which of the following DOES NOT describes an exception?
Answer: Exception is a PL/SQL error that is raised before program execution. Evaluate
the following PL/SQL.
CREATE OR REPLACE PROCEDURE query_employee
(p_id IN employees.employee_id%TYPE,
p_name OUT employees.last_name%TYPE,
p_salary OUT employees.salary%TYPE) IS
BEGIN SELECT last_name, salary INTO p_name, p_salary
FROM employeesWHERE employee_id = p_id;
END query_employee
Answer: No error
You want to know the total number of employees whose firstname starts with letter D. Which
of the folllowing PLS/SQL executes successfully?
Answer: DECLARE
v_first_name employees.first_name%TYPE := 'D%'; BEGIN
SELECT COUNT(*) INTO v_first_name FROM employees WHERE first_name LIKE v_first_name;
DBMS_OUTPUT.PUT_LINE(v_first_name);
END;
What is the error trapping function that returns the numeric value of the error code? Answer:
SQLCODE
You want to display the name, salary and tax of employee #150. Which of the PL/SQL will execute
successfully? Note tax is computed as 2% of the salary.
Answer: DECLARE
v_first_name VARCHAR2(50);
v_last_name VARCHAR2(50);
v_salary INTEGER(20);
v_tax INTEGER(10);
BEGIN

Downloaded by Joseph Lapso ([email protected])


SELECT first_name, last_name, salary, salary * 0.02 INTO v_first_name, v_last_name, v_salary, v_tax
FROM employees WHERE employee_id = 150;
DBMS_OUTPUT.PUT_LINE('Firstname : '|| v_first_name);
DBMS_OUTPUT.PUT_LINE('Lastname : '|| v_last_name);
DBMS_OUTPUT.PUT_LINE('Salary : '|| v_salary);
DBMS_OUTPUT.PUT_LINE('Tax : '|| v_tax);
END;
Which of the following is the syntax to close a cursor?
Answer: CLOSE cursor_variable_name;
Which of the following rules is INCORRECT about cursor variables?
Answer: None of the choices.
What are the three PL/SQL block types?
Answer: Anonymous, Procedure, Function
You can trap any error by including a corresponding handler within the exception-handling section of the
PL/SQL block.
Answer: True
Which of the following describes weak REF CURSOR?
Answer: Associates with any query
Given the answer in item , which of the folllowing stored procedure will display the
employee id and salary of Steven King?
Answer: DECLARE
v_employee_id employees.employee_id%TYPE;
v_emp_sal employees.salary%TYPE;
BEGIN
query_emp('King', 'Steven', v_employee_id, v_emp_sal); DBMS_OUTPUT.PUT_LINE('Employee ID
' || v_employee_id ||' earns '|| to_char(v_emp_sal, '$999,999.00'));
END;
You have been tasked to update the database by creating a PL/SQL to increase the salary of all IT Programmer
employees by 50% of their existing salary.
Which of the following will execute successfully?
Answer: DECLARE
v_job_id employees.job_id%TYPE := 'IT_PROG';
BEGIN
UPDATE employees SET salary = salary *0.50 WHERE job_id = v_job_id;
END;
Which of the folllowing is required in a subquery?
Answer: SELECT
What is the exception name when PL/SQL has an internal problem
Answer: PROGRAM_ERROR
In the DECLARE section of the PL/SQL block,
Answer: All of the choices
Actions are being performed when error occurs during PL/SQL execution in the Answer:
EXCEPTION
What is the exception name when PL/SQL has an internal problem
Answer: PROGRAM_ERROR
Which of the folllowing statement describes PL/SQL?
Answer: PL/SQL is an Oracle proprietary, procedural, 3GL programming language Evaluate
the following PL/SQL.
DECLARE
v_employee_id employees.employee_id%TYPE := 114;
BEGIN
DELETE employees WHERE employee_id = v_employee_id;

Downloaded by Joseph Lapso ([email protected])


END;
Answer: The PL/SQL will delete employee number 114.
Which of the following command is used to create a stand-alone procedure that is stored in the Oracle
database?
Answer: CREATE PROCEDURE
Evaluate the following PL/SQL.
DECLARE
v_email VARCHAR(20);
BEGIN
SELECT email INTO v_email FROM EMPLOYEES WHERE email like 'D%';
DBMS_OUTPUT.PUT_LINE ('Employees whose email address starts with letter D :'
|| v_email);
EXCEPTION
WHEN TOO_MANY_ROWS THEN
DBMS_OUTPUT.PUT_LINE (' Your select statement retrieved multiple rows.'); END;
Answer: The PL/SQL block will run successfully.
Which of the following is the syntax to define a REF CURSOR type?
Answer: TYPE ref_type_name IS REF CURSOR
[RETURN return_type];
The PL/SQL code block helps modularize code by using:
Answer: All of the choices
Which of the following is the syntax to fetch from a cursor variable? Answer:
FETCH cursor_variable_name INTO variable_name1 [,variable_name2,. . .] |
record_name;
You want to display all records in the database whose salary is above the salary of Alexander Hunold.
Answer: SELECT * from employees WHERE salary < (SELECT salary FROM employees WHERE first_name
= 'Alexander' AND last_name = 'Hunold')
Procedure can be stored in the database as a schema object.
Answer: True
In PL/SQL Block Structure, which of the following are mandatory? Answer:
BEGIN and END
PL/SQL stands for
Answer: Procedural Language extension to SQL
Which of the following is CORRECT about sub-queries?
Answer: Subquery execute before the main query executes.
Which of the following does NOT describes SELECT Statement in a PL/SQL. Answer:
Queries must return only one column.
PL/SQL Provides a block structure for executable units of .
Answer: Code
Evaluate the SQL command
SELECT employee_id, salary from employees where salary = ANY (SELECT salary FROM employees
WHERE job_id = 'IT_PROG') AND job_id = 'ST_CLERK'
Answer: This has no error.
Which of the following PL/SQL will execute successfully?
Answer: DECLARE
v_salary INTEGER(20);
BEGIN
SELECT salary INTO v_salary FROM employees WHERE employee_id = 150; END;
In PL/SQL Block Structure, which of the following are OPTIONAL?
Answer: None of the choices

Downloaded by Joseph Lapso ([email protected])


Evaluate the following PL/SQL. At what line number is the error of the PL/SQL? DECLARE
v_deptno NUMBER := 800;
e_invalid EXCEPTION;
BEGIN
DELETE FROM departments WHERE
department_id = v_deptno; IF SQL %
NOT_FOUND THEN
RAISE e_invalid;
END IF;
COMMIT;
EXCEPTION
WHEN e_invalid THEN DBMS_OUTPUT.PUT_LINE('No
such department id.'); END;
Answer: 7
What is the error trapping function that returns the numeric value of the error code? Answer:
SQLCODE
Fetch into a record when fetching from a cursor.
Answer: True

JAVA II

True or False: Evaluating the options require determining the advantages and
disadvantages of each option. - TRUE
True or False: According to Hicks, the first step in an effective problem solving process is
clearly defining the problem. - TRUE
Who among the following can give feedback to an employee? - All of the choices
True or False: In identifying the problem, it should be specific and not broad or vague. -
TRUE
True or False: You should also look at the problem from a different point of view and listen to
others’ suggestion. This is the third step – listing all possible solutions. - FALSE
Which one of the following statements is FALSE? - Communication involves talking and
listening only.
Few programmers are complaining about slow Internet connection and this affects their work.
This cause is categorized in - EQUIPMENT
I’ve purchased a modern gaming mouse but it doesn’t have a PS/2 plug. Where I connect it? -
D
Windows is to Personal Computer (PC) while Mac OSX is to Mac laptops and computers. -
True

Downloaded by Joseph Lapso ([email protected])


COBOL stands for Convenient Business Oriented Language. - False
C++, an extension of the C language, introduced object-oriented programming. - True
LISP and PROLOG are programming languages that are best used when dealing with Artificial
Intelligence. - True
FORTRAN was the first ever “modern” computer language. - true
I think I plugged the speakers wrong. The power is turned on but I can’t hear any sound Which
port should I check? - F
Enforcing environmental policies is one of the major causes of job loss and
unemployment. - False
True or False: Dates in file names should be written in YYYY-MM-DD format. - False
Big business companies are the only ones responsible for enforcing environmental policies since
they can afford alternative cleaner technology. - False
Pre-review activities in the review process includes review planning, preparation and individual
review. - true
Increase work productivity by arranging items in such a way that they are easy to find and pick
up. - true
Montreal protocol protects the ozone layer by . - phasing out
harmful substances
Business industries will not be affected by the environmental crisis. - False
True or False: Protocols are set of standards rules which describes how something should be
done and different companies have different protocols as well. - true
Presidential Decree No. 856 is an international treaty that imposes limitations on the greenhouse
gas emissions of several countries. - True
True or False: Organizational aims are different from the mission statement; they refer to the
results an organization is aspiring for. - true
The cost / benefit analysis document is appropriately named. - False
A printed progress report to be submitted to the adviser. - purpose
True or False: Statutory requirements are identified by the vendors or suppliers and they include
value, stability, diversity and capacity. - False
As long as the demands of the clients are met and the business is flourishing, there’s no more
need to bother about the effects of one’s business to the environment. - False
Identify whether the statement is a strength, weakness, opportunity or threat: The student
record system could be used by other schools other than Ricka’s school. -

Downloaded by Joseph Lapso ([email protected])


opportunity
True or False: Reviewing the related literature includes review of concepts, theories and previous
research findings. - true
Companies can freely make their own set of environmental policies without consulting the
workers’ union, or any local or national laws about it. - False
Kyoto protocol addresses environmental issues through the campaign of
. - reducing greenhouse gas emissions
Humans rely on natural resources for survival. - true
Quantitative research, compared to qualitative research, uses measurable - Data ISO/IEC
25010:2011’s product quality model has eight (8) major characteristics. - true True or False:
Usually, the summary of the report is the first thing that’s being read. -
true
is when you conduct regular audits and inspections to
evaluate your work performance. - Shitsuke
“XYZ is so cool! I tried to install it in my old computer and it still runs smoothly. Given that
the computer’s video card is a bit faulty.“ - Reliability
True or False: There are five main elements of a written report – topic, style, structure, facts and
contents. - false
True or False: To gather data, you can either conduct an interview, survey, observation, mail
questionnaire, coding and tabulation. - false
PROG LONG QUIZ 4

Question 1
Complete
Mark 3.00 out of 3.00

Flag question
Question text
Given the answer in item, which of the folllowing stored procedure will display the employee id and salary of Steven King?
Select one:

a. DECLARE
v_employee_id employees.employee_id%TYPE; v_emp_sal employees.salary%TYPE;

Downloaded by Joseph Lapso ([email protected])


query_emp('King', 'Steven', v_employee_id, v_emp_sal);
BEGIN
DBMS_OUTPUT.PUT_LINE('Employee ID ' || v_employee_id ||' earns '|| to_char(v_emp_sal, '$999,999.00'));
END;
b. DECLARE
query_emp('King', 'Steven', v_employee_id, v_emp_sal);
BEGIN
v_employee_id employees.employee_id VARCHAR(10);
v_emp_sal employees.salary NUMERIC(10);
DBMS_OUTPUT.PUT_LINE('Employee ID ' || v_employee_id ||' earns '|| to_char(v_emp_sal, '$999,999.00'));
END;
c. DECLARE
v_employee_id employees.employee_id VARCHAR(10);
v_emp_sal employees.salary NUMERIC(10);
BEGIN
query_emp('King', 'Steven', v_employee_id, v_emp_sal); DBMS_OUTPUT.PUT_LINE('Employee ID
' || v_employee_id ||' earns '|| to_char(v_emp_sal, '$999,999.00'));
END;
d. DECLARE
v_employee_id employees.employee_id%TYPE;
v_emp_sal employees.salary%TYPE;
BEGIN
query_emp('King', 'Steven', v_employee_id, v_emp_sal); DBMS_OUTPUT.PUT_LINE('Employee ID
' || v_employee_id ||' earns '|| to_char(v_emp_sal, '$999,999.00'));
END;

Question 2
Question text
Complete
The
MarkPL/SQL code
1.00 out of 1.00 block helps modularize code by using:

Select one:

a. All of the choices


b. Database triggers
Flag question
c. Packages
d. Procedures

Downloaded by Joseph Lapso ([email protected])


e. Anonymous blocks
f. Functions

Question 3
Question text
Complete
Which of out
Mark 1.00 theoffollowing
1.00 rules is INCORRECT about cursor variables?
Select one:

a. You cannot assign a null value to cursor variables.


b. Cursors and cursor variables are not interoperable.
Flag question
c. You cannot use REF CURSOR types in CREATE TABLE or VIEW statements.
d. You cannot use comparison operators to test cursor variables.
e. None of the choices.
f. You cannot use cursor variables with remote subprograms on another server.

Question 4
Question text
Complete
Which of out
Mark 1.00 theoffollowing
1.00 is the syntax to close a cursor? Select
one:

a. SET cursor_variable_nameCLOSE;
b. CLOSE cursor_variable_name;
Flag question
c. EXIT cursor_variable_name;
d. QUIT cursor_variable_name;

Question 5
Complete
Mark 1.00 out of 1.00

Downloaded by Joseph Lapso ([email protected])


Flag question
Question text
Which of the folllowing is TRUE?
Select one:

a. PL/SQL statements are embedded within SQL code.


b. None of the choices
c. SQL code are embedded within PL/SQL statements
d. You can embed procedural construct within SQL code

Question 6
Complete
Mark 1.00 out of 1.00

Flag question
Question text
Use column aliases in cursors for calculated columns fetched into records declared with
%COLUMNTYPE.
Select one:

True False

Question 7
Complete
Mark 1.00 out of 1.00

Flag question
Question text
This is a subset of an existing data type that may place a constraint on its base type. Select one:

a. Subtype

Downloaded by Joseph Lapso ([email protected])


b. Index
c. Data dictionary
d. Data
e. Schema

Question 8
Question text
Complete
What is the
Mark 1.00 outdefault
of 1.00 parameter mode when no mode is specified? Select

one:

a. IN
b. DEFAULT
Flag question
c. OUT
d. IN OUT

Question 9
Question text
Complete
When an exception
Mark 1.00 out of 1.00 is predefined by Oracle server, the exception is raised .
Select one:

a. Implicitly
b. Interactively
Flag question
c. Exclusively
d. Explicitly
e. None of the choices

Question 10

Downloaded by Joseph Lapso ([email protected])


Complete
Mark 1.00 out of 1.00

Flag question
Question text
Evaluate the following PL/SQL. Which of the following will line creates an error?

1. CREATE OR REPLACE PROCEDURE query_emp 2. (


3. p_department_id IN employees.department_id%TYPE,
4. p_name OUT employees.last_name%TYPE,
5. p_salary OUT employees.salary%TYPE 6.
)
7. IS
8. BEGIN
9. SELECT last_name, salary, department_id INTO p_name, p_salary,
p_department_id
10. FROM employees
11. WHERE salary >= p_salary AND department_id = p_department_id ;
12. END query_emp;

Select one:
a. Line 1
b. Line 5
c. Line 9
d. Line 3
e. No error
f. Line 11

Question 11
Question text
Complete
Mark 1.00 out of 1.00

Flag question

Downloaded by Joseph Lapso ([email protected])


These are local variables declared in the parameter list of a subprogram specification.
Select one:

a. Formal parameter
b. Actual arguments
c. Passing parameter
d. Actual parameter

Question 12
Complete
Mark 1.00 out of 1.00

Flag question
Question text
Which of the following is the syntax to open a cursor varial Select one:

a. SET cursor_variable_name
FOR select_statement;

b. GET cursor_variable_name
FOR select_statement;

c. OPEN cursor_variable_name
FOR select_statement;

d. LOAD cursor_variable_name
FOR select_statement;

Question 13
Complete
Mark 1.00 out of 1.00

Flag question
Question text
Which if the following is NOT a benefits of using modular program constructs? Select one:

Improved data security and integrity


Improved code clarity

Downloaded by Joseph Lapso ([email protected])


Improved performance
None of the choices
Easy maintenance

Question 14
Question text
Complete
Which of out
Mark 1.00 theoffollowing
1.00 command is used to create a stand-alone procedure that is stored in the Oracle
database?
Select one:

a. PROCEDURE
b. BUILD PROCEDURE
Flag question

c. CREATE
d. DO PROCEDURE
e. CREATE PROCEDURE

Question 15
Complete
Mark 1.00 out of 1.00

Flag question
Question text
Weak REF CURSOR is very flexible. Select one:

True False

Question 16
Complete
Mark 1.00 out of 1.00

Downloaded by Joseph Lapso ([email protected])


Flag question
Question text
Which of the following is the syntax to fetch from a cursor variable? Select one:

a. FETCH cursor_variable_name INTO variable_name1


[,variable_name2,. . .] | record_name;

b. GET cursor_variable_name INTO variable_name1


[,variable_name2,. . .] | record_name;

c. POST cursor_variable_name INTO variable_name1


[,variable_name2,. . .] | record_name;

d. RETRIEVE cursor_variable_name INTO variable_name1


[,variable_name2,. . .] | record_name;

Question 17
Question text
Complete
PL/SQL stands for
Mark 1.00 out of 1.00
Select one:

a. Procedural Language extension to SQL


b. Procedural Libraries of SQL
Flagofquestion
c. Procedural Logic SQL
d. Process Linkage to SQL

Question 18
Complete
Mark 1.00 out of 1.00

Flag question

Downloaded by Joseph Lapso ([email protected])


Question text
Which of the following is the syntax to define a REF CURSOR type? Select one:

a. DECLARE ref_type_name AS REF CURSOR


[RETURN return_type];

b. DEFINE ref_type_name AS REF CURSOR


[RETURN return_type];

c. TYPE ref_type_name IS REF CURSOR


[RETURN return_type];

d. SET ref_type_name IS REF CURSOR


[RETURN return_type];

Question 19
Question text
Complete
What is the
Mark 1.00 outerror trapping function that returns the numeric value of the error code? Select one:
of 1.00

a. SQLCODE
b. ERRORCODE
Flag question
c. SQL_ERRORCODE
d. ERROR_CODE

Question 20
Complete
Mark 1.00 out of 1.00

Flag question
Question text
What are the three PL/SQL block types? Select one:

a. Anonymous, Procedure, Function

Downloaded by Joseph Lapso ([email protected])


SELECT, UPDATE, INSERT
Add, Edit, Delete
DECLARE, BEGIN, END

Question 21
Question text
Complete
Evaluate
Mark 1.00the following
out of 1.00 PL/SQL.

1. DECLARE
2. v_employee_id employees.employee_id%TYPE := 114;
3. BEGIN
4.
Flag question DELETE employees WHERE employee_id = v_employee_id;
5. END;

Select one:
a. To execute successfully delete line 1,2,3,5.
b. The PL/SQL will produce an error in line 4.
c. The PL/SQL will delete employee number 114.
d. The PL/SQL will produce an error in line 2.

Question 22
Complete
Mark 1.00 out of 1.00

Flag question

Question text
You have been tasked to update the database by creating a PL/SQL to increase the salary of all IT
Programmer employees by 100% of their existing salary. Which of the following will execute successfully?
Select one:

Downloaded by Joseph Lapso ([email protected])


a. DECLARE
v_job_id employees.job_id%TYPE := 'IT_PROG';
BEGIN
UPDATE employees SET salary = salary * 2 WHERE job_id = v_job_id;
END;
b. DECLARE
v_job_id employees.job_id%TYPE := 'IT_PROG';
v_salary employees.salary := salary;
BEGIN
UPDATE employees SET v_salary = salary * 1.00 WHERE v_job_id = job_id; END;
c. DECLARE
v_job_id employees.job_id%TYPE := 'IT_PROG';
BEGIN
UPDATE employees SET salary = salary * 100% WHERE job_id = v_job_id; END;
d. DECLARE
v_job_id employees.job_id%TYPE := 'IT_PROG';
v_salary employees.salary := salary;
BEGIN
UPDATE employees SET salary = v_salary * 0.100% WHERE job_id = v_job_id;
END;

Question 23
Question text
Complete
This
Markis1.00
a type
out ofof1.00
cursor which is created and managed internally by the Oracle server to process SQL
statements
Select one:

a. Interactive
b. Implicit Flag question

c. Explicit
d. Exclusive
e. Coded

Question 24
Complete
Mark 1.00 out of 1.00

Downloaded by Joseph Lapso ([email protected])


Flag
Question text
Which of the following describes weak REF CURSOR?
Select one:

a. Restrictive
b. All of the choices
c. Is not flexible
d. Associates with any query

Question 25
Question text
Complete
Evaluate
Mark 1.00the following
out of 1.00 PL/SQL.

1. DECLARE
2. v_employee_id employees.employee_id%TYPE := 114;
3. BEGIN
4.
Flag question DELETE employees WHERE employee_id = v_employee_id;
5. END;

Select one:
a. To execute successfully delete line 1,2,3,5.
b. The PL/SQL will produce an error in line 4.
c. The PL/SQL will delete employee number 114.
d. The PL/SQL will produce an error in line 2.

Question 26
Complete
Mark 1.00 out of 1.00

Downloaded by Joseph Lapso ([email protected])


Flag
Question text
What is the exception name when PL/SQL has an internal problem
Select one:

a. ERROR_MSG
b. EXECUTION_ERROR
c. RUNTIME_ERROR
d. PROGRAM_ERROR

Question 27
Question text
Complete
Which of out
Mark 1.00 theoffolllowing
1.00 does NOT describes subprogram?
i. Compiled only once
ii. Stored in the database
iii. Do not return values
iv. Can take parameters
v. Unnamed PL/SQL blocks
Flag question
Select one:

a. iii & v
b. iii & iv
c. ii & v
d. iii & v
e. i & iii

Question 28
Complete
Mark 1.00 out of 1.00

Downloaded by Joseph Lapso ([email protected])


Flag
Question text
Evaluate the following. What will be the output?

1. DECLARE
2. SUBTYPE Accumulator IS NUMBER (4,2);
3. v_amount accumulator;
4. v_num1 NUMBER;
5. v_num2 NUMBER;
6. v_num3 NUMBER;
7. BEGIN
8. v_amount := 10.50;
9. v_num1 := 1;
10. v_num2 := 2;
11. v_num3 := 3;
12. v_num1 := v_amount;
13. v_num2 := v_num1 + v_amount;
14. v_num2 := v_num2 - v_num3;
15.
16. dbms_output.put_line('Total is: ' || v_num2); 17.
18. END;

Select one:
a. None of the choices
b. -1
c. 8.5
d. 18

Question 1
Complete
Mark 2.00 out of 2.00

Flag question

Downloaded by Joseph Lapso ([email protected])


Question text
You want to display all the job position titles whose salary is salary from 5,000 to 12,000 arrange from highest to lowest
Select one:

SELECT job_title FROM jobs WHERE min_salary >= 5000 AND max_salary<= 10000
SELECT job_title FROM employees WHERE salary >= 5000 AND salary <= 10000
SELECT employees_id, job_title FROM employees WHERE salary >= 5000 AND salary <=

10000

d. SELECT job_title FROM jobs WHERE salary >= 5000 AND salary <= 10000

Question 2
Question text
Complete
What is the
Mark 2.00 outSQL command to count the number of records in the employees table? Select one:
of 2.00

a. SELECT ALL FROM employees


b. SELECT * FROM employees;
Flag question
c. SELECT COUNT(*) FROM employees
d. SELECT SUM(*) FROM employees;

Question 3
Complete
Mark 2.00 out of 2.00

Flag question
Question text
True or False. The AND, OR, NOT are comparison operators. Select one:

True False

Downloaded by Joseph Lapso ([email protected])


Question 4
Complete
Mark 2.00 out of 2.00

Flag question
Question text
Evaluate the following SQL command
SELECT * FROM jobs WHERE job_title LIKE 'Manager%'
Select one:

a. The SQL command will produce an error.


b. The SQL command will display all employees with Manager position
c. The SQL command will display all records in the database
d. No records will be displayed

Question 5
Complete
Mark 2.00 out of 2.00

Flag question
Question text
You want to display all the employee id and the month an employee was hired. Which SQL statement give the required output?
Select one:

SELECT employee_id, hire_date, TO_DATE(hire_date,'Month') AS "Hired Month", job_id FROM


SELECT employee_id, hire_date, MONTH(hire_date,'Month') AS "Hired Month", job_id FROM
employees

c. SELECT employee_id, hire_date, TO_CHAR(hire_date,'Month') AS "Hired Month", job_id FROM


employees

d. SELECT employee_id, hire_date, TO_MONTH(hire_date,'Month') AS "Hired Month", job_id


FROM employees

Question 6
Complete
Mark 2.00 out of 2.00

Downloaded by Joseph Lapso ([email protected])


Flag
Question text
You want to generate the total salary per month of every department in the company. Select one:

SELECT department_id, salary FROM employees ORDER BY SUM(salary)


SELECT department_id, TOTAL(salary) FROM employees GROUP BY department_id
SELECT department_id, salary FROM employees GROUP BY SUM(salary) ORDER BY

department_id

d. SELECT department_id, SUM(salary) FROM employees GROUP BY department_id

Question 7
Complete
Mark 2.00 out of 2.00

Flag question
Question text
You want to display the employee's last name whose salary is below 10,000 and whose lastname starts with letter D.
Which SQL statement give the required output format of the salary?
Select one:

a. SELECT last_name, TO_INT(salary, '$999,999.99') AS "MONTHLY SALARY" FROM employees


WHERE salary < 10,000 WHERE last_name STARTS 'D%'

b. SELECT last_name, TO_CHAR(salary, '$999,999.99') AS "MONTHLY SALARY" FROM


employees WHERE salary < 10000 WHERE last_name LIKE 'D%'

c. SELECT last_name, TO_INTEGER(salary, $999,999.99) AS "MONTHLY SALARY" FROM


employees WHERE salary < 10000 WHERE last_name IN 'D%'

d. SELECT last_name, TO_NUMBER(salary, '$999,999.99') AS "MONTHLY SALARY" FROM


employees WHERE salary < 10,000 WHERE last_name = ‘D%’

Question 8
Complete
Mark 2.00 out of 2.00

Downloaded by Joseph Lapso ([email protected])


Flag
Question text
Display the lastname of every employee in the company. Display the output in a single column and label it as
Fullname
Format: JuanReyes
Select one:

a. None of the choices


b. SELECT CONCATENATE(first_name, last_name) AS Fullname FROM employees
c. SELECT CONCAT(first_name, last_name) FROM employees
d. SELECT CONCAT(first_name, last_name) AS Fullname FROM employees

Question 9
Complete
Mark 0.00 out of 2.00

Flag question
Question text
Display the first 5 letter in the surname of all the employees whose firstname starts with letter 'N' Select one:

SELECT SUBSTR(last_name,1,5), first_name FROM employees WHERE first_name IN 'N'


SELECT SUBSTR(last_name,1,5), first_name FROM employees WHERE
SUBSTR(first_name,1,1) = 'N'

c. SELECT SUBSTR(surname,1,5), first_name FROM employees WHERE


SUBSTR(first_name,1,1) IN 'N'

d. SELECT SUBSTR(surname,1,5), first_name FROM employees WHERE first_name = 'N'


e. SELECT SUBSTR(last_name,1,5), first_name FROM employees WHERE
SUBSTR(first_name,1,1) IN 'N'

Question 10
Complete
Mark 2.00 out of 2.00

Downloaded by Joseph Lapso ([email protected])


Flag
Question text
Austin David was transferred to Purchasing Department. You are assigned to update the database. Which of the following SQL com
Select one:

a. UPDATE first_name = ‘David’ AND last_name = ‘Austin’ FROM employees SET department_id =
30
b. UPDATE department_id = 30 WHERE first_name = ‘David’ AND last_name = ‘Austin’
c. UPDATE employees WHERE department_id = 30 SET first_name = ‘David’ AND last_name =
‘Austin’

d. UPDATE employees SET department_id = 30 WHERE first_name = ‘David’ AND last_name =


‘Austin’

Question 11
Question text
Complete
John
Mark want to ofknow
2.00 out 2.00 how many employees receiving salary below 10,000. What
SQL command he need to run?
Select one:

a. SELECT COUNT(*) FROM employees WHERE salary < 10000;


b. SELECT COUNT(salary)
Flag question FROM employees WHERE salary < 10,000;

c. SELECT COUNT(emp_id) FROM employees WHERE salary <= 10000;


d. SELECT salary FROM COUNT(employees)WHERE salary < 10000;

Question 12
Complete
Mark 2.00 out of 2.00

Downloaded by Joseph Lapso ([email protected])


Flag
Question text
Evaluate the following SQL command
SELECT employee_id, salary, department_id FROM employees WHERE department_id IN (60,70)
Select one:

a. The SQL command will produce an error.


b. The SQL command will display employees with department id 60 and 70.
c. The SQL command will give an incorrect output.
d. The SQL command will display employees with department id 60 or 70.

Question 13
Complete
Mark 2.00 out of 2.00

Flag question
Question text
You want to display the employee's last name and date hired in year 2000 to2006 whose salary is above 5000. Which SQL statement
Select one:

a. SELECT last_name, hire_date FROM employees WHERE hire_date>=


TO_DATE('01-Jan-2006', 'DD-Mon-RR') AND hire_date<= TO_DATE('31-Dec-2006', 'DD-Mon-RR')
AND salary > 5000;

b. SELECT last_name, hire_date FROM employees WHERE hire_date>=


TO_DATE('Jan-2000', 'Month-YYYY') AND hire_date<= TO_DATE('Dec-2006', 'Month-‘YYYY') AND
salary > 5,000;

c. SELECT last_name, hire_date FROM employees WHERE hire_date>=


TO_DATE('01-Jan-2000', 'DD-Mon-YYYYY') AND hire_date<= TO_DATE('31-Dec-2006', 'DD-Mon- YYYY') AND salary ABOV

d. SELECT last_name, hire_date FROM employees WHERE hire_date>=


TO_DATE('2000', 'YYYY') AND hire_date<= TO_DATE('2006', 'YYYY') OR salary > 5000;

Question 14
Complete
Mark 2.00 out of 2.00

Downloaded by Joseph Lapso ([email protected])


Flag
Question text
List all employees except for IT_PROG job id.
Select one:

a. SELECT *FROM employees EXCEPT JOB_ID != 'IT_PROG'


b. SELECT *FROM employees WHERE JOB_ID NOT IN ('IT_PROG')
c. SELECT *FROM employees WHERE JOB_ID <> 'IT_PROG'
d. All of the choices

Question 15
Complete
Mark 2.00 out of 2.00

Flag question
Question text
Evaluate the following SQL command
SELECT employee_id, min_salary, max_salary FROM employees, departments WHERE salary>= 10000 && salary <= 20000
Select one:

The SQL will produce Cartesian Product


The SQL will display the employee id, department id and the minimum and maximum salary
whose salary is between 10000 and 20000.

c. The SQL command will produce an error.


d. The SQL command will give an incorrect output.

Question 16
Complete
Mark 2.00 out of 2.00

Flag question

Question text

Downloaded by Joseph Lapso ([email protected])


Display all the records in the employee table. Arrange the output in by lastname from A-Z order.
Select one:

a. SELECT * FROM employees SORT BY lastname


b. SELECT * FROM employees ORDER BY lastname
c. SELECT * FROM employees ORDER BY lastname AZ
d. SELECT * FROM employees SORT BY lastname ascending

Question 17
Complete
Mark 2.00 out of 2.00

Flag question
Question text
Display employee's name and id whose firstname starts with letter D and job id is IT_PROG. Sort the output by department.
Select one:

a. SELECT employee_id, first_name, last_name FROM employees ORDER BY department_id


WHERE first_name LIKE 'D%' and job_id = 'IT_PROG'

b. SELECT employees FROM employee_id, first_name, last_name WHERE first_name LIKE ‘D%’
and job_id = ‘IT_PROG’ ORDER BY department_id

c. SELECT employee_id, first_name, last_name FROM employees WHERE job_id = 'IT_PROG' OR


first_name LIKE 'D%' and ORDER BY department_id

d. SELECT employee_id, first_name, last_name FROM employees WHERE first_name LIKE 'D%'
and job_id = 'IT_PROG' ORDER BY department_id

Question 18
Complete
Mark 2.00 out of 2.00

Flag question
Question text
You what to generate the average salary of all employees whose job function is FI_ACCOUNT. Which of the following SQL comma
Select one:

a. SELECT AVERAGE(salary) FROM employees WHERE job_id = 'FI_ACCOUNT';

Downloaded by Joseph Lapso ([email protected])


SELECT AVG(salary) FROM employees WHERE job_id = 'FI_ACCOUNT';
SELECT AVE(salary) FROM employees WHERE job_id = 'FI_ACCOUNT';
SELECT COUNT AVG(salary) FROM employees WHERE job_id = 'FI_ACCOUNT';

Question 19
Question text
Complete
Display
Mark 2.00all
outlocation
of 2.00 id between 1000 to 2000.

Select one:

a. DISPLAY location_id FROM departments WHERE location_id LING 1000 UP TO 2000


b. DISPLAY location_id FROM departments WHERE location_id BETWEEN 1000 TO 2000
Flag question
c. SELECT location_id FROM departments WHERE location_id IN 1000 AND 2000
d. SELECT location_id FROM departments WHERE location_id BETWEEN 1000 AND 2000

Question 20
Question text
Complete
What willout
Mark 2.00 beofthe SQL command if every employee will be given a productivity bonus which is equivalent to
2.00
3% of the monthly salary?
Display the employee id, salary and the productivity bonus.
Select one:

a. SELECT employee_id, salary, salary + (salary .03) FROM employees


Flag question
b. SELECT employee_id, salary, salary * .03 FROM employees
c. SELECT employee_id, salary, salary * 1.03 FROM employees
d. SELECT employee_id, salary FROM employees WHERE salary)
e. SELECT employee_id, salary, salary * .30 FROM employees

Question 21

Downloaded by Joseph Lapso ([email protected])


Complete
Mark 2.00 out of 2.00

Flag question
Question text
Display the employee id, salary, number of years and the hiring date of every employee in the company.
Select one:

SELECT employee_id,salary, hire_date, hire_date- SYSDATE /365 FROM employees;


SELECT employee_id, salary, hire_date, ROUND((SYSDATE - hire_date) /365,0) FROM
employees;

c. SELECT employee_id, salary, hire_date, hire_date /365 FROM employees;

Question 22
Complete
Mark 2.00 out of 2.00

Flag question
Question text
Display the employee's name, job title, job_id and the department name of employees with department id of 100.
Select one:

a. SELECT E.employee_id, J.job_title, e.job_id, D.department_name


FROM employees E
JOIN jobs J ON E.job_id = J.job_id
JOIN departments D ON E.department_id = D.department_id WHERE E.department_id = 100

b. SELECT E.employee_id, J.job_title, e.job_id, D.department_name


FROM employees E
JOIN department D ON E.job_id = J.job_id
JOIN jobs J ON E.department_id = D.department_id WHERE E.department_id = 100

c. SELECT E.employee_id, J.job_title, e.job_id, D.department_name


FROM jobs J
INNER JOIN department D ON E.job_id = J.job_id
INNER JOIN employees EON E.department_id = D.department_id WHERE E.department_id = 100

Downloaded by Joseph Lapso ([email protected])


d. SELECT E.employee_id, J.job_title, e.job_id, D.department_name
FROM jobs J
NATURAL JOIN department D ON E.job_id = J.job_id
NATURAL JOIN employees E ON E.department_id = D.department_id WHERE E.department_id = 100

Question 23
Question text
Complete
InMark
creating Joins,the
2.00 out of 2.00 NATURALJOIN and USING clauses are

Select one:

a. Mutually Inclusive
b. Limited to 2 relational tables
Flag question
c. Opposite
d. Mutually Exclusive

Question 24
Complete
Mark 4.00 out of 4.00

Flag question
Question text
Display employee id, lastname, firstname, department name, annual salary, location id of employees whose location id is 1700 and w
Sort the output in from highest to lowest salary. (4 POINTS)
Select one:

a. SELECT E.employee_id, E.last_name, E.first_name, D.department_name, E.salary*12 AS


"ANNUAL SALARY", D.location_id FROM employees E
NATURAL JOIN jobs J ON E.job_id = J.job_id
NATURAL JOIN departments D ON E.department_id = D.department_id ORDER BY "ANNUAL SALARY" DESC
WHERE D.location_id = 1700 AND D.department_name = 'Finance'

Downloaded by Joseph Lapso ([email protected])


b. SELECT E.employee_id, E.last_name, E.first_name, D.department_name, E.salary*12 AS
"ANNUAL SALARY", D.location_id FROM employees E
JOIN jobs J ON E.job_id = J.job_id
JOINemployees E ON E.department_id = D.department_id WHERE D.location_id = 1700 AND D.department_name = 'Finance' O

c. SELECT E.employee_id, E.last_name, E.first_name, D.department_name, E.salary*12 AS


"ANNUAL SALARY", D.location_id FROM employees E
JOIN jobs J ON E.job_id = J.job_id
JOIN departments D ON E.department_id = D.department_id WHERE D.location_id = 1700 AND D.department_name = 'Finance

d. SELECT E.employee_id, E.last_name, E.first_name, D.department_name, E.salary*12 AS


"ANNUAL SALARY", D.location_id FROM employees E
OUTER JOIN jobs J ON E.job_id = J.job_id
OUTER JOIN departments D ON E.department_id = D.department_id WHERE D.location_id = 1700 AND D.department_name =

PROG-113A / ? Week 7: Manipulate Data / ? Short Quiz 7

9/10

Create a SQL command to update the employees

table Employee id : 200

Name : Mr. Gary Park

Date hired : July 1, 2017

Position :IT

Programmer Salary :

10000

Department of assignment : 60

Reporting to manager : 103

answer: INSERT INTO employees


(employee_id,first_name,last_name,hire_date,job_id,salary,manager_id,department_id)
VALUES (200,'Gary','Park',TO_DATE('Jul 1, 2017', 'MON DD, YYYY'), 'IT_PROG', 10000, 103, 60)

Add a 500 pesos increase in salary of all employees who have rendered services 10 years and above.

answer: UPDATE employees SET salary = salary + 500 where TO_CHAR(sysdate,'YYYY') -


TO_CHAR(hire_date,'YYYY') >= 10

Downloaded by Joseph Lapso ([email protected])


Diana Lorentz was transferred to Administration department. Using the employees and department
table information update the profile of employee.

answer: UPDATE employees SET manager_id = 200, department_id = 10 WHERE last_name =


'Lorentz' AND first_name = 'Diana';

Create a SQL command to add a new position Java Developer with job id of JAVA_DEV whose salary
ranges from 7,000 to 8,000.

answer: INSERT INTO jobs VALUES ('JAVA_DEV', 'Java Developer', 7000, 8000)

Update the Treasury department to Cash department. And this will be managed by the Manager of
Finance department.

answer: UPDATE departments SET department_name = 'Procurement', manager_id = 100


WHERE department_name = 'Treasury'

Which of the following will erase all records in the departments table

answer: TRUNCATE TABLE departments

Nathaniel had accidentally deleted all the records in the newly updated ORACLE database using the
DELETE SQL command. What is the best solution that he can do to restore all the deleted records in the
database.

answer: Run the ROLLBACK command

Which of the following DOES NOT describes the state of the data after the COMMIT command

answer: None of the choices

Which of the following describes the command below?

SELECT * FROM employees WHERE department = 60 FOR UPDATE

answer: Locks the rows in the EMPLOYEES table with department id is

60. SQL command to create a marker in the current transaction.

answer: SAVEPOINT

YOu want to display the employee's id and formatted date hired as shown below

Which SQL statement give the required output?

Required output:

Answer: SELECT employee_id,TO_CHAR(hire_date,'fmMonth DD, YYYY')AS "Hired Date" FROM


employees

You want to display all the employee id and the month an employee was hired excluding employees
whose job id is AD_VP. Which SQL Statement give the required output?

Downloaded by Joseph Lapso ([email protected])


Answer: SELECT employee_id, hire_date, TO_DATE(hire_date,'Month') AS "Hired Month",
job_id FROM employees WHERE job_id NOT = 'AD_VP';

IT_PROG

Answer: SELECT last_name, TO_CHAR(hire_date,'YYYY')FROM employees WHERE job_id='IT_PROG';

You want to display the employee’s last name whose salary is below 10,000 and whose lastname starts
with letter K.

Answer: SELECT last_name, TO_CHAR(salary, '$999,999.99') AS "MONTHLY SALARY" FROM


employees WHERE salary < 10000WHERE last_name LIKE ‘K%’

You want to display the employee's last name and date hired in year 2002 whose salary is above 5000.

Answer: SELECT last_name, hire_date FROM employees WHERE hire_date >= TO_DATE('01-
Jan-2002', 'DD-Mon-RR') AND hire_date <= TO_DATE('31-Dec-2002', 'DD-Mon-RR') AND
salary
> 5000;

Display all the records sorted by price from most expensive to the cheapest parts.

Answer: SELECT * FROM parts ORDER BY price

Display all the records whose stock is below 20 and in warehouse number 3.

Answer: SELECT * FROM parts WHERE onhand< 20 AND warehouse = 3;

Display part number description and warehouse number whose part number starts with letter K.

Answer: SELECT partnum, description, warehouse FROM parts WHERE partnum LIKE 'K%';

Display the part number whose class is not HW, AG or SG.

Answer: None of the choices

Roonie is the stockman in the warehouse of ATR Corporation. The General Manager wants to know the
parts whose price is above 10000 and above.

ANSWER: SELECT *FROM parts WHERE price > 10000;

Which of the following SQL command will display all records with class code of AP?

Answer: SELECT * FROM parts WHERE class = ‘AP’;

Which of the following SQL commands will display all stocks whole class is HW or AP.

Answer: SELECT ALL FROM parts WHERE IN class = ('HW','AP');

Which of the following SQL commands will display all the stocks on hand from 10 to 30?

Answer: SELECT * FROM parts WHERE onhand BETWEEN 10 AND 30;


Create an SQL command to display the name of the parts, warehouse number, price and the available stock
on hand whose price is below 500. Arrange the list by warehouse number and by class.

Downloaded by Joseph Lapso ([email protected])


ANswer: SELECT partnum, description, warehouse, onhand, price FROM parts WHERE price <
500 ORDER BY warehouse, class;

Which of the following SELECT statement is the correctreport that will combine the column PARTNUM
and description put a literal character string "belongs to" in between the two columns then rename the
column as "NUMBER TITLE"

Answer: SELECT (PARTNUM ll' THAT BELONGS TO' ll DESCRIPTION) AS "NUMBER TITLE" FROM PARTS;
Which of the following SELECT statement is the correct report that will deduct 5 from ONHAND, multiply 5 in
WAREHOUSE, after getting the value on both ONHAND and WAREHOUSE add their data: as shown below:
ONHAND - 5 + 5 * WAREHOUSE
Note that you have to force the Oracle to prioritize first the Subtraction over Multiplication. List only the
column DESCRIPTION, ONHAND and WAREHOUSE.

Answer: SELECT ONHAND-5 + 5 (* WAREHOUSE), DESCRIPTION FROM PARTS;

Which of the following is the correct report that will display the class from table PARTS.

answer: SELECT CLASS FROM PARTS;


Which of the following SELECT statement is the correct PL/SQL that willcreate a report that will add 10%
increase in PRICE? List only the column DESCRIPTION, CLASS and PRICE.

Answer: SELECT PRICE*0.10, DESCRIPTION, CLASS FROM PARTS;

Which of the following SELECT statement is the correct PL/SQL that will display all rows and columns?

Answer: SELECT * FROM PARTS;


Which of the following SELECT statement is the correct PL/SQL that willcreate a report specifying only the
column PRICE, ONHAND and DESCRIPTION?

Answer: SELECT PRICE, ONHAND, DESCRIPTION FROM PARTS;

Which of the following Select statement is the correct report that will display the unique value for
WAREHOUSE renames the column as "No. of Available Warehouse"

Answer: SELECT DISTINCT WAREHOUSE AS "No. of available warehouse"FROM PARTS;


Which of the following SELECT statement is the correctreport the will merge the column CLASS and PRICE
rename the COLUMN as "CLASS PRICE"

Answer: SELECT (CLASS||PRICE) AS "CLASS PRICE" FROM PARTS;


Which of the following SELECT statement is the correct PL/SQL that will display eliminate the duplicate
rows for column class and warehouse.

Answer: SELECT DISTINCT CLASS, WAREHOUSE FROM PARTS;

Which of the following select statement is the correct report that will rename the column description to
title,partnum to id and onhand to stock?

Answer: Select description AS 'TITLE',Partnum AS'ID',ONHAND AS'STOCK' FROM PARTS;

Downloaded by Joseph Lapso ([email protected])


Remove all manager positions in the department table.

Answer: DELETE FROM jobs WHERE job_title LIKE '%Manager%';

A new department name training with department id 300 was created in the company.

Answer: INSERT INTO departments VALUES(300,'TRAINING',203,2400)

Create a SQL command to add a new position database administrator with job id of DB_ADMIN whose
salary ranges from 10,000 to 18,000

Answer: INSERT INTO JOBS VALUES('DB_ADMIN','database administrator',10000,18000)


Update the Purchasing department name to Procurement. And this will be managed by the Manager of
Administration department.

Answer: UPDATE departments SET department_name = 'Procurement', manager_id = 200


WHERE department_name = 'Purchasing'

remove the shareholder services department in the department table

answer: DELETE FROM departments WHERE department_name = ‘Shareholder Services’

John want to know how many employees receiving salary below 10,000

Answer: SELECT COUNT(*) FROM employees WHERE salary < 10000;

What is the SQL command to display the date of the first employee that was hired?

Answer: SELECT MIN(hire_date) FROM employees;

Aldrin wants to know the highest salary in every department. which of the following sql will display the
required output?

Answer: SELECT department_id,MAX(SALARY) FROM employees GROUP BY department_id

The general manager request to the database administrator to generate the total salary per month of
every department in the company.

Answer: SELECT department_id, SUM(salary) FROM employees GROUP BY department_id

Ms. Ella what to generate the average salary of all employees whose job function is

IT_PROG. Answer: SELECT AVG(salary) FROM employees WHERE job_id ='IT_PROG';


Display the warehouse number, class, highest price & lowest price, total on hand balance whose class is AP.

Answer: SELECT warehouse, class, MAX(price), MIN(PRICE), sum(onhand)


FROM parts
WHERE class = 'AP'
GROUP BY warehouse, class
ORDER BY warehouse

Downloaded by Joseph Lapso ([email protected])


The General Manager request to the database administrator to general total number of parts and total
outstanding balance on hand of every class

Answer: SELECT warehouse,class,count(partnum),sum(onhand) GROUP BY warehouse,class HAVING


warehouse = 1 or warehouse = 2 FROM parts;

Aldrin wants to know the outstanding total balance on hand on every class per warehouse

answer: SELECT warehouse,class,sum(onhand) FROM parts GROUP BY warehouse,class

Which of the following SQL command will display all records with part number contains the number 9?

Answer: SELECT * from parts WHERE partnum LIKe '%9%'

Which of the following SQL command will display the summary table showing the total quantity on hand
per class.

Answer: SELECT class, sum(onhand) AS "QTY ON HAND" FROM parts GROUP BY class

Display a summary table of the total quantity on hand above 50 very class per warehouse

Answer: SELECT warehouse, class, sum(onhand) FROM parts GROUP BY warehouse,class


HAVING SUM(ONHAND) > 50

There was 10% price increase in the all the parts in warehouse number 3.

Answer: SELECT PARTNUM,price,price * 1.1 FROM parts where warehouse = 3

SELECT * FROM parts WHERE (warehouse = 1 or warehouse = 2) AND class in ('HW','AP')AND(PRICE>200


AND price < 500);

Answer: 2 rows returned

What will be the output of the SQL command?

SELECT SUM(onhand) FROM PARTS where class = 'HW' OR class = 'AP' and warehouse = 1;

answer: 137

John want to know how many part items are there in warehouse number 3.

answer: SELECT COUNT(*) FROM parts WHERE warehouse = 3;

Which of the following will erase all records in the departments table

Answer: TRUNCATE TABLE departments


INSERT, DELETE, UPDATE are commands

answer: DML

Which of the following DOES NOT describes the state of the data after the commit command

ANswer: NONE OF THE CHOICES

SELECT * FROM employees WHERE department = 60 FOR UPDATE

Downloaded by Joseph Lapso ([email protected])


ANswer: Locks the rows in the employees table with department id is 60

A cartesian product is formed when

Answer: ALL OF THE CHOICES

Select employee_id, hire_date, department_name FROM employees departments

ANswer: The SQL command will prduce a correct output

Nathaniel had accidentally deleted all the records in the newly updated oracle database using the
DELETE SQL command.

Answer: RUN THE ROLLBACK COMMAND


A join between two tables that returns the results of the INNER join as well as the
rows from the left (or right) table is called a left (or right) OUTER join.

Answer: Unmatched

SQL command to create a marker in the current

transaction Answer: SAVEPOINT

The insert statement can add multiple

rows. ANswer: FALSE

INSERT INTO table_name (column1,column2,colum3,...)

VALUES (value1,value2,value3,...)

WHERE Condition.

Answer: This will produce an error.

A join between two tables that returns the results of an INNER join as well as the results of a left and
right join is a

Answer: FULL OUTER JOIN


A Database Administrator can create and remove users and tables.

Answer: the statement is correct

Multiple fields in not Allowed in a foreign

key. Answer: FALSE


A consists of a collection of DML statements that form a logical unit of work.

ANswer: Transaction

INDEX Object
Answer: is an example of

Downloaded by Joseph Lapso ([email protected])


A FOREIGN KEY IS A FIELD IN ONE TABLE THAT REFERS TO THE PRIMARY KEY IN ANOTHER TABLE.

ANSWER: TRUE

GRANT select

ON user1

TO departments;

ANswer: THE SQL COMMAND IS INCORRECT

GRANT isDCL
ANSWER: a

Which of the following command will delete all records in the table employees.

ANswer: DELETE FROM

employees employee id :250

name : aldrin rich

ANSWER: INSERT INTO EMPLOYEES(employee_id,first_name,last_name,hire_date,job_id,salary


manager_id,department_id) VALUES(250,'aldrin','rich',TO_DATE('Jul 1,2017','MON
DD,YYYY'),'ACCOUNTANT',10000,103,60)

Display all the employee id names of employees, job id, hiring_date

ANswer: SELECT A,first_name,A.last_name,A.job_id,B,department_name,A.Salary,A.hire_date FROM


employees a JOIN departments B ON ( A.department_id = B.department_id) WHERE
B.department_name = 'IT'

Update all minumum salary of the it programmer position with twice of the existing minumum salary the
position.

answer: UPDATE from jobs SET min_salary = min_salary * 2 WHERE job_id = 'IT_PROG';

Add a 1200 increase in salary of all employees who have rendered services 10 years and above

ANswer: UPDATE employees SET salary = salary + 1200 where TO_CHAR(sysdate,'YYYY') -


TO_CHAR(hire_date,'YYYY') >= 10

Diana lorentz was transferred to administration department

Answer: UPDATE employees SET manager_id = 200, department_id = 10 WHERE last_name = 'Lorentz'
AND first_NAME = 'Diana';

Angelica is the Oracle Database Administrator. She was been assigned to create an access for the newly hired
employee named Matt to the Oracle Database.
Which of the following SQL command Angelica will execute?

Downloaded by Joseph Lapso ([email protected])


-CREATE matt ACCESS 1234
What are the 2 types of security being applied to a database
GRANT & REVOKE

-INSERT
EmployeeINTO employees
id : 200
(employee_id,first_name,last_name,hire_date,job_id,salary,manager_id,department_id)
Name : Mr. Gary Park
VALUES (200,'Gary','Park',TO_DATE('Jul 1, 2017', 'MON DD, YYYY'), 'IT_PROG', 10000, 103, 60)
Date hired : July 1, 2017
Which of the following is NOT a Data Manipulation Language?
Position :IT Programmer
-SELECT
Salary : 10000
SQL stands for
Department Structured
of assignment : 60 Query Language
Reporting
Which to manager
of the : 103
following is an Oracle Proprietary Commands ANSI SQL
ANSI SQL commands cannot be abbreviated. FALSE
Display all employees id and remainder of the his/her salary after it is divided by 3,000 for all
employees with the job id of IT_PROG.
a. SELECT employee_id, job_id, salary FROM employees WHERE job_id = 'IT_PROG' AND
salary/3000

Downloaded by Joseph Lapso ([email protected])

You might also like