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

QUIZ #3: IDENTIFICATION. Write Your Answer in A Clean Short Bond Paper

This document contains a quiz with identification questions and a research question about programming languages. [1] James Gosling and Patrick Naugthon led the development of Java. [2] The original name of Java was Oak. [3] Small applications run within other applications are called applets in Java.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
36 views

QUIZ #3: IDENTIFICATION. Write Your Answer in A Clean Short Bond Paper

This document contains a quiz with identification questions and a research question about programming languages. [1] James Gosling and Patrick Naugthon led the development of Java. [2] The original name of Java was Oak. [3] Small applications run within other applications are called applets in Java.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 9

QUIZ #3:

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

1. Who lead the development of Java Programming language?

 Patrick Naugthon and James Gosling.

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

 Oak

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

 Applets

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

 Garbage Collected

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

 Portable and Platform-Independent

RESEARCH

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

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

1. Python - is an object-oriented programming language that is designed in C. By nature, it


is a high-level programming language that allows for the creation of both simple as well
as complex operations. Along with this Python comes inbuilt with a wide array of
modules as well as libraries which allows it to support many different programming
languages like Java, C, C++, and JSON.

Features of Python
As a programming language, the features of Python brought to the table are many. Some
of the most significant features of Python are

 Easy to Code
Python is a very developer-friendly language which means that anyone and
everyone can learn to code it in a couple of hours or days. As compared to other
object-oriented programming languages like Java, C, C++, and C#, Python is one of
the easiest to learn.

 Open Source and Free


Python is an open-source programming language which means that anyone
can create and contribute to its development. Python has an online forum where
thousands of coders gather daily to improve this language further. Along with this
Python is free to download and use in any operating system, be it Windows, Mac or
Linux.

 Support for GUI


GUI or Graphical User Interface is one of the key aspects of any programming
language because it has the ability to add flair to code and make the results more
visual. Python has support for a wide array of GUIs which can easily be imported to
the interpreter, thus making this one of the most favorite languages for developers.

 Object-Oriented Approach
One of the key aspects of Python is its object-oriented approach. This
basically means that Python recognizes the concept of class and object encapsulation
thus allowing programs to be efficient in the long run.

 High-Level Language
Python has been designed to be a high-level programming language, which
means that when you code in Python you don’t need to be aware of the coding
structure, architecture as well as memory management.

 Integrated by Nature
Python is an integrated language by nature. This means that the python
interpreter executes codes one line at a time. Unlike other object-oriented
programming languages, we don’t need to compile Python code thus making the
debugging process much easier and efficient. Another advantage of this is, that upon
execution the Python code is immediately converted into an intermediate form also
known as byte-code which makes it easier to execute and also saves runtime in the
long run.

 Highly Portable
Suppose you are running Python on Windows and you need to shift the same
to either a Mac or a Linux system, then you can easily achieve the same in Python
without having to worry about changing the code. This is not possible in other
programming languages, thus making Python one of the most portable languages
available in the industry.
 Highly Dynamic
As mentioned in an earlier paragraph, Python is one of the most dynamic
languages available in the industry today. What this basically means is that the type
of a variable is decided at the run time and not in advance. Due to the presence of this
feature, we do not need to specify the type of the variable during coding, thus saving
time and increasing efficiency.

 Extensive Array of Library


Out of the box, Python comes inbuilt with a large number of libraries that can
be imported at any instance and be used in a specific program. The presence of
libraries also makes sure that you don’t need to write all the code yourself and can
import the same from those that already exist in the libraries.

 Support for Other Languages


Being coded in C, Python by default supports the execution of code written in
other programming languages such as Java, C, and C#, thus making it one of the
versatile in the industry.

2. Fortran is a general-purpose, compiled imperative programming language that is especially


suited to numeric computation and scientific computing. Fortran was originally developed by
IBM in the 1950s for scientific and engineering applications, and subsequently came to dominate
scientific computing.

Features of Fortran

 Free Format on Source Code


In Fortran 90, you can use either the Fortran 77 input format or
free format. If you use free format, the file extension .f90 should be used
for the file name.

 Dynamic Allocation and Pointers.


It is now possible to allocate storage dynamically. This enables us
to finally get rid of all the "work" arrays!

 User Defined Data Types.


You can now define your own composite data types, similar to
struct in C or record in Pascal.

 Modules.
Modules enables you to program in an object oriented style,
similar to C++. Modules can also be used to hide global variables, thereby
making the Fortran 77 common construct outdated.

 Built-in Array Operations.


Statements like A=0 and C=A+B are now valid when A and B are
arrays. There are also built-in functions for matrix operations, e.g., matmul
for performing matrix multiplication.

 Operator Overloading.
You can define your own meaning of operators like + and = for
your own data types (objects).

3. PHP - is known as a general-purpose scripting language that can be used to develop dynamic
and interactive websites.

PHP Features
PHP is very popular language because of its simplicity and open source. There are
some important features of PHP given below:

 Performance
PHP script is executed much faster than those scripts which are written
in other languages such as JSP and ASP. PHP uses its own memory, so the
server workload and loading time is automatically reduced, which results in
faster processing speed and better performance.

 Open Source
PHP source code and software are freely available on the web. You
can develop all the versions of PHP according to your requirement without
paying any cost. All its components are free to download and use.

 Familiarity with Syntax


PHP has easily understandable syntax. Programmers are comfortable
coding with it.

 Embedded
PHP code can be easily embedded within HTML tags and script.

 Platform Independent
PHP is available for WINDOWS, MAC, LINUX & UNIX operating
system. A PHP application developed in one OS can be easily executed in
other OS also.

 Database Support
PHP supports all the leading databases such as MySQL, SQLite,
ODBC, etc.

 Error Reporting –
PHP has predefined error reporting constants to generate an error
notice or warning at runtime. E.g., E_ERROR, E_WARNING, E_STRICT,
E_PARSE.

 Loosely Typed Language


PHP allows us to use a variable without declaring its datatype. It will
be taken automatically at the time of execution based on the type of data it
contains on its value.
 Web Servers Support
PHP is compatible with almost all local servers used today like
Apache, Netscape, Microsoft IIS, etc.

 Security
PHP is a secure language to develop the website. It consists of
multiple layers of security to prevent threads and malicious attacks.

 Control
Different programming languages require long script or code, whereas
PHP can do the same work in a few lines of code. It has maximum control
over the websites like you can make changes easily whenever you want.

 A Helpful PHP Community


It has a large community of developers who regularly updates
documentation, tutorials, online help, and FAQs. Learning PHP from the
communities is one of the significant benefits.

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

Features of Ruby

 Object Oriented
Ruby is purely object oriented programming language. Each and every
value is an object. Every object has a class and every class has a super class.
Every code has their properties and actions. Ruby is influenced with Smalltalk
language. Rules applying to objects applies to the entire Ruby.

 Flexibility
Ruby is a flexible language as you can easily remove, redefine or add
existing parts to it. It allows its users to freely alter its parts as they wish.

 Mixins
Ruby has a feature of single inheritance only. Ruby has classes as well as
modules. A module has methods but no instances. Instead, a module can be mixed
into a class, which adds the method of that module to the class. It is similar to
inheritance but much more flexible.

 Visual Appearance
Ruby generally prefers English keyword and some punctuation is used to
decorate Ruby. It doesn't need variable declaration.

 Dynamic Typing and Duck typing


Ruby is a dynamic programming language. Ruby programs are not
compiled. All class, module and method definition are built by the code when it
run.

 Ruby Variables
Ruby variables are loosely typed language, which means any variable can
hold any type of object. When a method is called on an object, Ruby only looks
up at the name irrespective of the type of object. This is duck typing. It allows you
to make classes that pretend to be other classes.

 Variable Constant
In Ruby, constants are not really constant. If an already initialized constant
will be modified in a script, it will simply trigger a warning but will not halt your
program.

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

Features of Delphi

 Readable Code
Delphi is a simple high level language compared to the complexity
of code used with other high level programming languages. Its syntax is
very clear and easy to read even by non-technical developers

 Drag and Drop Mechanism


Delphi programming is very effective for GUI implementation,
because of its drag and drop feature. GUI creates attractive UI. This it
provides the event driven feature to be used and tested in real time.

 Hassle free Maintenance


Delphi’s inexpensive maintenance cost of apps, software or web
application makes it attractive to developers.

 Object Oriented Programming (OOP)


Delphi fully supports OOPS features because of its high level
programming language called Object Pascal within cross-platform native
app development.

 SQL databases and Window API


Delphi provides facility of integration to BI software such as
MYSQL and Oracle databases. Modification and compatibility of Delphi
with Windows API make it even more attractive to developers.
3. Enumerate the different Java literals and Data types.

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

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

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

 Primitive data types - includes byte, short, int, long, float, double, boolean and char
 Non-primitive data types - such as String, Arrays and Classes (you will learn more
about these in a later chapter)

Name: Ferreras, Welfredo Jr. A. Subject: Computer Programming 1


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

QUIZ #4:

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

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


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

1. Java - A high-level programming language developed by Sun Microsystem led by James


Gosling.
2. Statement - is one or more lines of code terminated by a semicolon.
3. Block Statement - It is formed by enclosing statements by curly braces.
4. Reference Variables - Type of variable that stores the address in the memory location.
5. Primitive Variables - type of variable which stores data in the actual memory location where
variable is.

III. PROGRAM TRACING

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

public class SampleJavaOutput


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

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

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

1. Arithmetic Operators
These operators involve the mathematical operators that can be used to perform various simple or
advance arithmetic operations on the primitive data types referred to as the operands. These operators
consist of various unary and binary operators that can be applied on a single or two operands
respectively.

Assignment Operators in Java


These operators are used to assign values to a variable. The left side operand of the assignment operator
is a variable and the right side operand of the assignment operator is a value. The value on the right side
must be of the same data-type of the operand on the left side otherwise the compiler will raise an error.
This means that the assignment operators have right to left associativity, i.e value given on the right-
hand side of the operator is assigned to the variable on the left and therefore right-hand side value must
be declared before using it or should be a constant.

Logical Operators
These operators are used to perform logical “AND”, “OR” and “NOT” operation, i.e. the function
similar to AND gate and OR gate in digital electronics. They are used to combine two or more
conditions/constraints or to complement the evaluation of the original condition under particular
consideration. One thing to keep in mind is the second condition is not evaluated if the first one is false,
i.e. it has a short-circuiting effect. Used extensively to test for several conditions for making a decision.

You might also like