CSC 222 Exam 2: Programming Tools, Recursion, and
Abstraction
1. What does the "IPO" in "IPO chart" mean?: Input - Process - Output
2. What are the 3 elements of an IPO chart?: 1. Inputs needed to obtain the desired output.
2. Processes needed to convert the input into the desired output
3. Outputs needed to solve the problem. May include user prompts.
3. What does the "Command Line Interface" do?: It provides a direct interface with the
Operating System to call and run programs.
4. What are "Algorithms" and "Flowcharts" for?: They are used to map the logic needed to solve
the problem.
5. What is "Version Control"?: A software used to keep track of different versions of the same
piece of software.
6. What do "Test Environments" do?: They offer controlled environments to help ensure that your
program behaves as intended.
Programs can be broken down into smaller components and tested one piece at a time. This is
referred to as "Unit Testing".
7. What is an "IDE"? (and what do the letters stand for?): Integrated Develop- ment Environment -
A set of program development tools integrated into a single piece of software. An IDE normally
includes a programming language editor that includes automatic syntax checking, a compiler to
convert source code into the appropriate machine code, a runtime environment to test the
code, and debugging tools.
IDEs: Replit, VSCode, Eclipse, etc.
8. What is "debugging"?: The process of finding and removing/correcting errors in a program.
9. What does "JVM" stand for, and what is it?: "Java Virtual Machine" - It is an interpreter that
translates the Java Bytecode into the local machine code in real time. This means that the
bytecode is translated into the local machine code while the program is running.
10.What are the 3 steps Java requires to run a program on a computer?: (1) Write source code -
the code is written in a way humans can read. This file must have a .java file extension, i.e.
MyProgram.java
*don't forget to debug it
(2)Compile - the compiler is a computer program that takes a .java file in and outputs a .class
bytecode file. The command line executes this as: "javac MyProgram.java"
, CSC 222 Exam 2: Programming Tools, Recursion, and
Abstraction
and produces: "MyProgram.class" bytecode.
(3) Interpret - The bytecode file contains machine language code for the Java Virtual Machine
(JVM) that translates the Java Bytecode into the local machine code in real time (while your
program runs). THe name of the Java runtime program is "java.exe" and executes from the
command line as: "java MyProgram".
11.What does the command line or terminal allow the user to do?
A.) directly interact with the operating system
B.) directly interact with a program
C.) directly interact with the hard drive
D.) directly interact with the monitor: A.) directly interact with the operating system
The command line is a communication link to the operating system. This allows the user to run
programs and then interact with those programs through the OS.
12.What is the primary purpose of Version Control Software?
A.) Keeps track of multiple versions of a program.
B.) Keep track of bug fixes.
C.) Keep track of who worked on a program.: A.) Keeps track of multiple versions of a program.
Version Control Software allows a programmer to maintain different versions do the same
program. These versions may be created at separate time or by separate programmers at the
same time.
13.What is the main function of a Debugging Tool?
A.) Automatically correct errors in a program.
B.) Allow a programmer to examine how individual instructions are working.
C.) Document errors in a program.
D.) Allow the programmer to examine how their program is working.: D.) Allow the programmer to
examine how their program is working.
Through the use of break points and stepping through a program one or more lines at a time, a
programmer can examine how their program is working.
14.What does a "break point" do?: It interrupts a program while it's running and checks a
variable's value.
15.What is the "command line" also known as?: The "terminal"
16.The command line can be used to ...
A.) Navigate to a directory
, CSC 222 Exam 2: Programming Tools, Recursion, and
Abstraction
B.) Run graphical programs
C.) Shut down the computer
D.) All of these: D.) All of these
Things that the operating system can do using GUI controls can be done from the command
prompt, as well as many things that cannot be done easily from a GUI.
17.What does "GUI" stand for, and what is an example of one?: Graphical User Interface - where
actions are accomplished through the use of the mouse and menus
i.e. in Finder, when you click on folders and find folders within folders as well as files. Something
like "MyFile.doc" in the "MyFolder" folder would be the same as "User/MyFolder/MyFile.doc" in
the terminal, but GUI accomplishes it in a way that people can follow visually and use their
mouse to click through.
18.A user can directly interact with the OS through the ...: Command line terminal
19.Why is having a Version Control system is so Important?
A.) It allows software to be fully test by providing version links into the testable units of the software.
B.) It allows multiple programmers to safely work on different programs.
C.) It allows the merging of code from different programmers working on the same program.
D.) Itallows other programmers to see what another programmer is currently working on.: C.) It
allows the merging of code from different programmers working on the same program.
20.What does "VCS" stand for and what is it/what information is kept inside it?: Version Control
Software/Systems - it stores info about who/what/when/why changes were made to versions of
code.
21.When using a centralized VCS, what two things must happen to be able to see your changes in a
program?
A.) you commit, they update
B.) you update, they update
C.) you commit, they commit
D.) you update, they commit: A.) you commit, they update
, CSC 222 Exam 2: Programming Tools, Recursion, and
Abstraction
First the person changing a program must commit their changes to the central repository, then
the second person must update their copy from the repository.
22.What are the three basic types of Version Control Systems?: Central, Dis- tributed, and Local.
Central holds the master copy of all versions in a single location. Central repository VCSs have
the advantage of having a single place to keep updated but can suffer cardiotropic failure if that
repository fails.
Distributed makes many copies of the versions so if on repository fails the versions are available
from another distributed site. Distributed suffers from an increased complexity to keep all
repositories up to date.
Local VCSs are generally used by a single programmer to help keep track of his work or a small
group of programmers who work at eht same site.
23.What is a "testbench"?: A program whose job is to thoroughly test another program (or
portion) via a series of input/output checks known as "test cases".
24.What is "unit testing"?: To create and run a testbench for a specific item (or "unit"), like a
method or a class.
25.What are the 4 features of a good testbench?: *F*ailures printed only (auto- matic "check"s --
means passed test pass on auto w/o a print)
*I*ndependent test cases.
*B*order cases included in addition to typical values.
*100*% code coverage -- every line of code is executed.
26.What are the steps to creating a testbench?: (1) Initiate the class object, perhaps with a
"test"-related name.
(2) Print "Beginning tests." or something.
(3) Build if-statements that print "FAILED " if the output value != what was
expected.
27.(T/F) If a testbench achieves 100% code coverage and all tests passed, the class must be bug
free.: False: 100% code coverage is one goal of testing, but doesn't guarantee correctness.
Different input values may yield different behavior for the same line of code.
28.What is "regression testing"?: To retest an item like a class anytime that item is changed; if
previously-passed test cases fail, the item has "regressed".
A testbench should be maintained along with the item, to always be usable for regression
testing.
Abstraction
1. What does the "IPO" in "IPO chart" mean?: Input - Process - Output
2. What are the 3 elements of an IPO chart?: 1. Inputs needed to obtain the desired output.
2. Processes needed to convert the input into the desired output
3. Outputs needed to solve the problem. May include user prompts.
3. What does the "Command Line Interface" do?: It provides a direct interface with the
Operating System to call and run programs.
4. What are "Algorithms" and "Flowcharts" for?: They are used to map the logic needed to solve
the problem.
5. What is "Version Control"?: A software used to keep track of different versions of the same
piece of software.
6. What do "Test Environments" do?: They offer controlled environments to help ensure that your
program behaves as intended.
Programs can be broken down into smaller components and tested one piece at a time. This is
referred to as "Unit Testing".
7. What is an "IDE"? (and what do the letters stand for?): Integrated Develop- ment Environment -
A set of program development tools integrated into a single piece of software. An IDE normally
includes a programming language editor that includes automatic syntax checking, a compiler to
convert source code into the appropriate machine code, a runtime environment to test the
code, and debugging tools.
IDEs: Replit, VSCode, Eclipse, etc.
8. What is "debugging"?: The process of finding and removing/correcting errors in a program.
9. What does "JVM" stand for, and what is it?: "Java Virtual Machine" - It is an interpreter that
translates the Java Bytecode into the local machine code in real time. This means that the
bytecode is translated into the local machine code while the program is running.
10.What are the 3 steps Java requires to run a program on a computer?: (1) Write source code -
the code is written in a way humans can read. This file must have a .java file extension, i.e.
MyProgram.java
*don't forget to debug it
(2)Compile - the compiler is a computer program that takes a .java file in and outputs a .class
bytecode file. The command line executes this as: "javac MyProgram.java"
, CSC 222 Exam 2: Programming Tools, Recursion, and
Abstraction
and produces: "MyProgram.class" bytecode.
(3) Interpret - The bytecode file contains machine language code for the Java Virtual Machine
(JVM) that translates the Java Bytecode into the local machine code in real time (while your
program runs). THe name of the Java runtime program is "java.exe" and executes from the
command line as: "java MyProgram".
11.What does the command line or terminal allow the user to do?
A.) directly interact with the operating system
B.) directly interact with a program
C.) directly interact with the hard drive
D.) directly interact with the monitor: A.) directly interact with the operating system
The command line is a communication link to the operating system. This allows the user to run
programs and then interact with those programs through the OS.
12.What is the primary purpose of Version Control Software?
A.) Keeps track of multiple versions of a program.
B.) Keep track of bug fixes.
C.) Keep track of who worked on a program.: A.) Keeps track of multiple versions of a program.
Version Control Software allows a programmer to maintain different versions do the same
program. These versions may be created at separate time or by separate programmers at the
same time.
13.What is the main function of a Debugging Tool?
A.) Automatically correct errors in a program.
B.) Allow a programmer to examine how individual instructions are working.
C.) Document errors in a program.
D.) Allow the programmer to examine how their program is working.: D.) Allow the programmer to
examine how their program is working.
Through the use of break points and stepping through a program one or more lines at a time, a
programmer can examine how their program is working.
14.What does a "break point" do?: It interrupts a program while it's running and checks a
variable's value.
15.What is the "command line" also known as?: The "terminal"
16.The command line can be used to ...
A.) Navigate to a directory
, CSC 222 Exam 2: Programming Tools, Recursion, and
Abstraction
B.) Run graphical programs
C.) Shut down the computer
D.) All of these: D.) All of these
Things that the operating system can do using GUI controls can be done from the command
prompt, as well as many things that cannot be done easily from a GUI.
17.What does "GUI" stand for, and what is an example of one?: Graphical User Interface - where
actions are accomplished through the use of the mouse and menus
i.e. in Finder, when you click on folders and find folders within folders as well as files. Something
like "MyFile.doc" in the "MyFolder" folder would be the same as "User/MyFolder/MyFile.doc" in
the terminal, but GUI accomplishes it in a way that people can follow visually and use their
mouse to click through.
18.A user can directly interact with the OS through the ...: Command line terminal
19.Why is having a Version Control system is so Important?
A.) It allows software to be fully test by providing version links into the testable units of the software.
B.) It allows multiple programmers to safely work on different programs.
C.) It allows the merging of code from different programmers working on the same program.
D.) Itallows other programmers to see what another programmer is currently working on.: C.) It
allows the merging of code from different programmers working on the same program.
20.What does "VCS" stand for and what is it/what information is kept inside it?: Version Control
Software/Systems - it stores info about who/what/when/why changes were made to versions of
code.
21.When using a centralized VCS, what two things must happen to be able to see your changes in a
program?
A.) you commit, they update
B.) you update, they update
C.) you commit, they commit
D.) you update, they commit: A.) you commit, they update
, CSC 222 Exam 2: Programming Tools, Recursion, and
Abstraction
First the person changing a program must commit their changes to the central repository, then
the second person must update their copy from the repository.
22.What are the three basic types of Version Control Systems?: Central, Dis- tributed, and Local.
Central holds the master copy of all versions in a single location. Central repository VCSs have
the advantage of having a single place to keep updated but can suffer cardiotropic failure if that
repository fails.
Distributed makes many copies of the versions so if on repository fails the versions are available
from another distributed site. Distributed suffers from an increased complexity to keep all
repositories up to date.
Local VCSs are generally used by a single programmer to help keep track of his work or a small
group of programmers who work at eht same site.
23.What is a "testbench"?: A program whose job is to thoroughly test another program (or
portion) via a series of input/output checks known as "test cases".
24.What is "unit testing"?: To create and run a testbench for a specific item (or "unit"), like a
method or a class.
25.What are the 4 features of a good testbench?: *F*ailures printed only (auto- matic "check"s --
means passed test pass on auto w/o a print)
*I*ndependent test cases.
*B*order cases included in addition to typical values.
*100*% code coverage -- every line of code is executed.
26.What are the steps to creating a testbench?: (1) Initiate the class object, perhaps with a
"test"-related name.
(2) Print "Beginning tests." or something.
(3) Build if-statements that print "FAILED " if the output value != what was
expected.
27.(T/F) If a testbench achieves 100% code coverage and all tests passed, the class must be bug
free.: False: 100% code coverage is one goal of testing, but doesn't guarantee correctness.
Different input values may yield different behavior for the same line of code.
28.What is "regression testing"?: To retest an item like a class anytime that item is changed; if
previously-passed test cases fail, the item has "regressed".
A testbench should be maintained along with the item, to always be usable for regression
testing.