AND ANSWERS
The process of hand-tracing code is valuable because
a) It is usually faster than just running the code.
b) It is the best way to design an algorithm.
c) You must already have a working program in order to do it.
d) It gives valuable insight that you do not get by running the code. - Answer- Answer:
d) It gives valuable insight that you do not get by running the code.
Storyboards are a helpful part of the design process because the storyboard develops
a) A pseudocode description of the algorithm being designed
b) The mathematical formulas required for computing a correct answer
c) The information needed to solve the problem, and how to present that information
d) The amount of time and space needed to find a solution - Answer- Answer: c) The
information needed to solve the problem, and how to present that information
When designing storyboards, it is a good idea to use different colors to
a) Make it easy to distinguish between user input and program output.
b) Match the colors your program will use when it is finally designed.
c) Emphasize the difference between numbers and words.
d) Draw lines to divide up panels into different regions. - Answer- Answer: a) Make it
easy to distinguish between user input and program output.
Suppose you must design a program to calculate the roll-out (number of inches traveled
in one revolution of the pedals of a bicycle based on its gear combinations). The user
must provide the gear sizes, which must be converted into roll-out for all different gear
combinations. How can the flow of user interaction for this problem be designed?
a) Hand-tracing can confirm code that implements gear selection.
b) Pseudocode can guide algorithm design through divide-and-conquer strategy.
c) A storyboard can be used.
d) The physical gears can lead to ideas for the correct algorithm to use. - Answer-
Answer: c) A storyboard can be used.
Which statement about storyboards is true?
,a) A storyboard can help prevent potential user confusion early in the design process.
b) Storyboards are used primarily to understand how implemented programs work.
c) The storyboard helps to train users about how to use software.
d) Storyboards have no relationship to the structure of an actual working program. -
Answer- Answer: a) A storyboard can help prevent potential user confusion early in the
design process.
Which of the following refers to a collection of programs that a computer executes? -
Answer- Software
Computers are machines that - Answer- execute programs
Computer programming is - Answer- the act of designing and implementing a computer
program
Consider the following statements regarding computers:
I. Computers can execute a large number of instructions in a fraction of a second.
II. Computer application areas mainly target the research and scientific communities.
III. The physical components of a computer constitute its hardware.
IV. Unlike humans, a computer never gets bored or exhausted when performing
repetitive tasks.
Which are true? - Answer- I, III, IV
Consider the following statements about computer programs:
I. Computer programs can be written by someone who has a basic knowledge of
operating a computer.
II. Computer programs can complete complex tasks quickly.
III. Large and complex computer programs are generally written by a group of
programmers.
IV. Computer programs are composed of extremely primitive operations.
Which are true? - Answer- II, III, IV
The Central Processing Unit is primarily responsible for - Answer- performing program
control and data processing
,A single silicon chip made from potentially millions of transistors is called - Answer- a
Central Processing Unit (CPU)
An example of an output device that interfaces between computers and humans is -
Answer- a speaker
An example of an input device that interfaces between computers and humans is -
Answer- a microphone
Programs that are not running are usually stored - Answer- in secondary storage
When a program begins to run - Answer- it is moved to the CPU's memory
Which one of the following typically provides data persistence without electricity?
I. The CPU's memory
II. The hard disk
III. Secondary storage - Answer- II, III
Consider a scenario in which you develop a Java program on a computer that has a
Pentium processor. What step should you take to run the same Java program on a
computer that has a different processor? - Answer- The compiled Java machine
language instructions can be run on any processor that has a Java Virtual Machine
High-level programming languages - Answer- are independent of the underlying
hardware
Which one of the following translates high-level descriptions into machine code? -
Answer- compiler
Computer scientists have devised something that allows programmers to describe tasks
in words that are closer to the syntax of the problems being solved. This is called (an) -
Answer- high-level programming language
Small applications written in the Java programming language that can be located on the
Internet are called - Answer- applets
What is one of the benefits of using a high-level programming language like Java? -
Answer- Problems solved in a high-level language are independent of the underlying
computer
Because Java was designed for the Internet, which two of its attributes make it suitable
for beginning programmers? - Answer- Safety and portability
, An integrated development environment (IDE) bundles tools for programming into a
unified application. What kinds of tools are usually included? - Answer- An editor and a
compiler
Which of the following are reasons why Java is good, but not perfect, for beginners?
I. A certain amount of technical machinery is necessary to write basic, simple programs
II. There are many extensions
III. There are a large number of extensive libraries in Java - Answer- I, II, III
What is the difference between an editor and a compiler? - Answer- An editor allows
program files to be written and stored; a compiler converts program files into an
executable program
Suppose you examine a simple Java program and the first line is ' public Class
HelloPrinter ' . Is this the same thing in Java as the line ' public Class helloprinter ' ? -
Answer- No, because Java is case-sensitive, these are considered to be completely
distinct
What statements about the integrated development environment (IDE) are true?
I. You may run Java class files even after exiting the IDE
II. The IDE can invoke a virtual machine, which is required to run a Java program
III. Translating Java source code into class files is enough to then actually run the
program - Answer- I, II, III
Consider the following statements about folders and your integrated development
environment (IDE):
I. Hierarchical folders help to organize a project
II. Folders are a way to visualize the layout of a file system
III. Folders make it impossible to lose or accidentally delete a file - Answer- I, II
Which of the following statements regarding backup strategies for Java files are true?
I. You should back up your projects often to prevent loss of valuable work
II. You should check your backups only in case of loss of data
III. You should pay attention to the backup direction - Answer- I, III