Escrito por estudiantes que aprobaron Inmediatamente disponible después del pago Leer en línea o como PDF ¿Documento equivocado? Cámbialo gratis 4,6 TrustPilot
logo-home
Examen

Test Bank for Java Foundations Introduction to Program Design and Data Structures, 5th edition John Lewis

Puntuación
-
Vendido
-
Páginas
215
Grado
A+
Subido en
09-04-2026
Escrito en
2025/2026

Test Bank for Java Foundations Introduction to Program Design and Data Structures, 5th edition John Lewis

Institución
Java Foundations
Grado
Java foundations

Vista previa del contenido

,Java Foundations: Introduction to Program Design & Data Structures, 5e
John Lewis, Peter DePasquale, Joseph Chase
Test Bank: Chapter 1

Chapter 1: Introduction

Multiple Choice Questions:

1) _____________ consists of specific words and symbols to express a problem solution.

a) A programming language
b) Software
c) Hardware
d) A computer
e) An application

Answer: a
Explanation: A programming language consists of words and symbols to express a problem solution. Software consists
of programs and the data these programs use. Hardware is the tangible parts of a computer, such as keyboards and hard disks.
A computer is made up of hardware and software, and an application is a program that runs on a computer.

2) Java is _____________________.

a) a procedural language
b) a functional language
c) an object-oriented language
d) a fourth-generation language
e) a spoken-language

Answer: c
Explanation: Java is best described as an object-oriented language. Procedural languages, functional languages and
fourth-generation languages are different types of languages that don't necessarily include object-oriented features. A spoken
language is a language such as English or Spanish, and is too ambiguous for a computer to use.

3) Problem domain describes

a) the set of problems that are encountered when testing a program
b) the alternate ways to design the solution
c) the challenges in implementing the solution
d) the real-world issues that are key to a solution
e) all of the above

Answer: d
Explanation: The problem domain is the set of real-world issues that are key to a solution.




1
Pearson © 2019

,Java Foundations: Introduction to Program Design & Data Structures, 5e
John Lewis, Peter DePasquale, Joseph Chase
Test Bank: Chapter 1

4) In order for a program to run on a computer, it must be expressed in ______________________.

a) an assembly language
b) a machine language
c) a high-level language
d) an object-oriented language
e) a fourth generation language

Answer: b
Explanation: A computer can only understand its machine language. Assembly languages, high-level languages, object-
oriented languages and fourth generation languages are are languages that are easy for humans to understand, but they must first
be translated into a machine language before they are run on a computer.

5) A syntax error is a _____________________.

a) a logical error
b) a compile-time error
c) a run-time error
d) a bug
e) an exception

Answer: b
Explanation: A program that contains a syntax error is invalid, and therefore cannot be compiled. It is a compile-time
error because it is caught by the compiler. A logical error is an error that causes a running program to behave in an unexpected
manner during run-time. A bug is an example of a logical error. A run-time error is an error that happens while the program is
running. In Java, run-time errors are called exceptions.

6) Which of the following is not one of the four basic software development activities?

a) establishing the requirements
b) creating a design
c) preliminary practice coding
d) testing
e) implementing the design

Answer: c
Explanation: Preliminary practice coding is not one of the four basic software development activities. Establishing the
requirements for a program, creating a design for a program, implementing the design and testing the program all occur during
software development.

7) Software requirements specify ____________________.

a) what a program should accomplish
b) which programming language the developer should use
c) how objects should be encapsulated
d) how a solution should be implemented
e) a programming schedule

Answer: a
Explanation: Software requirements specify what a program should accomplish. They do not specify how a program or
a programmer should get a program to work as it is supposed to, and therefore none of the other choices are correct.



2
Pearson © 2019

, Java Foundations: Introduction to Program Design & Data Structures, 5e
John Lewis, Peter DePasquale, Joseph Chase
Test Bank: Chapter 1

8) The _____________ of an object define it define its potential behaviors.

a) attributes
b) white spaces
c) variables
d) methods
e) name

Answer: d
Explanation: The methods of an object represent the objects potential behaviors. The attributes are the values that the
object stores internally, and include the objects instance variables. The name of an object has nothing to do with its behaviors.
White space is related to the program code and has nothing to do with objects.

9) Which of the following will is considered a logical error?

a) forgetting a semicolon at the end of a programming statement
b) typing a curly bracket when you should have typed a parenthesis
c) multiplying two numbers when you meant to add them
d) dividing by zero
e) misspelling an identifier

Answer: c
Explanation: Multiplying two numbers when you mean to add them is an example of a logical error, because the
program will still compile and run, but the output will be incorrect. Forgetting a semicolon, using a bracket instead of a
parenthesis and misspelling an identifier will all lead to the program failing to compile, and are therefore compile-time errors.
Dividing by zero is an example of a run-time error since it will cause the program to crash at run-time.

10) Which of the following lines is a properly formatted comment?

a) // This is a comment
b) /* This is a comment */
c) /*
this is a comment
*/
d) both a and b
e) a, b and c

Answer: e
Explanation: All three are examples of valid comments in Java. The first is an in-line comment, and the second two
are examples of multi-line comments, although the second is only on one line.

11) The Java compiler translates Java source code into _____________ .
a) Java bytecode
b) C++
c) assembly code
d) machine code
e) an object-oriented language

Answer: a
Explanation: The Java compiler translates source into Java bytecode, which is an architecture-neutral language. The
bytecode can then be run on a Java virtual machine. It does not translate Java into C++, assembly code, or machine code. Java
is already an object-oriented language, so there is no need to translate it into one.


3
Pearson © 2019

Escuela, estudio y materia

Institución
Java foundations
Grado
Java foundations

Información del documento

Subido en
9 de abril de 2026
Número de páginas
215
Escrito en
2025/2026
Tipo
Examen
Contiene
Preguntas y respuestas

Temas

$41.49
Accede al documento completo:

¿Documento equivocado? Cámbialo gratis Dentro de los 14 días posteriores a la compra y antes de descargarlo, puedes elegir otro documento. Puedes gastar el importe de nuevo.
Escrito por estudiantes que aprobaron
Inmediatamente disponible después del pago
Leer en línea o como PDF

Conoce al vendedor
Seller avatar
williamkent

Conoce al vendedor

Seller avatar
williamkent Teachme2-tutor
Seguir Necesitas iniciar sesión para seguir a otros usuarios o asignaturas
Vendido
-
Miembro desde
4 meses
Número de seguidores
0
Documentos
40
Última venta
-

0.0

0 reseñas

5
0
4
0
3
0
2
0
1
0

Por qué los estudiantes eligen Stuvia

Creado por compañeros estudiantes, verificado por reseñas

Calidad en la que puedes confiar: escrito por estudiantes que aprobaron y evaluado por otros que han usado estos resúmenes.

¿No estás satisfecho? Elige otro documento

¡No te preocupes! Puedes elegir directamente otro documento que se ajuste mejor a lo que buscas.

Paga como quieras, empieza a estudiar al instante

Sin suscripción, sin compromisos. Paga como estés acostumbrado con tarjeta de crédito y descarga tu documento PDF inmediatamente.

Student with book image

“Comprado, descargado y aprobado. Así de fácil puede ser.”

Alisha Student

Preguntas frecuentes