Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Java Programming, I want to check my work before I turn in A module indicates th

ID: 3741852 • Letter: J

Question

Java Programming, I want to check my work before I turn in

A module indicates that an error has occurred by catching an exception.

a. true

b. false

A module reacts to an exception that another module throws by ______ the exception.

a. gaurding

b. throwing

c. accepting

d. catching

A programmer can decrease the time needed to develop a program by starting to write the code of the program before creating a solution design.

a. true

b. false

A prototype program is created during the ______ phase of the software life cycle.

a. design

b. specification

c. coding

d. testing

A set of objects that have the same type is called a(n) ______.

a. data structure

b. abstract data type

c. module

d. class

A statement about a particular condition at a certain point in an algorithm is called a(n) ______.

a. base case

b. invarient

c. assertion

d. loop invarient

A top-down design identifies actions by focusing on the ______ in the problem statement.

a. nouns

b. verbs

c. adjectives

d. adverbs

A(n) ____ is a collection of data and a set of operations on the data.

a. method

b. exception

c. abstract data type

d. data structure

A(n) ______ is a construct that can be defined to store a collection of data.

a. data structure

b. module

c. abstract data type

d. method

A(n) ______ is a condition that is always true at a particular point in an algorithm.

a. assertion

b. exception

c. constant

d. invarient

A(n) ______ is a mechanism for error handling.

a. prototype

b. class

c. exception

d. abstract data type

A(n) ______ is a step-by-step specification of a method to solve a problem within a finite amount of time.

a. prototype

b. module

c. solution

d. algorithm

Abstraction separates the purpose of a module from its implementation.

a. true

b. false

An instance of a class is known as a(n) ______.

a. module

b. object

c. abstract data type

d. data structure

Coding is a relatively minor phase in the software life cycle.

a. true

b. false

During the ______ phase of the software life cycle, formal methods may be used to prove the correctness of an algorithm.

a. specification

b. verification

c. testing

d. design

During the design phase of the software life cycle, the program is divided into ______.

a. invariants

b. loops

c. modules

d. prototypes

During the specification phase of the life cycle of software, the programmer should specify what enhancements to the program are likely in the future.

a. true

b. false

If two programs perform the same task, then the faster program is always better.

a. true

b. false

Logical errors of a program are removed during the coding phase of the software life cycle.

a. true

b. false

Modularity describes a program that is organized into ______.

a. loosely coupled and highly cohesive modules

b. tightly coupled and highly cohesive modules

c. loosely coupled modules which are not cohesive

d. tightly coupled modules which are not cohesive

Object-oriented design identifies objects by focusing on the ______ in the problem statement.

a. nouns

b. verbs

c. adjectives

d. adverbs

Self-contained units of code are called ______.

a. modules

b. invarients

c. algorithms

d. exceptions

Syntax errors are corrected during the maintenance phase of the software life cycle.

a. true

b. false

The communication mechanisms among modules are called ______.

a. algorithms

b. solutions

c. prototypes

d. interfaces

The cost of software includes the consequences of the software not behaving correctly.

a. true

b. false

The data flow among the modules of a program is specified during the ______ phase of the software life cycle.

a. specification

b. design

c. coding

d. verification

The first phase of the life cycle of software is the ______ phase.

a. design

b. risk analysis

c. specification

d. coding

The specifications of a module indicate how that module should be implemented.

a. true

b. false

The specifications of a module describe its ______.

a. public view

b. private view

c. methods

d. implementation

The syntax errors of a program are removed during the ______ phase of the program's life cycle.

a. verification

b. coding

c. testing

d. refining

e. maintenance

User-detected errors are corrected during the ______ phase of the software life cycle.

a. maintenance

b. coding

c. refining

d. testing

e. verification

Which of the following is an example of a logical error?

a. an algorithm that calculates the monthly payment of a loan displays incorrect results

b. an array subscript in a program goes out of range

c. a program expects a nonnegative number but reads -23

d. the beginning of a while loop is written as "whille" instead of "while"

Which of the following is NOT used to find logical errors?

a. breakpoints

b. watches

c. System.out.println statements

d. exceptions

Which of the following is an example of an exception?

a. a statement does not contain a semicolon at the end

b. an array subscript in a program goes out of range

c. an algorithm that converts a temperature in Celsius to Fahrenheit displays the wrong results

d. a program expects a positive number but reads -23

Which of the following is NOT a part of the maintenance phase of the software life cycle?

a. correcting user-detected errors

b. adding more features to the software

c. proving the correctness of algorithms

d. modifying existing features of the software to better suit the users

Which of the following is an example of an error in input data?

a.  a program encounters an instruction to divide by zero

b. an array subscript in a program goes out of range

c. an algorithm that converts a temperature in Celsius to Fahrenheit displays the wrong results

d. a program expects a positive number but reads -23

Which of the following is an example of a syntax error?

a. a program encounters an instruction to divide by zero

b. an array subscript in a program goes out of range

c. the beginning of a while loop is written as "whille" instead of "while"

d. an algorithm that calculates the monthly payment of a loan displays incorrect results

With ______, objects can determine appropriate operations at execution time.

a. encapsulation

b. inheritance

c. polymorphism

d. information hiding

______ describes the ability of a class to derive properties from a previously defined class.

a. encapsulation

b. inheritance

c. polyporphism

d. information hiding

a. loosely coupled and highly cohesive modules

b. tightly coupled and highly cohesive modules

c. loosely coupled modules which are not cohesive

d. tightly coupled modules which are not cohesive

Object-oriented design identifies objects by focusing on the ______ in the problem statement.

a. nouns

b. verbs

c. adjectives

d. adverbs

Self-contained units of code are called ______.

a. modules

b. invarients

c. algorithms

d. exceptions

Syntax errors are corrected during the maintenance phase of the software life cycle.

a. true

b. false

The communication mechanisms among modules are called ______.

a. algorithms

b. solutions

c. prototypes

d. interfaces

The cost of software includes the consequences of the software not behaving correctly.

a. true

b. false

The data flow among the modules of a program is specified during the ______ phase of the software life cycle.

a. specification

b. design

c. coding

d. verification

The first phase of the life cycle of software is the ______ phase.

a. design

b. risk analysis

c. specification

d. coding

The specifications of a module indicate how that module should be implemented.

a. true

b. false

The specifications of a module describe its ______.

a. public view

b. private view

c. methods

d. implementation

The syntax errors of a program are removed during the ______ phase of the program's life cycle.

a. verification

b. coding

c. testing

d. refining

e. maintenance

User-detected errors are corrected during the ______ phase of the software life cycle.

a. maintenance

b. coding

c. refining

d. testing

e. verification

Which of the following is an example of a logical error?

a. an algorithm that calculates the monthly payment of a loan displays incorrect results

b. an array subscript in a program goes out of range

c. a program expects a nonnegative number but reads -23

d. the beginning of a while loop is written as "whille" instead of "while"

Which of the following is NOT used to find logical errors?

a. breakpoints

b. watches

c. System.out.println statements

d. exceptions

Which of the following is an example of an exception?

a. a statement does not contain a semicolon at the end

b. an array subscript in a program goes out of range

c. an algorithm that converts a temperature in Celsius to Fahrenheit displays the wrong results

d. a program expects a positive number but reads -23

Which of the following is NOT a part of the maintenance phase of the software life cycle?

a. correcting user-detected errors

b. adding more features to the software

c. proving the correctness of algorithms

d. modifying existing features of the software to better suit the users

Which of the following is an example of an error in input data?

a.  a program encounters an instruction to divide by zero

b. an array subscript in a program goes out of range

c. an algorithm that converts a temperature in Celsius to Fahrenheit displays the wrong results

d. a program expects a positive number but reads -23

Which of the following is an example of a syntax error?

a. a program encounters an instruction to divide by zero

b. an array subscript in a program goes out of range

c. the beginning of a while loop is written as "whille" instead of "while"

d. an algorithm that calculates the monthly payment of a loan displays incorrect results

With ______, objects can determine appropriate operations at execution time.

a. encapsulation

b. inheritance

c. polymorphism

d. information hiding

______ describes the ability of a class to derive properties from a previously defined class.

a. encapsulation

b. inheritance

c. polyporphism

d. information hiding

Explanation / Answer

1. false
Error is indicated by throwing the exception.

2. If one module throws an exeption, another can catch it.
So, d) catching.

3. False
Reason: It is always cleaner and organized to start by designing the solution. After that is done, we can code it. This help forsee what problems we may face and also keep within the zone of the requirements.

4. The four stages in order are:
specification -> design -> coding -> testing.

In specification stage, we can create a prototype to show to the client to make sure that the requirements have been correctly understood. This is just a prototype and doesn't have any important features.

Answer: (b) specification.

5. A single data structure has only a single type. So all objects having same type are the same data structure.
a) data structure.

6. assertions are present in points of program to tell that a condition is true.
So, answer here is (c) assertion.

7. Top down means we come from outside to inside.
Therefore, the answer will be b) verbs. This is because in top down approach we look at what the statement will do. Who will do it or how it will be done isn't the first thing to see.
So, answer is b) verbs.

8. Abstract data type refers a theoretical collection of data and the functions that we may apply on it.
Therefore, the option that matches this description the best is (c)
Answer is c) abstract data type.

9. In above question, we saw that abstract data types are description of data and what functions can be applied on them. Similarly in order to actually use that description, we have to define the data structure in our programming language.
Therefore, answer is a) data structure.

10. Loop invariant is always true before and after a loop in an algorithm. Similarly an invariant is always true in a point of the algorithm.
So, answer is d) invariant.

11. Exception can be used to handle errors in a program.
So, answer is c) exception.

12. Algorithm refers to a exact method to be followed to solve the problem.
So, answer is d) algorithm

I have answered 12 of the questions. I request you to write the rest of the questions in a separate post.

If you have any query regarding the above solution, you can let me know in comment. Thank you.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote