110
Points Awarded 35.00 Points Missed 0.00 Percentage 100% 1. Methods in object-oriented programs use sequence, selection, and looping structures and make use of arrays. A) True B) False Points Earned: 1.0/1 .0 Correct Answer(s): A 2. In addition to their attributes, class objects have methods associated with them; every object that is an instance of a class possesses different methods. A) True B) False Points Earned: 1.0/1 .0 Correct Answer(s): B 3. Within any object-oriented program, you continuously make requests to objects’ methods, often including arguments as part of those requests. A) True B) False Points Earned: 1.0/1 .0

Programming Final Exam Review

Embed Size (px)

Citation preview

Page 1: Programming Final Exam Review

Points Awarded 35.00

Points Missed 0.00Percentage 100%

1.Methods in object-oriented programs use sequence, selection, and looping structures and make use of arrays.

A) True B) False 

Points Earned: 1.0/1.0

Correct Answer(s):

A

2.In addition to their attributes, class objects have methods associated with them; every object that is an instance of a class possesses different methods.

A) True B) False 

Points Earned: 1.0/1.0

Correct Answer(s):

B

3.Within any object-oriented program, you continuously make requests to objects’ methods, often including arguments as part of those requests.

A) True B) False 

Points Earned: 1.0/1.0

Correct Answer(s):

A

4.

Page 2: Programming Final Exam Review

Declaring a class does not create actual objects.A) True B) False 

Points Earned: 1.0/1.0

Correct Answer(s):

A

5.Class diagrams are a type of Unified Modeling Language (UML) diagram.

A) True B) False 

Points Earned: 1.0/1.0

Correct Answer(s):

A

6.The accessor method is another name for the set method.

A) True B) False 

Points Earned: 1.0/1.0

Correct Answer(s):

B

7.Object-oriented programmers usually specify that their data fields will have private access.

A) True B) False 

Points Earned: 1.0/1.0

Correct Answer(s):

A

Page 3: Programming Final Exam Review

8.All methods require a this reference.

A) True B) False 

Points Earned: 1.0/1.0

Correct Answer(s):

B

9.No object is necessary with a static method.

A) True B) False 

Points Earned: 1.0/1.0

Correct Answer(s):

A

10.Methods in a class are static instance methods by default.

A) True B) False 

Points Earned: 1.0/1.0

Correct Answer(s):

B

11.____ is a style of programming that focuses on an application’s data and the methods you need to manipulate that data.

A) Classical programming B) Functional programming C) Procedural programming D) Object-oriented programming 

Points Earned: 1.0/1.0

Page 4: Programming Final Exam Review

Correct Answer(s):

D

12.Object-oriented programmers sometimes say an object is one ____ of a class.

A) enumeration B) instantiation C) member D) reference 

Points Earned: 1.0/1.0

Correct Answer(s):

B

13.Objects both in the real world and in object-oriented programming contain ____ and methods.

A) behaviors B) attributes C) help D) primitive data types 

Points Earned: 1.0/1.0

Correct Answer(s):

B

14.____ are the characteristics that define an object as part of a class.

A) Instances B) Attributes C) Behaviors D) Methods 

Points Earned: 1.0/1.0

Correct B

Page 5: Programming Final Exam Review

Answer(s):

15.When you think in an object-oriented manner, every object is a member of a ____.

A) class B) struct C) method D) collection 

Points Earned: 1.0/1.0

Correct Answer(s):

A

16.Object-oriented programmers also use the term ____ when describing inheritance.

A) has-a B) from-a C) is-a D) contains 

Points Earned: 1.0/1.0

Correct Answer(s):

C

17.The concept of a class is useful because of its ____.

A) reusability B) mapping to reality C) abstract nature D) portability 

Points Earned: 1.0/1.0

Correct Answer(s):

A

Page 6: Programming Final Exam Review

18.Object attributes are often called ____ to help distinguish them from other variables you might use.

A) rows B) records C) columns D) fields 

Points Earned: 1.0/1.0

Correct Answer(s):

D

19.The data components of a class that belong to every instantiated object are the class’s ____.

A) numeric variables B) string variables C) instance variables D) data variables 

Points Earned: 1.0/1.0

Correct Answer(s):

C

20.A(n) ____ is a program or class that instantiates objects of another prewritten class.

A) instantiation B) method C) class client D) class definition 

Points Earned: 1.0/1.0

Correct Answer(s):

C

Page 7: Programming Final Exam Review

21.The term ____ is applied to situations in which you define multiple methods with a single name.

A) overloading B) bonding C) renaming D) inferring 

Points Earned: 1.0/1.0

Correct Answer(s):

A

22.A ____ is a set of program statements that tell you the characteristics of the class’s objects and the methods that can be used by its objects.

A) class interface B) class definition C) class reference D) class model 

Points Earned: 1.0/1.0

Correct Answer(s):

B

23.The term ____ implies that the type’s data can be accessed only through methods.

A) abstract type library B) advanced data type C) abstract definition type D) abstract data type 

Points Earned: 1.0/1.0

Correct Answer(s):

D

24.

Page 8: Programming Final Exam Review

A(n) ____ is a programmer-defined type, such as a class.A) inheritance B) numeric data type C) primitive data type D) abstract data type 

Points Earned: 1.0/1.0

Correct Answer(s):

D

25.In older object-oriented programming languages, simple numbers and characters are said to be ____ data types.

A) primitive B) simple C) complex D) higher-order 

Points Earned: 1.0/1.0

Correct Answer(s):

A

26.A(n) ____ consists of a rectangle divided into three sections.

A) class tree B) dependency diagram C) class diagram D) entity-relationship diagram 

Points Earned: 1.0/1.0

Correct Answer(s):

C

27.The purpose of ____ is to set the values of data fields within the class.

Page 9: Programming Final Exam Review

A) get methods B) put methods C) make methods D) set methods 

Points Earned: 1.0/1.0

Correct Answer(s):

D

28.Methods that set values are called ____ methods.

A) modifier B) mutator C) creator D) access 

Points Earned: 1.0/1.0

Correct Answer(s):

B

29.The purpose of a(n) ____ is to return a value to the world outside the class.

A) get method B) set method C) pull method D) access method 

Points Earned: 1.0/1.0

Correct Answer(s):

A

30.A ____ method is also known as a help method.

Page 10: Programming Final Exam Review

A) work B) private C) public D) set 

Points Earned: 1.0/1.0

Correct Answer(s):

A

31.A(n) ____ is the adjective defining the type of access (public or private) that outside classes will have to the attribute or method.

A) control specifier B) control modifier C) access specifier D) access controller 

Points Earned: 1.0/1.0

Correct Answer(s):

C

32.In a class method, the ____ reference can be used only with identifiers that are field names.

A) my B) this C) that D) me 

Points Earned: 1.0/1.0

Correct Answer(s):

B

33.____ methods are those for which no object needs to exist.

Page 11: Programming Final Exam Review

A) Dynamic B) Public C) Static D) Private 

Points Earned: 1.0/1.0

Correct Answer(s):

C

34.____ methods are methods that exist to be used with an object created from a class.

A) Nonstatic B) Static C) Hidden D) Controlled 

Points Earned: 1.0/1.0

Correct Answer(s):

A

35.In most programming languages, you use the word ____ when you want to declare a static class member.

A) private B) friend C) public D) static 

Points Earned: 1.0/1.0

Correct Answer(s):

D

Points 35.00

Page 12: Programming Final Exam Review

AwardedPoints Missed 0.00Percentage 100%

1.You can invoke or call a method from another program or method.

A) True 

B) False Points Earned:

1.0/1.0

2.When methods must share data, you can pass the data into and return the data out of methods.

A) True 

B) False Points Earned:

1.0/1.0

3.A method could be called using any numeric value as an argument, whether it is a variable, a named constant, or a literal constant.

A) True 

B) False Points Earned:

1.0/1.0

4.A method’s return type is part of its signature.

A) True 

B) False Points Earned:

1.0/1.0

Page 13: Programming Final Exam Review

5.A method’s declared return type must match the type of value used in the return statement.

A) True 

B) False Points Earned:

1.0/1.0

6.Methods with identical names that have identical parameter lists but different return types are ambiguous.

A) True 

B) False Points Earned:

1.0/1.0

7.All modern programming languages contain many methods that are predefined.

A) True 

B) False Points Earned:

1.0/1.0

8.In implementation hiding, the calling method needs to understand only the interface to the method that is called and it need not know how the method works internally.

A) True 

B) False Points Earned:

1.0/1.0

9.Most programmers consciously make decisions about cohesiveness for each method they write.

Page 14: Programming Final Exam Review

A) True 

B) False Points Earned:

1.0/1.0

10.Programs that use recursion are error-prone but easy to debug.

A) True 

B) False Points Earned:

1.0/1.0

11.The last statement in a method is a(n) ____.

A) begin statement 

B) return statement 

C) exit statement 

D) end statement Points Earned:

1.0/1.0

12.Variables and constants are ____ within, or local to, only the method in which they are declared.

A) in scope 

B) out of bounds 

C) out of scope 

D) limited Points Earned:

1.0/1.0

13.When a data item is known to all of a program’s modules, it is a ____data item.

Page 15: Programming Final Exam Review

A) scope 

B) defined 

C) local 

D) global Points Earned:

1.0/1.0

14.A calling method sends a(n) ____ to a called method.

A) parameter 

B) interface 

C) object 

D) argument Points Earned:

1.0/1.0

15.A called method accepts the value of an argument passed to it as its ____.

A) parameter 

B) reference 

C) baseline 

D) argument Points Earned:

1.0/1.0

16.A method’s name and parameter list constitute the method’s ____.

A) header 

B) interface 

C) contract 

D) signature Points 1.0/1.

Page 16: Programming Final Exam Review

Earned: 0

17.You can think of the ____ in a method declaration as a funnel into the method.

A) braces 

B) brackets 

C) parentheses 

D) commas Points Earned:

1.0/1.0

18.A variable usually is passed into a method by ____.

A) reference 

B) inference 

C) insinuation 

D) value Points Earned:

1.0/1.0

19.Each time a method executes, any parameter variables listed in the method header are ____.

A) examined 

B) redeclared 

C) referenced 

D) copied Points Earned:

1.0/1.0

20.The variables in the method declaration that accept the values from the actual parameters are ____ parameters.

Page 17: Programming Final Exam Review

A) defined 

B) proper 

C) formal 

D) actual Points Earned:

1.0/1.0

21.A method can return nothing, in which case the method is a ____ method.

A) null 

B) void 

C) nul 

D) nil Points Earned:

1.0/1.0

22.Programmers use the term ____ to describe any extra time and resources required by an operation.

A) black box 

B) overhead 

C) overload 

D) cohesion Points Earned:

1.0/1.0

23.____ provide an overview of input to the method, the processing steps that must occur, and the result.

A) Stacks 

B) Hierarchy charts 

Page 18: Programming Final Exam Review

C) IPO charts 

D) Flowcharts Points Earned:

1.0/1.0

24.When multiple parameters appear in a method header, they constitute a(n) ____.

A) parameter list 

B) input list 

C) action list 

D) variable list Points Earned:

1.0/1.0

25.Arrays, unlike simple built-in types, are passed by ____.

A) deference 

B) value 

C) reference 

D) configuration Points Earned:

1.0/1.0

26.____ is the ability of a method to act appropriately depending on the context.

A) Cohesion 

B) Chameleon 

C) Integrity 

D) Polymorphism Points Earned:

1.0/1.0

Page 19: Programming Final Exam Review

27.When you ____ a method, you write multiple methods with a shared name but different parameter lists.

A) stack 

B) overload 

C) overhead 

D) void Points Earned:

1.0/1.0

28.Using implementation hiding means that the ____ is the only part of a method with which the method’s client interacts.

A) argument list 

B) interface to the method 

C) parameter list 

D) internal detail Points Earned:

1.0/1.0

29.____ refers to how the internal statements of a method serve to accomplish the method’s purpose.

A) Coupling 

B) Cohesion 

C) Bonding 

D) Binding Points Earned:

1.0/1.0

30.____ is a measure of the strength of the connection between two program methods.

Page 20: Programming Final Exam Review

A) Coupling 

B) Cohesion 

C) Bonding 

D) Binding Points Earned:

1.0/1.0

31.____ occurs when methods excessively depend on each other and makes programs more prone to errors.

A) Late coupling 

B) Loose coupling 

C) Tight coupling 

D) Weak coupling Points Earned:

1.0/1.0

32.____ occurs when methods do not depend on others.

A) Tight coupling 

B) Loose coupling 

C) Data coupling 

D) Abstract coupling Points Earned:

1.0/1.0

33.____ occurs when a method is defined in terms of itself.

A) Referential integrity 

B) Repeatability 

C) Dependence 

D) Recursion 

Page 21: Programming Final Exam Review

Points Earned:

1.0/1.0

34.A method that calls itself is a ____.

A) recursive method 

B) repeated method 

C) self-referencing method 

D) simple method Points Earned:

1.0/1.0

35.Every time you call a method, the address to which the program should return at the completion of the method is stored in a memory location called the ____.

A) heap 

B) queue 

C) stack 

D) dump Points Earned:

1.0/1.0

Points Awarded 35.00

Points Missed 0.00Percentage 100%

1.The sorting process is usually reserved for a relatively large number of data items.

A) True B) False 

Page 22: Programming Final Exam Review

Points Earned:

1.0/1.0

2.The most popular computer coding schemes include ASCII, Numeric, and EBCDIC.

A) True B) False 

Points Earned:

1.0/1.0

3.You can make additional improvements to a bubble sort to reduce unnecessary comparisons.

A) True B) False 

Points Earned:

1.0/1.0

4.An insertion sort is another name for a bubble sort.

A) True B) False 

Points Earned:

1.0/1.0

5.Two-dimensional arrays are never actually required in order to achieve a useful program.

A) True B) False 

Points Earned:

1.0/1.0

6.Some programming languages allow multidimensional arrays.

Page 23: Programming Final Exam Review

A) True B) False 

Points Earned:

1.0/1.0

7.It is relatively easy for people to keep track of arrays with more than three dimensions.

A) True B) False 

Points Earned:

1.0/1.0

8.You do not need to determine a record’s exact physical address in order to use it.

A) True B) False 

Points Earned:

1.0/1.0

9.When a record is removed from an indexed file, it has to be physically removed.

A) True B) False 

Points Earned:

1.0/1.0

10.Every time you add a new record to a linked list, you search through the list for the correct logical location of the new record.

A) True B) False 

Points Earned:

1.0/1.0

Page 24: Programming Final Exam Review

11.When records are in ____ order, they are arranged one after another on the basis of the value in a particular field.

A) random B) sequential C) binary D) incremental 

Points Earned:

1.0/1.0

12.The ____ is often used as a statistic in many cases because it represents a more typical case.

A) mode B) mean C) average D) median 

Points Earned:

1.0/1.0

13.The ____ is skewed by a few very high or low values.

A) mode B) median C) mean D) standard deviation 

Points Earned:

1.0/1.0

14.When you store data records, they exist in ____.

A) some type of order B) the reverse order from how they were entered 

Page 25: Programming Final Exam Review

C) the same default ordering for all systems D) ascending order 

Points Earned:

1.0/1.0

15.When you create a ____ report, the records must have been sorted in order by a key field.

A) summary B) control break C) detail D) totals 

Points Earned:

1.0/1.0

16.When computers sort data, they always use ____ values when making comparisons between values.

A) numeric B) alphanumeric C) alphabetic D) ascending 

Points Earned:

1.0/1.0

17.Because “A” is always less than “B”, alphabetic sorts are ____ sorts.

A) descending B) reversing C) ascending D) downward 

Points Earned:

1.0/1.0

Page 26: Programming Final Exam Review

18.In a ____, items in a list are compared with each other in pairs.

A) quick sort B) shell sort C) bubble sort D) matrix sort 

Points Earned:

1.0/1.0

19.When you learn a method like sorting, programmers say you are learning a(n) ____.

A) matrix B) addressed location C) algorithm D) linked list 

Points Earned:

1.0/1.0

20.To correctly swap two values, you create a(n) ____ variable to hold one of the values.

A) per-swap B) inversion C) conversion D) temporary 

Points Earned:

1.0/1.0

21.A bubble sort is sometimes called a ____.

A) dropping sort B) sinking sort C) compare sort D) pair sort 

Points 1.0/1.

Page 27: Programming Final Exam Review

Earned: 0

22.When using a bubble sort to sort a 10-element array, on the fourth pass through the array list you detect that no swap has occurred. This indicates ____.

A) the elements in the array were badly out of order B) all elements in the array are already in the correct order C) you must make one more pass through the array D) you must make a total of 10 passes through the array 

Points Earned:

1.0/1.0

23.When you sort records, two possible approaches are to place related data items in parallel arrays and to ____.

A) sort records as a whole B) sort fields in records individually C) place unrelated data items in parallel arrays D) sort data in spreadsheets 

Points Earned:

1.0/1.0

24.In a(n) ____, if an element is out of order relative to any of the items earlier in the list, you move each earlier item down one position and then insert the tested element.

A) selection sort B) bubble sort C) sync sort D) insertion sort 

Points Earned:

1.0/1.0

25.An array whose elements you can access using a single subscript is a ____ array.

Page 28: Programming Final Exam Review

A) one-dimensional B) multi-dimensional C) non-dimensional D) single-dimensional 

Points Earned:

1.0/1.0

26.A two-dimensional array contains two dimensions: ____.

A) size and scope B) breadth and height C) height and width D) depth and width 

Points Earned:

1.0/1.0

27.Each element in a two-dimensional array requires ____ subscript(s) to reference it.

A) one B) two C) three D) four 

Points Earned:

1.0/1.0

28.When mathematicians use a two-dimensional array, they often call it a ____ or a table.

A) vector B) matrix C) square D) grid 

Points Earned:

1.0/1.0

Page 29: Programming Final Exam Review

29.____ are arrays that have more than one dimension.

A) Multidimensional arrays B) One-dimensional arrays C) Diverse dimensioned arrays D) Unary dimensional arrays 

Points Earned:

1.0/1.0

30.A record’s ____ field is the field whose contents make the record unique among all records in a file.

A) primary B) column C) secondary D) key 

Points Earned:

1.0/1.0

31.As pages in a book have numbers, computer memory and storage locations have ____.

A) positions B) pointers C) addresses D) references 

Points Earned:

1.0/1.0

32.When you ____ records, you store a list of key fields paired with the storage address for the corresponding data record.

A) store B) tab 

Page 30: Programming Final Exam Review

C) reference D) index 

Points Earned:

1.0/1.0

33.When you use an index, you can store records on a ____ storage device.

A) linear-access B) random-access C) sequential-access D) uniform-access 

Points Earned:

1.0/1.0

34.One way to access records in a desired order, even though they might not be physically stored in that order, is to create a(n) ____.

A) linked list B) array C) matrix D) table 

Points Earned:

1.0/1.0

35.Every time you add a new record to a linked list, you search through the list for the correct ____ location of the new record.

A) physical B) spatial C) logical D) key 

Points Earned:

1.0/1.0

Page 31: Programming Final Exam Review

Points Awarded 35.00

Points Missed 0.00Percentage 100%

1.Images and music are contained in binary files.

A) True 

B) False Points Earned:

1.0/1.0

2.When you copy data from RAM into a file on a storage device, you read to the file.

A) True 

B) False Points Earned:

1.0/1.0

3.The keyboard and printer are the default input and output devices.

A) True 

B) False Points Earned:

1.0/1.0

4.Programmers usually use the word “write” to mean “produce hard copy output.”

A) True 

B) False Points 1.0/1.

Page 32: Programming Final Exam Review

Earned: 0

5.To write a program that produces a report of employees by department number, the records must be grouped by department number before you begin processing.

A) True 

B) False Points Earned:

1.0/1.0

6.You can easily merge files even if each file contains a different record layout.

A) True 

B) False Points Earned:

1.0/1.0

7.You can merge more than two files.

A) True 

B) False Points Earned:

1.0/1.0

8.You update the transaction file with data from the master file.

A) True 

B) False Points Earned:

1.0/1.0

9.

Page 33: Programming Final Exam Review

The terms “parent” and “child” can refer to file backup generations, but they are also used for a different purpose in object-oriented programming.

A) True 

B) False Points Earned:

1.0/1.0

10.Files in which records must be accessed immediately are sometimes called instant access files.

A) True 

B) False Points Earned:

1.0/1.0

11.A ____ is a collection of data stored on a nonvolatile device in a computer system.

A) computer message 

B) computer interface 

C) computer file 

D) computer selector Points Earned:

1.0/1.0

12.When you write a program that stores a value in a variable, you are using ____ storage.

A) permanent 

B) temporary 

C) resilient 

D) resident Points Earned:

1.0/1.0

Page 34: Programming Final Exam Review

13.____ storage is not lost when a computer loses power.

A) Temporary 

B) Intermediate 

C) Permanent 

D) Variable Points Earned:

1.0/1.0

14.Files exist on ____ storage devices, such as hard disks, DVDs, USB drives, and reels of magnetic tape.

A) permanent 

B) transient 

C) scalable 

D) optical Points Earned:

1.0/1.0

15.The combination of the disk drive plus the complete hierarchy of directories in which a file resides is its ____.

A) pointer 

B) path 

C) locator 

D) stream Points Earned:

1.0/1.0

16.Directories and ____ are organization units on storage devices.

A) folders 

B) files 

Page 35: Programming Final Exam Review

C) partitions 

D) streams Points Earned:

1.0/1.0

17.____ is the more general term for an entity that organizes files.

A) Folder 

B) Path 

C) Structure 

D) Directory Points Earned:

1.0/1.0

18.____ are groups of fields that go together for some logical reason.

A) Tables 

B) Databases 

C) Columns 

D) Records Points Earned:

1.0/1.0

19.Characters are made up of smaller elements called ____.

A) fields 

B) records 

C) bits 

D) bytes Points Earned:

1.0/1.0

Page 36: Programming Final Exam Review

20.A database holds groups of files or ____ that together serve the information needs of an organization.

A) fields 

B) records 

C) control breaks 

D) tables Points Earned:

1.0/1.0

21.In most programming languages, before an application can use a data file, it must ____.

A) open the file 

B) close the file 

C) read the file 

D) prepare the file Points Earned:

1.0/1.0

22.When you copy data from a file on a storage device into RAM, you ____ from the file.

A) delete 

B) upload 

C) output 

D) read Points Earned:

1.0/1.0

23.When you ____ a file, it is no longer available to your application.

A) examine 

B) rewrite 

Page 37: Programming Final Exam Review

C) close 

D) index Points Earned:

1.0/1.0

24.A ____ is a copy that is kept in case values need to be restored to their original state.

A) read-only file 

B) backup file 

C) primary file 

D) secondary file Points Earned:

1.0/1.0

25.A ____ is a file in which records are stored one after another in some order.

A) random access file 

B) serial file 

C) retired file 

D) sequential file Points Earned:

1.0/1.0

26.A ____ is a temporary detour in the logic of a program.

A) sequence break 

B) control break 

C) control sequence 

D) break control Points Earned:

1.0/1.0

Page 38: Programming Final Exam Review

27.To generate a control break report, your input records must be organized in ____ order based on the field that will cause the breaks.

A) random 

B) ascending 

C) sequential 

D) repeatable Points Earned:

1.0/1.0

28.A ____ break is a break in the logic of the program that is based on the value of a single variable.

A) multiple-level control 

B) simple control 

C) serial control 

D) single-level control Points Earned:

1.0/1.0

29.____ files involves combining two or more files while maintaining the sequential order.

A) Merging 

B) Sorting 

C) Splitting 

D) Dividing Points Earned:

1.0/1.0

30.When the records in a file are sorted in order from lowest to highest values, the records are in ____ order.

Page 39: Programming Final Exam Review

A) descending 

B) bubble 

C) ascending 

D) merged Points Earned:

1.0/1.0

31.The ____ file holds temporary data that is used to update the master file.

A) directory 

B) transaction 

C) merge 

D) database Points Earned:

1.0/1.0

32.The saved version of a master file is the ____ file; the updated version is the child file.

A) peer 

B) subordinate 

C) parent 

D) child Points Earned:

1.0/1.0

33.____ is processing that involves performing the same tasks with many records, one after the other.

A) Volume processing 

B) Batch processing 

C) Online processing 

D) Standard processing 

Page 40: Programming Final Exam Review

Points Earned:

1.0/1.0

34.____ applications require that a record be accessed immediately while a client is waiting.

A) Real-time 

B) Batch 

C) Database 

D) Sort Points Earned:

1.0/1.0

35.Because they enable you to locate a particular record directly (without reading all of the preceding records), random access files are also called ____ files.

A) direct access 

B) indirect access 

C) sequential access 

D) temporary access Points Earned:

1.0/1.0

Points Awarded 35.00

Points Missed 0.00Percentage 100%

1.Many newer programming languages such as C++, Java, and C# use subscript 1 to access the first element of the array.

Page 41: Programming Final Exam Review

A) True 

B) False Points Earned:

1.0/1.0

2.You use subscripts 1 through 10 to access the elements in a ten element array.

A) True 

B) False Points Earned:

1.0/1.0

3.Many newer programming languages such as C++, Java, and C# use the bracket notation for arrays.

A) True 

B) False Points Earned:

1.0/1.0

4.Declaring a named constant makes code easier to modify and understand.

A) True 

B) False Points Earned:

1.0/1.0

5.A parallel array is an array that stores another array in each element.

A) True 

B) False Points Earned:

1.0/1.0

Page 42: Programming Final Exam Review

6.Parallel arrays must contain the same data type.

A) True 

B) False Points Earned:

1.0/1.0

7.You can improve the efficiency of a program by leaving a loop as soon as a match is found in the array.

A) True 

B) False Points Earned:

1.0/1.0

8.Arrays cannot be used if you need to search for a range of values.

A) True 

B) False Points Earned:

1.0/1.0

9.When you have a five element array and use subscript 8, your subscript is said to be out of bounds.

A) True 

B) False Points Earned:

1.0/1.0

10.

Page 43: Programming Final Exam Review

The for loop is a good tool when working with arrays because you frequently need to process every element of an array from beginning to end.

A) True 

B) False Points Earned:

1.0/1.0

11.An array is a(n) ____ of values in computer memory.

A) list 

B) accumulation 

C) set 

D) record Points Earned:

1.0/1.0

12.A(n) ____ is another name for a subscript.

A) pointer 

B) sequence 

C) index 

D) place holder Points Earned:

1.0/1.0

13.The number of elements in an array is called the ____ of the array.

A) width 

B) size 

C) height 

D) depth Points Earned:

1.0/1.0

Page 44: Programming Final Exam Review

14.All array elements have the same group ____.

A) subscript 

B) name 

C) memory location 

D) value Points Earned:

1.0/1.0

15.Array elements all have the same ____ in common.

A) pointer 

B) memory location 

C) value 

D) data type Points Earned:

1.0/1.0

16.Array subscripts are always a sequence of ____.

A) large numbers 

B) characters 

C) negative values 

D) integers Points Earned:

1.0/1.0

17.In all languages, subscript values must be sequential ____.

Page 45: Programming Final Exam Review

A) characters 

B) fractions 

C) real numbers 

D) integers Points Earned:

1.0/1.0

18.A program contains an array that holds all the names of the days of the week. Which of the following is true?

A) The highest subscript is 6. 

B) The highest subscript is 7. 

C) The lowest subscript is 1. 

D) The highest subscript is 12. Points Earned:

1.0/1.0

19.Providing array values is sometimes called ____.

A) creating the array 

B) declaring the array 

C) accumulating the array 

D) populating the array Points Earned:

1.0/1.0

20.An array can be used to replace ____.

A) records 

B) methods 

C) nested decisions 

D) loops 

Page 46: Programming Final Exam Review

Points Earned:

1.0/1.0

21.The true benefit of using an array lies in your ability to use a ____ as a subscript to the array.

A) constant 

B) loop 

C) command 

D) variable Points Earned:

1.0/1.0

22.Named ____ hold values that do not change during a program’s execution.

A) constants 

B) variables 

C) objects 

D) items Points Earned:

1.0/1.0

23.Besides making your code easier to modify, using a ____ makes the code easier to understand.

A) standard constant 

B) named constant 

C) literal constant 

D) named variable Points Earned:

1.0/1.0

24.One advantage to using a named constant is that the statement becomes ____.

Page 47: Programming Final Exam Review

A) self-perpetuating 

B) self-documenting 

C) self-referencing 

D) self-mitigating Points Earned:

1.0/1.0

25.When you search through a list from one end to the other, you are performing a ____.

A) linear search 

B) binary search 

C) quadratic search 

D) single lookup Points Earned:

1.0/1.0

26.If you declare a variable to be Boolean, you can set its value to ____.

A) any number 

B) true or false 

C) any integer 

D) 1 or -1 Points Earned:

1.0/1.0

27.Which statement is true of arrays?

A) Only whole numbers can be used as array subscripts. 

B) Only whole numbers can be stored in arrays. 

C) Arrays cause more work for the programmer, but allow faster program execution. 

D) Array elements cannot be reset after the array is declared. Points 1.0/1.

Page 48: Programming Final Exam Review

Earned: 0

28.A ____ relates parallel arrays.

A) superscript 

B) key 

C) subscript 

D) postscript Points Earned:

1.0/1.0

29.Parallel arrays are most useful when value pairs have a(n) ____ relationship.

A) direct 

B) indirect 

C) linked 

D) tiered Points Earned:

1.0/1.0

30.A ____ search starts looking in the middle of a sorted list, and then determines whether it should continue higher or lower.

A) linear 

B) binary 

C) quadratic 

D) single lookup Points Earned:

1.0/1.0

31.

Page 49: Programming Final Exam Review

To search an array for a(n) ____ match, you can store either the highest or lowest value of each range for comparison.

A) flag 

B) index 

C) subscript 

D) range Points Earned:

1.0/1.0

32.Every array has a(n) ____ size.

A) infinite 

B) finite 

C) variable 

D) constant Points Earned:

1.0/1.0

33.The number of bytes in an array is always a multiple of the number of ____ in an array.

A) subscripts 

B) elements 

C) iterators 

D) indexes Points Earned:

1.0/1.0

34.In every programming language, when you access data stored in an array, it is important to use a ____ containing a value that accesses memory occupied by the array.

A) superscript 

B) subscript 

Page 50: Programming Final Exam Review

C) key 

D) condition Points Earned:

1.0/1.0

35.When a subscript is not within the range of acceptable subscripts, it is said to be ____.

A) a superscript 

B) flagged 

C) out of bounds 

D) indexed Points Earned:

1.0/1.0

Points Awarded 34.00

Points Missed 1.00Percentage 97.1%

1.The loop control variable is initialized after entering the loop.

A) True 

B) False Points Earned:

1.0/1.0

2.In some cases, a loop control variable does not have to be initialized.

A) True 

B) False Points 1.0/1.

Page 51: Programming Final Exam Review

Earned: 0

3.An indefinite loop is a loop that never stops.

A) True 

B) False Points Earned:

0.0/1.0

4.You can either increment or decrement the loop control variable.

A) True 

B) False Points Earned:

1.0/1.0

5.When one loop appears inside another is is called an indented loop.

A) True 

B) False Points Earned:

1.0/1.0

6.Forgetting to initialize and alter the loop control variable is a common mistake that programmers sometimes make.

A) True 

B) False Points Earned:

1.0/1.0

7.

Page 52: Programming Final Exam Review

Every high-level computer programming language contains a while statement.

A) True 

B) False Points Earned:

1.0/1.0

8.Both the while loop and the for loop are examples of pretest loops.

A) True 

B) False Points Earned:

1.0/1.0

9.The safest action is to assign the value 1 to accumulators before using them.

A) True 

B) False Points Earned:

1.0/1.0

10.It is the programmer’s responsibility to initialize all variables that must start with a specific value.

A) True 

B) False Points Earned:

1.0/1.0

11.The first step in a while loop is typically to ____.

A) compare the loop control variable to a constant value 

B) initialize the loop control variable 

Page 53: Programming Final Exam Review

C) increment the loop control variable 

D) execute the body of the loop Points Earned:

1.0/1.0

12.Once your logic enters the body of a structured loop, ____.

A) the entire loop must execute 

B) the loop can be terminated with a break statement 

C) the loop will execute indefinitely 

D) a decision statement will be evaluated Points Earned:

1.0/1.0

13.The last step in a while loop is usually to ____.

A) compare the loop control variable to a constant value 

B) initialize the loop control variable 

C) increment the loop control variable 

D) execute the body of the loop Points Earned:

1.0/1.0

14.A(n) ____ loop executes a predetermined number of times.

A) terminal 

B) definite 

C) indefinite 

D) infinite Points Earned:

1.0/1.0

Page 54: Programming Final Exam Review

15.Many loop control variable values are altered by ____, or adding to them.

A) incrementing 

B) decrementing 

C) accumulating 

D) deprecating Points Earned:

1.0/1.0

16.A(n) ____ is any numeric variable you use to count the number of times an event has occurred.

A) accumulator 

B) key 

C) index 

D) counter Points Earned:

1.0/1.0

17.A loop within another loop is known as a(n) ____ loop.

A) indefinite 

B) infinite 

C) nested 

D) hidden Points Earned:

1.0/1.0

18.When one loop appears inside another, the loop that contains the other loop is called the ____ loop.

A) indefinite 

B) definite 

Page 55: Programming Final Exam Review

C) inner 

D) outer Points Earned:

1.0/1.0

19.Usually, when you create nested loops, each loop has its own ____.

A) sentinel value 

B) goto statement 

C) entrance condition 

D) loop control variable Points Earned:

1.0/1.0

20.A mistake programmers often make with loops is that they ____.

A) initialize the loop control variable prior to entering the loop body 

B) increment the loop control variable inside of the loop body 

C) include statements inside the loop that belong outside the loop 

D) enclose the inner loop entirely within the outer loop in a nested loop Points Earned:

1.0/1.0

21.A mistake programmers often make with loops is that they ____.

A) neglect to initialize the loop control variable prior to entering the loop body 

B) increment the loop control variable inside of the loop body 

C) validate data to ensure values are the correct data type or that they fall within an acceptable range 

D) enclose the inner loop entirely within the outer loop in a nested loop Points Earned:

1.0/1.0

Page 56: Programming Final Exam Review

22.A comparison is correct only when the correct ____ and operator are used.

A) expression 

B) operands 

C) statements 

D) index Points Earned:

1.0/1.0

23.Programmers use the term ____ to describe programs that are well designed and easy to understand and maintain.

A) industrial 

B) intractable 

C) well behaved 

D) elegant Points Earned:

1.0/1.0

24.You usually use the for loop with ____ loops.

A) indefinite 

B) definite 

C) inner 

D) outer Points Earned:

1.0/1.0

25.The ____ loop provides three actions in one compact statement.

A) for 

B) while 

Page 57: Programming Final Exam Review

C) do until 

D) repeat Points Earned:

1.0/1.0

26.The amount by which a for loop control variable changes is often called a ____ value.

A) group 

B) key 

C) step 

D) sentinel Points Earned:

1.0/1.0

27.In a ____, the loop body might never execute because the question controlling the loop might be false the first time it is asked.

A) summary report 

B) pretest loop 

C) posttest loop 

D) loop control Points Earned:

1.0/1.0

28.In a ____, the loop body executes at least one time because the loop control variable is not tested until after one iteration.

A) stub 

B) pretest loop 

C) posttest loop 

D) loop control Points Earned:

1.0/1.0

Page 58: Programming Final Exam Review

29.The ____ loop is particularly useful when processing arrays.

A) for 

B) while 

C) infinite 

D) nested Points Earned:

1.0/1.0

30.A(n) ____ is very similar to a counter that you use to count loop iterations, except that you usually add a value other than one to this type of variable.

A) transaction 

B) total 

C) validator 

D) accumulator Points Earned:

1.0/1.0

31.____ is a technique with which you try to prepare for all possible errors before they occur.

A) Incrementing 

B) Stub 

C) Nested loop 

D) Defensive programming Points Earned:

1.0/1.0

32.Business reports that list only totals, with no individual item details, are called ____.

Page 59: Programming Final Exam Review

A) detail reports 

B) summary reports 

C) transaction reports 

D) control-break reports Points Earned:

1.0/1.0

33.Loops are frequently used to ____; that is, to make sure it is meaningful and useful.

A) validate data 

B) restructure data 

C) simulate data 

D) corroborate data Points Earned:

1.0/1.0

34.Programmers employ the acronym ____ to mean that if your input is incorrect, your output is worthless.

A) IOW 

B) GIGO 

C) IOCW 

D) GIGS Points Earned:

1.0/1.0

35.____ a data item means you override incorrect data by setting the variable to a specific value.

A) Flexing 

B) Tracing 

C) Forcing 

D) Blanking 

Page 60: Programming Final Exam Review

Points Earned:

1.0/1.0

Points Awarded 34.00

Points Missed 1.00Percentage 97.1%

1.Every decision you make in a computer program involves evaluating a Boolean expression.

A) True B) False 

Points Earned:

1.0/1.0

2.In any Boolean expression, the two values compared can be either variables or constants.

A) True B) False 

Points Earned:

1.0/1.0

3.Any decision can be made using combinations of just two types of comparisons: equal and not equal.

A) True B) False 

Points Earned:

1.0/1.0

4.Most programming languages allow you to ask two or more questions in a single comparison.

A) True B) False 

Points Earned:

1.0/1.0

Page 61: Programming Final Exam Review

5.A short-circuit evaluation is where each part of an expression is evaluated only as far as necessary to determine whether the entire expression is true or false.

A) True B) False 

Points Earned:

1.0/1.0

6.When you need to satisfy two or more criteria to initiate an event in a program, you must make sure that the second decision is made entirely independently of the first decision.

A) True B) False 

Points Earned:

1.0/1.0

7.Besides AND and OR operators, most languages support a NOT operator.

A) True B) False 

Points Earned:

1.0/1.0

8.Most programming languages limit the number of AND and OR operators in an expression.

A) True B) False 

Points Earned:

1.0/1.0

9.When you combine AND and OR operators, the OR operators take precedence, meaning their Boolean values are evaluated first.

Page 62: Programming Final Exam Review

A) True B) False 

Points Earned:

1.0/1.0

10.You can use parentheses to override the default order of operations.

A) True B) False 

Points Earned:

1.0/1.0

11.A selection with an action that is associated with each of two possible outcomes is known as a(n) ____ selection.

A) unary B) binary C) octal D) semiconductor 

Points Earned:

1.0/1.0

12.The keyword that is NOT included in a single-alternative selection is ____.

A) if B) then C) else D) endif 

Points Earned:

1.0/1.0

13.Boolean expressions are named after ____.

Page 63: Programming Final Exam Review

A) Harold Boolean B) Henry Boole C) George Boole D) Gerhardt Boolean 

Points Earned:

1.0/1.0

14.____ operators require two operands.

A) Unary B) Tertiary C) Binary D) Double 

Points Earned:

1.0/1.0

15.The ____ sign means “greater than.”

A) < B) = C) <= D) > 

Points Earned:

1.0/1.0

16.Usually, ____ variables are not considered to be equal unless they are identical.

A) string B) integer C) character D) floating point 

Points Earned:

1.0/1.0

Page 64: Programming Final Exam Review

17.When you ask multiple questions before an outcome is determined, you create a ____ condition.

A) dual-alternative B) nested C) single-alternative D) compound 

Points Earned:

1.0/1.0

18.A(n) ____ decision is a decision in which two conditions must be true for an action to take place.

A) OR B) XOR C) AND D) OR-ELSE 

Points Earned:

1.0/1.0

19.A series of nested if statements is also called a ____ if statement.

A) stacked B) cascading C) bonded D) hooked 

Points Earned:

1.0/1.0

20.Most languages allow you to use a variation of the decision structure called the ____ structure when you must nest a series of decisions about a single variable.

A) blocked B) case 

Page 65: Programming Final Exam Review

C) AND IF D) logical 

Points Earned:

1.0/1.0

21.Most programming languages allow you to ask two or more questions in a single comparison by using a(n) ____ operator that joins decisions in a single statement.

A) AND B) OR C) IF D) XOR 

Points Earned:

1.0/1.0

22.For maximum efficiency, a good rule of thumb in an AND decision is to ____.

A) first ask the question that is more likely to be true B) first ask the question that is more likely to be false C) rewrite it as an OR decision and ask the question more likely to be true D) rewrite it as an OR decision and ask the question more likely to be false 

Points Earned:

1.0/1.0

23.____ evaluation is when each part of an expression that uses an operator is evaluated only as far as necessary to determine whether the entire expression is true or false.

A) Truth B) Short-circuit C) Binary D) Loop 

Points Earned:

1.0/1.0

Page 66: Programming Final Exam Review

24.When creating a truth table, you must determine how many possible Boolean value combinations exist for the conditions. If there are two conditions, ____ combinations will exist.

A) two B) four C) eight D) 16 

Points Earned:

1.0/1.0

25.In a truth table, the expression ____ is true.

A) true AND true B) true AND false C) false AND true D) false AND false 

Points Earned:

1.0/1.0

26.The conditional AND operator in Java, C++, and C# is ____.

A) & B) AND C) ** D) && 

Points Earned:

1.0/1.0

27.____ are diagrams used in mathematics and logic to help describe the truth of an entire expression based on the truth of its parts.

A) Decision matrices B) Decision diagrams 

Page 67: Programming Final Exam Review

C) Truth diagrams D) Truth tables 

Points Earned:

1.0/1.0

28.A(n) ____ decision is a decision in which at least one of two conditions must be true for an action to take place.

A) OR B) nested C) AND D) NOT 

Points Earned:

0.0/1.0

29.In a truth table, the expression ____ is false.

A) true OR true B) true OR false C) false OR true D) false OR false 

Points Earned:

1.0/1.0

30.For maximum efficiency, a good rule of thumb in an OR decision is to ____.

A) first ask the question that is more likely to be true B) first ask the question that is more likely to be false C) rewrite it as an AND decision and ask the question more likely to be true D) rewrite it as an AND decision and ask the question more likely to be false 

Points Earned:

1.0/1.0

Page 68: Programming Final Exam Review

31.C#, C++, C, and Java use the symbol ____ as the logical OR operator.

A) % B) $ C) || D) ^ 

Points Earned:

1.0/1.0

32.You use the logical ____ operator to reverse the meaning of a Boolean expression.

A) AND B) XOR C) OR D) NOT 

Points Earned:

1.0/1.0

33.You can perform a ____ by making comparisons using either the lowest or highest value in a range of values.

A) range check B) nested if C) logic check D) trivial expression 

Points Earned:

1.0/1.0

34.When you combine AND and OR operators, the ____ operators take precedence,meaning their Boolean values are evaluated first.

A) addition B) AND 

Page 69: Programming Final Exam Review

C) OR D) division 

Points Earned:

1.0/1.0

35.You can use ____  for clarity and to override the default order of operations.

A) parentheses B) truth tables C) multiplication D) NOT 

Points Earned:

1.0/1.0

Points Awarded 33.00

Points Missed 2.00Percentage 94.3%

1.Structured programs use spaghetti code logic.

A) True B) False 

Points Earned:

1.0

2.In a selection structure, you perform an action or task, and then you perform the next action in order.

A) True B) False 

Points Earned:

1.0

Page 70: Programming Final Exam Review

3.Repetition and sequence are alternate names for a loop structure.

A) True B) False 

Points Earned:

1.0

4.In a structured program, any structure can be nested within another structure.

A) True B) False 

Points Earned:

1.0

5.A structured program must contain a sequence, selection, and loop structure.

A) True B) False 

Points Earned:

1.0

6.Because you may stack and nest structures while retaining the overall structure, it might be difficult to determine whether a flowchart as a whole is structured.

A) True B) False 

Points Earned:

1.0

7.As a general rule, an eof question should always come immediately after an input statement because the end-of-file condition will be detected at input.

Page 71: Programming Final Exam Review

A) True B) False 

Points Earned:

1.0

8.Structured programming is sometimes called goto-less programming.

A) True B) False 

Points Earned:

1.0

9.No matter how complicated it is, any set of steps can always be reduced to combinations of the two basic structures of sequence and loop.

A) True B) False 

Points Earned:

1.0

10.The case structure is a variation of the sequence structure and the do loop is a variation of the while loop.

A) True B) False 

Points Earned:

1.0

11.Programs that use _____ code logic are unstructured programs that do not follow the rules of structured logic.

A) case B) loop C) spaghetti D) nested 

Page 72: Programming Final Exam Review

Points Earned:

1.0

12.With a(n) ____, you perform an action or task, and then you perform the next action, in order.

A) ordered structure B) sequence problem C) sequence structure D) loop sequence 

Points Earned:

1.0

13.The following pseudocode is an example of a ____ structure.  get firstNumber  get secondNumber  add firstNumber and secondNumber  print result

A) sequence B) decision C) loop D) nested 

Points Earned:

1.0

14.The following pseudocode is an example of a ____ structure.  if firstNumber is bigger than secondNumber then    print firstNumber  else    print secondNumber

A) sequence B) decision C) loop D) nested 

Points 1.

Page 73: Programming Final Exam Review

Earned: 0

15.Fill in the blank in the following pseudocode:if someCondition is true then   do oneProcess____   do theOtherProcess

A) then B) while C) do D) else 

Points Earned:

1.0

16.if-else examples can also be called ____ because they contain the action taken when the tested condition is true and the action taken when it is false.

A) do loops B) single-alternative selections C) repetition D) dual-alternative selections 

Points Earned:

1.0

17.The following pseudocode is an example of a ____ structure.  get number  while number is positive    add to sum    get number

A) sequence B) decision C) loop D) nested 

Points Earned:

1.0

Page 74: Programming Final Exam Review

18.You may hear programmers refer to looping as ____.

A) execution B) selection C) iteration D) case 

Points Earned:

1.0

19.The action or actions that occur within a loop are known as a(n) ____.

A) loop body B) action body C) loop internals D) structure body 

Points Earned:

1.0

20.The following pseudocode is an example of ____.do stepAdo stepBif conditionC is true then   do stepDelse   do stepEendifwhile conditionF is true   do stepGendwhile

A) nesting B) stacking C) single alternative structures D) a posttest 

Points Earned:

1.0

Page 75: Programming Final Exam Review

21.Attaching structures end to end is called ____ structures.

A) linking B) stacking C) nesting D) building 

Points Earned:

1.0

22.The following pseudocode is an example of ____.if conditionA is true then   do stepEelse   do stepB   do stepC   do stepDendif

A) nesting B) stacking C) a posttest D) a pretest 

Points Earned:

0.0

23.Placing a structure within another structure is called ____ structures.

A) nesting B) stacking C) shelling D) selecting 

Points Earned:

1.0

24.You can use an ____ statement to clearly show where the actions that depend on a decision end.

Page 76: Programming Final Exam Review

A) end B) endstructure C) endloop D) endif 

Points Earned:

1.0

25.The maximum number of entry points that any programming structure can have is ____.

A) zero B) one C) three D) five 

Points Earned:

1.0

26.A structured program includes only combinations of the three basic structures: ____.

A) sequence, iteration, and loop B) iteration, selection, and loop C) sequence, selection, and loop D) identification, selection, and loop 

Points Earned:

1.0

27.Structures can be stacked or connected to one another at their ____.

A) entry points only B) exit points only C) entry or exit points D) entry or combination points 

Points Earned:

1.0

Page 77: Programming Final Exam Review

28.A ____ read is an added statement that gets the first input value in a program.

A) nested B) stacked C) posttest D) priming 

Points Earned:

1.0

29.The priming read is an example of a(n) ____ task.

A) declaration B) exit C) housekeeping D) selection 

Points Earned:

1.0

30.In older languages, you could leave a selection or loop before it was complete by using a ____ statement.

A) loop B) go next C) next D) go to 

Points Earned:

1.0

31.Structured programs can be easily broken down into routines or ____ that can be assigned to any number of programmers.

A) segments B) modules 

Page 78: Programming Final Exam Review

C) units D) sequences 

Points Earned:

1.0

32.One way to straighten out an unstructured flowchart segment is to use the ____ method.

A) spaghetti code B) spaghetti bowl C) restructuring D) priming 

Points Earned:

1.0

33.A loop must return to the ____ question at some later point in a structure.

A) start loop B) loop-controlling C) master loop D) continue loop 

Points Earned:

1.0

34.The do loop is a variation of the ____ loop.

A) if-then-else B) while C) case D) sequence 

Points Earned:

1.0

35.

Page 79: Programming Final Exam Review

The case structure is a variation of the ____ structure.A) selection B) while C) sequence D) do 

Points Earned:

0.0

Points Awarded 35.00

Points Missed 0.00Percentage 100%

1.A variable can hold more than one value at any given moment in time.

A) True B) False 

Points Earned:

1.0/1.0

2.Because one memory location can be used repeatedly with different values, you can write program instructions once and then use them for thousands of separate calculations

A) True B) False 

Points Earned:

1.0/1.0

3.In many programming languages, if you declare a variable and do not initialize it, the variable contains an unknown value until it is assigned a value.

A) True B) False 

Page 80: Programming Final Exam Review

Points Earned:

1.0/1.0

4.Variable names can be more than one word with blanks between the words.

A) True B) False 

Points Earned:

1.0/1.0

5.The assignment operator has left-to-right-to-left associativity, which means that the value of the expression to the left of the assignment operator is evaluated first and that the result is assigned to the operand on the right.

A) True B) False 

Points Earned:

1.0/1.0

6.A string variable can hold digits such as phone numbers and zip codes.

A) True B) False 

Points Earned:

1.0/1.0

7.Programmers generally write programs as one long series of steps.

A) True B) False 

Points Earned:

1.0/1.0

8.Modularization makes it harder for multiple programmers to work on a problem.

Page 81: Programming Final Exam Review

A) True B) False 

Points Earned:

1.0/1.0

9.Program comments are a type of internal documentation.

A) True B) False 

Points Earned:

1.0/1.0

10.Most modern programming languages require that program statements be placed in specific columns.

A) True B) False 

Points Earned:

1.0/1.0

11.When you write programs, you work with data in three different forms: ____.

A) values; variables, or named values; and unnamed values B) variables; named constants; and named memory C) variables; literals, or unnamed constants; and named constants D) variations; transliterals, or unnamed constants; and named values 

Points Earned:

1.0/1.0

12.A specific numeric value is often called a(n) ____.

A) named constant B) defined constant 

Page 82: Programming Final Exam Review

C) arithmetic constant D) numeric constant 

Points Earned:

1.0/1.0

13.Fractional numeric variables that contain a decimal point are known as ____ variables.

A) partial B) string C) integer D) floating-point 

Points Earned:

1.0/1.0

14.In most programming languages, before you can use any variable, you must include a ____ for it.

A) declaration B) definition C) header D) proclamation 

Points Earned:

1.0/1.0

15.The process of naming program variables and assigning a type to them is called ____ variables.

A) initializing B) declaring C) identifying D) proclaiming 

Points Earned:

1.0/1.0

Page 83: Programming Final Exam Review

16.A variable’s unknown value is commonly called ____.

A) initial B) default C) deterministically random D) garbage 

Points Earned:

1.0/1.0

17.Declaring a starting value for a variable is known as ____ the variable.

A) initializing B) declaring C) defining D) identifying 

Points Earned:

1.0/1.0

18.When the variable starts with a lowercase letter and any subsequent word begins with an uppercase letter, this is called ____.

A) Hungarian notation B) Pascal casing C) camel casing D) Turing notation 

Points Earned:

1.0/1.0

19.When the first letter of a variable name is uppercase, as in HourlyWage, the format is known as ____ casing.

A) Hungarian notation B) Pascal casing 

Page 84: Programming Final Exam Review

C) camel casing D) Turing notation 

Points Earned:

1.0/1.0

20.____ is where a variable’s data type or other information is stored as part of the name.

A) Hungarian notation B) Pascal case C) Turing notation D) Camel case 

Points Earned:

1.0/1.0

21.The assignment operator is the ____ sign.

A) * B) + C) = D) / 

Points Earned:

1.0/1.0

22.A(n) ____ is similar to a variable, except it can be assigned a value only once.

A) unnamed constant B) literal C) named constant D) constant 

Points Earned:

1.0/1.0

23.

Page 85: Programming Final Exam Review

The ____ dictate the order in which operations in the same statement are carried out.A) rules of precedence B) statement rules C) operation rules D) rules of arithmetic 

Points Earned:

1.0/1.0

24.Depending on the programming language being used, modules are also known as ____ .

A) subroutines, procedures, or methods B) subroutines, code bits, or methods C) tasks, functions, or methods D) procedures, functions, or hierarchy 

Points Earned:

1.0/1.0

25.The process of breaking down a large program into modules is called ____.

A) decomposition B) modularization C) unification D) orientation 

Points Earned:

1.0/1.0

26.____ is the process of paying attention to important properties while ignoring nonessential details.

A) Abstraction B) Modularization C) Abbreviation D) Decomposition 

Points 1.0/1.

Page 86: Programming Final Exam Review

Earned: 0

27.Programmers say the statements that are contained in a module have been ____.

A) embedded B) decomposed C) encapsulated D) modularized 

Points Earned:

1.0/1.0

28.Programmers say that variables and constants declared within a module are ____ only within that module.

A) abstracted B) out of scope C) in scope D) in reference 

Points Earned:

1.0/1.0

29.____ variables and constants are known to the entire program.

A) Local B) Transient C) Heap D) Global 

Points Earned:

1.0/1.0

30.The mainline logic of almost every procedural computer program consists of these three distinct parts: ____ .

Page 87: Programming Final Exam Review

A) housekeeping tasks, processing tasks, and end-of-job tasks B) clearing tasks, detail loop tasks, and end-of-job tasks C) housekeeping tasks, detail loop tasks, and end-of-job tasks D) housekeeping tasks, detail loop tasks, and math tasks 

Points Earned:

1.0/1.0

31.When a program has several modules calling other modules, programmers often use a program ____, which operates similarly to an organizational chart, to show the overall picture of how modules are related to one another.

A) hierarchy chart B) tree chart C) flow chart D) data diagram 

Points Earned:

1.0/1.0

32.As programs become larger and more complicated, the need for good planning anddesign ____ .

A) decreases B) is inefficient C) is not necessary D) increases 

Points Earned:

1.0/1.0

33.An ____ is most often represented by a three-sided box that is connected to the step it references by a dashed line.

A) abstraction symbol B) annotation symbol C) abbreviation symbol D) enumeration symbol 

Page 88: Programming Final Exam Review

Points Earned:

1.0/1.0

34.Programmers refer to programs that contain meaningful names as ____.

A) undocumented B) procedurally documented C) formally documented D) self-documenting 

Points Earned:

1.0/1.0

35.A ____ variable is not used for input or output, but instead is just a working variable that you use during a program’s execution.

A) programming B) throw away C) temporary D) calculating 

Points Earned:

1.0/1.0

Points Awarded 34.00

Points Missed 1.00Percentage 97.1%

1.Software can be classified into two broad types: application software and programming software.

A) True B) False 

Points 1.0/1.

Page 89: Programming Final Exam Review

Earned: 0

2.The heart of the programming process lies in planning the program’s logic.

A) False B) True 

Points Earned:

1.0/1.0

3.A(n) ____ is a program that you use to create simple text files.

A) GDE B) GUI C) IDE D) text editor 

Points Earned:

1.0/1.0

4.A(n) ____ is a repeating flow of logic with no end.

A) variable B) infinite loop C) decision symbol D) nonterminated condition 

Points Earned:

1.0/1.0

5.If you use an otherwise correct word that does not make sense in the current context, programmers say you have committed a ____ error.

A) semantic B) logic 

Page 90: Programming Final Exam Review

C) programming D) syntax 

Points Earned:

0.0/1.0

6.____ errors are relatively easy to locate and correct because the compiler or interpreter you use highlights every error.

A) Process B) Logic C) Input D) Syntax 

Points Earned:

1.0/1.0

7.Every programming language has rules governing its word usage and punctuation.

A) False B) True 

Points Earned:

1.0/1.0

8.Computer programmers often refer to memory addresses using ____ notation.

A) mathematical B) indirect C) hexadecimal D) binary 

Points Earned:

1.0/1.0

9.Once a program is completely coded, it is ready for a company or organization to use.

Page 91: Programming Final Exam Review

A) True B) False 

Points Earned:

1.0/1.0

10.The ____ is the standard terminal symbol for a flowchart.

A) circle B) square C) lozenge D) diamond 

Points Earned:

1.0/1.0

11.The process of finding and correcting program errors is called ____.

A) syntax-checking B) desk-checking C) error correcting D) debugging 

Points Earned:

1.0/1.0

12.A(n) ____ is a software package that provides an editor, a compiler, and other programming tools.

A) GDE B) CGI C) IDE D) GUI 

Points Earned:

1.0/1.0

Page 92: Programming Final Exam Review

13.An infinite loop is a flow of program logic that repeats and never ends.

A) True B) False 

Points Earned:

1.0/1.0

14.The major difference between the two main programming styles in use today is the ____.

A) programmer’s focus during the earliest planning stages of a project B) use of flowcharts versus pseudocode C) testing procedure used by the programmer D) programming language used 

Points Earned:

1.0/1.0

15.A(n) ____ is a location on your computer screen where you type text entries to communicate with the computer’s operating system.

A) command line B) input line C) communication line D) GCI 

Points Earned:

1.0/1.0

16.Professional computer programmers write programs to satisfy their own needs.

A) False B) True 

Points Earned:

1.0/1.0

17.The ____ is used to represent output in a flowchart.

Page 93: Programming Final Exam Review

A) circle B) triangle C) parallelogram D) square 

Points Earned:

1.0/1.0

18.A(n) ____ tells the user what to enter.

A) data line B) prompt C) input screen D) command line 

Points Earned:

1.0/1.0

19.Alan Turing is often regarded as the first programmer.

A) False B) True 

Points Earned:

1.0/1.0

20.Many programming languages use the term ____ to refer to the marker that is used to automatically recognize the end of data in a file.

A) data_end B) end_data C) eod D) eof 

Points Earned:

1.0/1.0

Page 94: Programming Final Exam Review

21.Programmers can use either procedural programming or object-oriented programming to develop programs.

A) False B) True 

Points Earned:

1.0/1.0

22.A(n) ___ is a named memory location whose value can vary.

A) logic B) variable C) input D) output 

Points Earned:

1.0/1.0

23.Before a programmer plans the logic of the program, he or she must ____.

A) understand the problem B) write the program code C) maintain the program D) test the program 

Points Earned:

1.0/1.0

24.After a programmer plans the logic of a program, the next step is ____.

A) testing the program B) coding the program C) translating the program D) understanding the problem 

Points Earned:

1.0/1.0

Page 95: Programming Final Exam Review

25.A ____ allows users to interact with a program in a graphical environment.

A) GUI B) command line C) CGI D) GCI 

Points Earned:

1.0/1.0

26.____ data items may involve organizing or sorting them, checking them for accuracy, or performing calculations with them.

A) Outputting B) Processing C) Inputting D) Converting 

Points Earned:

1.0/1.0

27.Using ____ involves writing down all the steps you will use in a program.

A) pseudocode B) a flowchart C) an interpreter D) a compiler 

Points Earned:

1.0/1.0

28.The process of walking through a program’s logic on paper before you actually write the program is called ____.

A) flowcharting B) pseudocoding 

Page 96: Programming Final Exam Review

C) desk-checking D) testing 

Points Earned:

1.0/1.0

29.The repetition of a series of steps is called a(n) ____.

A) loop B) infinite loop C) repeat flow D) flow 

Points Earned:

1.0/1.0

30.Besides the popular, comprehensive programming languages such as Java and C++, many programmers use scripting languages such as Python, Lua, Perl, and PHP.

A) False B) True 

Points Earned:

1.0/1.0

31.Typically, a programmer develops a program’s logic, writes the code, and ____ the program, receiving a list of syntax errors.

A) tests B) compiles C) executes D) runs 

Points Earned:

1.0/1.0

32.In a flowchart, the ____ is used to represent processing.

Page 97: Programming Final Exam Review

A) rectangle B) circle C) diamond D) triangle 

Points Earned:

1.0/1.0

33.After programs are put into production, making necessary changes is called _____.

A) maintenance B) testing C) conversion D) debugging 

Points Earned:

1.0/1.0

34.You represent a decision in a flowchart by drawing a decision symbol, which is shaped like a ____.

A) parallelogram B) square C) circle D) diamond 

Points Earned:

1.0/1.0

35.A flowchart is an English-like representation of the logical steps necessary to solve aproblem.

A) False B) True 

Points Earned:

1.0/1.0