Programmer Analyst Knowledge Exam
___________________________________________
Instructions: mark the correct answer.
Java
1- What description do you think best defines the concept of 'class' in programming?
object-oriented?
It is a concept similar to that of 'array'.
It is a particular type of variable
It is a model or template from which we create objects.
It is a category of data ordered sequentially
2- What elements do you think define an object?
Its cardinality and its type
Its attributes and its methods
The way you establish communication and exchange messages
Its interface and the associated events
3- Which of the following codes is related to inheritance?
public class Component extends Product
public class Component inherits Product
public class Component implements Product
public class Component belongs to Product
4- What does it mean to instantiate a class?
Duplicate a class
Delete a class
Create an object from the class
Connect two classes to each other
5- In Java, what are we referring to when we talk about 'Swing'?
A function used to swap values
It is the nickname of version 1.3 of the JDK.
A specific framework for Android
A library to build graphical interfaces
6- What is Eclipse?
A Java library
A special version of Java for servers
An IDE for developing applications
None of the above
1
7- What is bytecode in Java?
The data exchange format
The format we obtain after compiling a .java source
A type of variable
A code debugger
8- What code would you associate with an Interface in Java?
public class Component interface Product
Component cp = new Component(interface)
public class Component implements Printable
Component cp = new Component.interface
9- What does it mean to overload a method?
Edit it to modify its behavior
Change its name while keeping the same functionality
Create a method with the same name but different arguments
Add functionalities to a method
10- What is an exception?
An error that a method throws when something goes wrong
An object that cannot be instantiated
A loop that does not end
A type of event widely used when creating interfaces
HTML / CSS
1 - What is the specific standard language for applying presentation styles to our
web pages?
Javascript
Flash
CSS
2 - What is XHTML?
The adaptation of the HTML standard according to XML rules
It is dynamic HTML
It is what is known as the generic family of the different versions of HTML.
2
3 - What do you think is the best way to apply styles to a web page?
Include the styles in the HTML tags so that they load and execute first
Include them in an external file linked to that HTML file
Include them in the header section ('head') to group them in the same place in the
same page
4 - Why is it advisable to include the DOCTYPE declaration in the HTML page?
If the browser is not included, it cannot render (display) the page
To prevent the browser from entering 'Quirk Mode' and interpreting/displaying it incorrectly
To indicate whether Flash has been used or not
5 - What is the purpose of the 'class' attribute?
To classify the type of link ('a') that we are defining: 'internal' jump, link
the page on the same domain or to an external website
It is specific to indicate the font color we want to apply, for example: p
class="red" would present the letters in red from that paragraph
To apply certain styles to elements that have the same class, it is
say, the same value in that attribute.
6 - What function does the 'div' element have?
It is a dividing element, and it makes the browser display a horizontal line of
separation (for example between sections of the page)
It is a container. It creates blocks, for example to differentiate between different sections of
a page (header, footer, columns..)
Allows performing an arithmetic division operation on the numerical values of
a table (it also uses 'sum' and 'dif' for addition and subtraction)
7 - What is wrong with this style rule?: .cuadro { border: 1px blue dotted padding: 10px
5px; }
A ';' (semicolon) is missing at the end of the 'border' style declaration.
there is a missing ',' (comma) between the two values of the padding property (10px 5px)
You cannot place a '.' (dot) at the beginning of a statement (before the word
frame
8 - What does it mean for a tag/element to be 'deprecated' in HTML4?
That if we use it, they will not understand it (and it will not be displayed well) the versions
more modern browsers
Which is no longer part of the specifications of version 4 of the HTML standard.
What has that element been renamed in version 4 of HTML?
3
9 - If we include a tag of this type in our HTML page, what do we want it to
make the browser?: <img src="../icono.gif" />
that includes the image 'icono.gif' which is located in the parent directory of the
folder where our HTML page is
that includes the image 'icono.gif' that is located in the same folder where it is
our HTML page
that includes the image 'icono.gif' located in the 'img' directory
10 - How do we include our comment in an HTML page so that it does not
interpret by the browser?
***comment about the***
code***
With 3 bars at the beginning and end of the comment. For example: ///comment about the
code///
With the opening tag ' at the beginning and end of the comment. Ex: <!--comment
about the code-->
Ajax
1- The necessary object to create a connection using AJAX is:
httpRequest
AJAXRequest
XMLHttpRequest
2- To indicate whether an AJAX connection is synchronous or asynchronous:
We include a third parameter in the call to the open() method of the connection.
We added a third parameter to the crearConexion() method of the AJAX connection.
We added a third parameter to the send() method of the AJAX connection.
We use the sendSynchronous or sendAsynchronous methods of the object that
store the connection
3- AJAX means:
Automatic Java Auto-installed eXtension
Asynchronous Java and XML
Asynchronous JavaScript and XML
Automatic Javascript and XML
4
4- The type property of the object used for an AJAX call with jQuery:
It allows you to specify whether the connection is synchronous or asynchronous.
It allows indicating the format of the data we wish to obtain from the server.
It allows to indicate whether data is sent to the server or not.
It allows to indicate whether a connection will be made using the GET method or the
POST method
5- The use of any JavaScript framework (workspace or library):
It should be avoided if we want to create websites compatible with most
browsers
It does not affect the usability of our site regarding compatibility between
browsers
It is a highly recommended option, especially because it solves many for us.
browser compatibility issues
6- If we use non-intrusive Javascript techniques:
We will include the Javascript code inside the CSS files to keep it minimal.
number of inclusions in the HTML file
We will include our Javascript code in external files in which even
there will be the assignment of events
We will not be able to include any <script> tag in our code.
7- The correct way to store information in a Javascript variable in format
JSON is:
var variable=this.responseText;
var variable=this.responseXML;
var variable=eval( " ( " + this.responseText+ " ) " );
8- All browsers use the XMLHttpRequest object to create AJAX connections
True
False
9- By default, browsers do not allow connections to be made via
AJAX to servers different from the one that sent us the web page. This is due to:
For security reasons: to avoid controlling pages through Javascript.
other servers located
For technical reasons: a browser would not be able to connect to a different server.
For usability reasons: the user would have to type many URLs for the
the browser loads
5
PHP
1- Where is the PHP code executed?
Server
Client (own computer)
2- Which of these are tags for inserting PHP code into HTML pages?
<?y?>
< php >< /php >
<# y #>
3- In which attribute of a form do we specify the page to which the data will be sent?
data from it?
name
file
action
description
4- Which of these instructions is correctly written in PHP?
if (a=0) print a
if (a==0) echo "hello world";
if (a==0) { echo ok }
if (a==0): print a;
5- Which of these PHP instructions will correctly print the message on screen?
**Hello World**
print <strong>Hello World</strong>;
print (<strong>Hello World</strong>);
<strong>Hello World</strong>
6- Two of the ways to pass parameters between PHP pages are:
Require and Include
Get and Put
Post and Get
Into e Include
6
7- Which of these instructions is used to query a database
MySQL?
mysql_query
mysql_access
mysql_db_access
8- An array is...
A set of alphanumeric characters
A system to convert a text variable into a number
A set of elements
9- How do you define a string type variable in PHP?
char str;
string str;
In PHP, the type of variables is not explicitly defined.
$a="10"; $b=$a + 2; What will be the value of $b?
12
12
102
None (you cannot add a number to a string)
11- What is the purpose of the following code?: if (isset($variable)){}
Iterate over an array named $variable
Create a variable named "$variable"
Check if the variable "$variable" is defined and has a non-null value
None of the above
Answer the following questions:
Visual .Net
.NET supports multiple languages?
What is ASP .NET?
What are page directives? Can you provide concrete examples?
7
When is it advisable to use an IoC container?
When and how can an interface be used?
What is a static class and when should it be used?
What is the purpose of the Finalize method?