• Home
  • Textbooks
  • Introduction to Programming with Java: A Problem Solving Approach
  • Software Engineering

Introduction to Programming with Java: A Problem Solving Approach

John S. Dean, Raymond H. Dean

Chapter 8

Software Engineering - all with Video Answers

Educators


Chapter Questions

00:49

Problem 1

One should avoid inserting blank lines between different code sections (because that leads to wasted paper when the program is printed). (T / F)

Ernest Castorena
Ernest Castorena
Numerade Educator
01:47

Problem 2

In order, list the seven items that we recommend you include in a fi le prologue.

Vysakh M
Vysakh M
Numerade Educator
01:26

Problem 3

When adding a comment to a variable declaration, always begin the comment one space after the end of the declaration. (T / F)

Prashant Bana
Prashant Bana
Numerade Educator
00:25

Problem 4

To get the most on each line of code, always break a long line at the point determined by your text editor or IDE. $(\mathrm{T} / \mathrm{F})$

Ernest Castorena
Ernest Castorena
Numerade Educator
00:49

Problem 5

For an if or while that has only one statement in its body, braces for the body are optional. The compiler does not require them, but proper style suggests that you should include them. Give at least one reason why it's a good idea to put braces around the body's single statement.

Ernest Castorena
Ernest Castorena
Numerade Educator
01:05

Problem 6

What’s wrong with the style of a class description that ends like this?
$\quad$}
$\qquad$}
}
What might you do to fi x it?

Sheryl Ezze
Sheryl Ezze
Numerade Educator
02:01

Problem 7

What should you use to separate large "chunks" of code?

Adam Conner
Adam Conner
Numerade Educator
00:49

Problem 8

For each, write "yes" or "no" to indicate whether it is good style to include a blank space.
-after the single asterisks in the prologue
-between a method call and its opening parentheses
-within each of the three components in a for loop header
-after the two semicolons in the for loop header
-between a closing brace and the //’s for its associated comment
-after the //’s for all comments
-after the if, while, and switch keywords

Ernest Castorena
Ernest Castorena
Numerade Educator
01:19

Problem 9

Which of the following is a legitimate reason for creating a helper method?
a) You want the method to be hidden from the outside world.
b) You have a long and complicated method and would like to partition it into several smaller modules.
c) Your class contains two or more methods where some of the code is the same in both methods.
d) All of above.

Manik Pulyani
Manik Pulyani
Numerade Educator
01:29

Problem 10

Does a class’s interface include the names of private methods?

Aditya Sood
Aditya Sood
Numerade Educator
01:16

Problem 11

In the interest of encapsulation, use local variables instead of instance variables whenever possible. (T / F)

SS
Sarvesh Somasundaram
Numerade Educator
00:34

Problem 12

If a method modifies a particular instance variable, and if a program calls the same method two separate times, the value of the instance variable at the beginning of the second method call is guaranteed to be the same as the value it had at the end of the first method call. (T / F)

Linh Vu
Linh Vu
Numerade Educator
01:52

Problem 13

since some of your preliminary code might change in the course of development, do not waste time testing until everything is done. (T / F)

Ernest Castorena
Ernest Castorena
Numerade Educator
01:29

Problem 14

When you are testing a program, it's important to not have any preconceived expectations of what your output should look like. (T / F)

Evelyn Cunningham
Evelyn Cunningham
Numerade Educator
01:52

Problem 15

The top-down design methodology is good because:
a) It keeps everyone focused on a common goal. (T / F)
b) It avoids “reinventing the wheel.” (T / F)
c) It keeps management informed. (T / F)
d) It minimizes the chances of solving the wrong problem. (T / F)
e) It minimizes overall cost. (T / F)
f) It results in the fewest number of undetected bugs. (T / F)

Ernest Castorena
Ernest Castorena
Numerade Educator
01:26

Problem 16

In a top-down design process, which do you decide on fi rst—the classes or the public methods?

Arulmozhi T
Arulmozhi T
Numerade Educator
01:08

Problem 17

When should you use bottom-up design?

Erika Bustos
Erika Bustos
Numerade Educator
05:26

Problem 18

If a prototype is successful, what temptation should you resist?

Mihir Nayar
Mihir Nayar
Numerade Educator
01:20

Problem 19

Once you select a particular design methodology, keep using that same methodology throughout the entire design process, and do not allow other methodologies to “contaminate” the process originally selected. (T / F)

Sanchit Jain
Sanchit Jain
Numerade Educator
01:57

Problem 20

You can drive any class from a main method within that class, and you can retain that main method for future testing of that class even though that class is normally driven from another class in a larger program. (T / F)

Arin Asawa
Arin Asawa
Numerade Educator