Questões de Programação da banca EXATUS
Todas com comentário da IA
Veja como a banca EXATUS cobra Programação em suas provas. Esta página reúne as questões de Programação aplicadas por essa banca em provas anteriores, todas comentadas pela IA, para você treinar no formato e no nível de dificuldade dessa combinação.
Questão 2ProgramaçãoEXATUS2015
Quanto as exceções em Java, ao analisar o
código abaixo podemos afirmar que:
public class BancoDados {
private static Connection conexao;
public static Connection getConexao() {
try {
if (conexao == null) {
Class.forName("org.firebirdsql.jdbc.FBDriver");
conexao =
DriverManager.getConnection("jdbc:firebirdsql://12
7.0.0.1:3050/C:/Banco.fdb", "SYSDBA",
"masterkey");
}
return conexao;
} catch (ClassNotFoundException e) {
JOptionPane.showMessageDialog(null,
"Mensagem A");
} catch (SQLException e) {
JOptionPane.showMessageDialog(null,
"Mensagem B");
}
return null;
}
}
Questão 3ProgramaçãoEXATUS2015
O texto abaixo afirma que:
“Developers seem to agree that one of the most
important qualities of code is its readability. Code
that's written in a way that makes it easy for other
programmers to understand with a minimal amount
of time and effort is considered top notch.
“I feel that if I can't understand the author's intent
in 5 minutes or less, the coder did a bad job," said
Luke Burnham, a senior software engineer at
Lionbridge. “The computer doesn't care about
variable names or line spacing but people do. Code
is written once but read hundreds of times over its
lifetime. Using meaningful variable names and
injecting spaces in order to increase the readability
of the code will make code better."
An anonymous senior web application developer
with more than a decade of professional
programming experience also recommended to me
that writing good code means, “Following a
consistent coding style (proper spacing,
indentation, general flow)." He also emphasized
the importance of choosing “Variable names that
make sense."
“Wrap Early, Wrap Often," is the personal policy of
Neil Best, a senior application developer at Gogo.
“This may be a personal preference / style thing,
but I go for tall over wide, not to inflate my line
counts but actually to increase legibility," he told
me. “If a function has two arguments put them on
two new lines. If an arithmetic expression has
many terms give them each their own line. Your
interpreter may require you to use trailing
operators (RTFM) but it's worth it."
In short, more readable equals more
understandable which makes everyone's life
easier.
“The faster someone can look at it and understand
it. The faster the application will move forward
(feature and revenue)," said commenter Glennular
on Stack Overflow. Or, as Stack Exchange user
mojuba put it, “There is really no good criteria
other than how fast you can understand the code."
www.javaworld.com em 26/09/2015.
Questão 4ProgramaçãoEXATUS2015
Se considerarmos a assinatura da procedure a seguir, podemos afirmar que: procedure w(a, b, c : integer);
Questão 5ProgramaçãoEXATUS2014
Nos scripts do tipo JCL (Job Control Language), qual é o número máximo de steps que um job pode conter?
Questão 6ProgramaçãoEXATUS2014
Na linguagem de programação COBOL (85), um array pode ter, no máximo, o seguinte número de dimensões:
Questão 7ProgramaçãoEXATUS2014
Em JCL (Job Control Language), quando se deseja sinalizar que a entrada (input) é vazia (empty) ou que a saída (output) deve ser descartada, a seguinte keyword pode ser utilizada:
Questão 8ProgramaçãoEXATUS2014
A seguinte alternativa apresenta um exemplo válido de comentário na linguagem de programação PHP:
Questão 9ProgramaçãoEXATUS2014
Em JCL (Job Control Language), o seguinte comando pode ser utilizado quando se tem por objetivo a execução de uma procedure como parte de um job:
Questão 10ProgramaçãoEXATUS2014
Assinale a alternativa que corresponde a saída do trecho de código JAVA abaixo disposto:
public class exemplo{
public static void main(String[] args) {
int a=2, b=22;
int u = b ^a^ b, k = b++ -+- --a -+- ++b;
System.out.println(u + " " + k);
}
}