COSC 1435 Exam 1 Review
The exam will be given on March 6 during regular class hours. You will have
an hour and 15 minutes to complete the exam. The exam will cover Computer
Science, An Overview, chapters 0, 1, & 5 and Starting Out With C++,
From Control Structures through Objects, chapters 2, 3, & 4. No notes
or reference material will be allowed for use during the exam. You will not
be allowed a calculator for this exam.
Most of the exam will be as follows:
- Multiple Choice/True False. A series of multiple choice and true false questions
to test your knowledge of terms and concepts in the Brookshear chapters.
- Short Answer Questions. These questions will be similar to the Questions
& Exercises (intermixed with the text). You should review all material
in the chapters as you prepare for the exam. Some questions will be directly
from this material. This includes material not covered during class lectures.
- Problems. You will be given problem, similar to the problems covered during
class, the homework, and in lab. These problems will be small and directly
reflect what we have discussed in class and the lab exercises.
- You will be given a C++ program, asked to look at the code, and show how
execution occurred and determine what will be the result of running this code.
You may also be asked to explain what each line of code accomplishes and how
it adds to the program.
Brookshear Chapter 0 - Introduction
- Understand what computer science is.
- What is an algorithm? Be able to break down the definition into its
parts and explain the parts.
- What is the role of algorithms in computer science?
- The text gives a brief overview of the history of computing. What were the
key events that were major milestones in the history of computer science?
- Understand the concept of abstraction.
Brookshear Chapter 1- Data Storage (We did not cover in Section 1.5 "Excess
Notation". In Section 1.8 you are only responsible for the general concept
of data compression, but not the details of the specific methods. We did not
cover Section 1.9.)
- Understand the basic Boolean operations.
- Understand what a gate is and how we can use gates to complete Boolean operations.
- Given a circuit diagram similar to those in Figure 1.4, be able to determine
the output of the circuit for any valid set of binary inputs.
- Understand the hexadecimal encoding system. Be able to convert from base-10
integers to 16-bit hexadecimal and then back to base-10.
- How is memory used in a computer?
- What is the difference between the address and the contents of a memory
- What is the difference between random access memory, used in main memory,
and mass storage?
- How does a magnetic disk work? Now the key terms from section 1.3.
- Understand how text is stored as bit patterns.
- How is numeric information stored in bit patterns?
- Understand how images and sound are stored in computers.
- Understand binary notation is used to store positive and negative numbers
- Be able to convert positive and negative numbers to 16-bit binary numbers
and back again. Be able to add binary numbers.
- How do computers subtract binary numbers?
- What is the primary issue involved with storing both positive and negative
numbers in binary notation?
Brookshear Chapter 5 - Algorithms
- Know the definition of an algorithm as used in chapter 5. Understand the
terms used in this definition
- What are the problems with natural language that cause problems in writing
- Why is pseudocode preferable to natural language or a formal computer language
for writing algorithms?
- What are the common sequential operations used in pseudocode?
- What is a variable?
- What is a conditional statement? Be able to diagram how a conditional-statement
works similarly to slide 12, of chapter 5
- What is a iterative statement? Be able to diagram how an iterative-statement
works similarity to slide 15, of chapter 5
- Know the pseudocode primitive statements as outlined in the text
- Know the difference between a pretest and a posttest loop
- What is recursion? How is it used in computer science?
- How do we measure algorithm efficiency?
Gaddis Chapter 2 - Introduction to C++
- What are the parts of a C++ program?
- What are the cout and cin objects and how are they used?
- Why is white space used in C++ programs?
- Understand the different types of variables and how they are defined
- Escape sequences play a key part in C++ programs. Be able to give examples
of escape sequences and how they interplay with 'cout'?
- Know how and why variables are declared
- What is variable initialization and how is it accomplished
- Know the different types of integer and floating point variables and be
able to tell why we need different types of data types
- Understand variable scope
- Understand arithmetic operators and how precedence works
- How do you add comments to C++ code?
- Be able to use cin and cout to do simple input and output
Gaddis Chapter 3 - Expressions and Interactivity
- What is a string?
- Be able to translate between a mathematical expression and C++ syntax
- Understand type conversions and know what occurs when a type conversion
takes place between C++ intrinsic data types
- Understand underflow and overflow and be able to give operations and examples
where this might occur
- What are named constants used for?
- Give examples of common mathematical functions and be able to properly use
them (Table 3 - 13)
- Understand the C++ programming style taught in the text and in class and
be able to look at C++ code and determine whether it uses good programming
- How do we format output and input in C++?
- Understand how to use common mathematical library functions
Gaddis, Chapter 4 - Making decisions
- What is a relational operator?
- Know how to use all forms of an if statement
- Understand logical operators and be able to use them
- Know how to compare strings
- Be able to use the switch statement