Test Bank Docx Chapter 1 Introduction - Java Foundations 4th Edition | Test Bank with Answer Key by John Lewis by John Lewis, Peter DePasquale, Joe Chase. DOCX document preview.

Test Bank Docx Chapter 1 Introduction

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

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

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

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

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

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

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

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

a) attributes

b) white spaces

c) variables

d) methods

e) name

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

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

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

12) Classes can be created from other classes by using _______________ .

a) encapsulation

b) polymorphism

c) inheritance

d) attributes

e) machine code

13) Which of the following is not a valid Java identifier?

a) answer_7

b) highest$

c) anExtremelyLongIdentifierIfYouAskMe

d) 2ndlevel

e) thirdNumber

14) Which task(s) is/are done in the implementation activity in the software development process?

a) specify what the program must accomplish

b) determine how a program will accomplish its requirements

c) write the source code that will solve the problem

d) ensure that the program solves the targeted problem

e) all of the above

15) Which of the following describes the act of ensuring that a program solves the intended problem in all cases?

a) establishing the requirements

b) testing

c) preliminary practice coding

d) implementing the design

e) creating a design

1) An editor is typically included as part of an IDE.

2) Comments affect the run-time execution of a program.

3) A reserved word can be used to name a method.

4) "Purchase a computer" is one of the problem-solving steps.

5) In Java, total, ToTal and TOTAL are all different identifiers.

6) Testing is the act of ensuring that a program will solve the targeted problem.

7) The attribute of an object defines its potential behaviors

8) An interpreter is a program that translates code that is written in one language into equivalent code in another language.

9) Syntax rules dictate the form of a program. Semantics dictate the meaning of the program statements.

10) An object should never be encapsulated.

1) Explain why "Understand the problem" is the first activity in problem solving.

2) Write a short Java program that outputs the following:

*

*

*

************** Time flies like an arrow

*

*

*

3) Why is testing part of the problem-solving process?

4) Identify the syntax errors in the following snippet of code:

public clas Hello {

public static void main(String [] args) {

Sytem.out.println("Hello Wrld!")

}

}

5) Explain the difference between the syntax of a program and the semantics of a program.

6) Why is ambiguity a problem for programming languages?

7) Why is it important to consider alternate solutions to a problem?

8) Why is inheritance a form of software reuse?

9) Determine a good identifier for each of the following entities in a program that calculates the final grade:

a) A grade on the first test of the semester

b) The total number of tests

c) The total number of homework assignments

d) The relative weight of the tests

10) Explain the difference between a compile-time error and a run-time error. Give an example of each.

11) What are the primary concepts that support object-oriented programming?

12) What are some advantages to writing programs in a high-level language instead of machine code?

13) Name the four basic activities that are involved in a software development process.

14) Write a program that outputs Four Score and Seven Years Ago on six lines, with the words centered relative to each other.

15) Give three examples of Java reserved words.

Document Information

Document Type:
DOCX
Chapter Number:
1
Created Date:
Aug 21, 2025
Chapter Name:
Chapter 1 Introduction
Author:
John Lewis, Peter DePasquale, Joe Chase

Connected Book

Java Foundations 4th Edition | Test Bank with Answer Key by John Lewis

By John Lewis, Peter DePasquale, Joe Chase

Test Bank General
View Product →

$24.99

100% satisfaction guarantee

Buy Full Test Bank

Benefits

Immediately available after payment
Answers are available after payment
ZIP file includes all related files
Files are in Word format (DOCX)
Check the description to see the contents of each ZIP file
We do not share your information with any third party