CS109 Midterm Exam Topics
The CS109 exams are all open book and open notes.
This year we will try something different and you will be allowed to use a
computer in
the CS Lab (or our notebook) while working on your exam. However, the exams
are not open-neighbor! You will have a variety of questions on
the exam. There will be a small number of short-answer questions. There
will be more questions where you will be asked to write some code. I will also
give you some existing code and your job will be to add on or complete
it. The topics that will be covered are listed below:
Overview of
Computers
-
Major components of a computer
- Major components of the
Computer
- How data is represented
- Bits to store numbers, characters, images, instructions
- Concept of low level machine code
- Opcode, operand
- Programs written in machine code
- Difference between assembly code, machine code, high-level compiled code
- Concept of the virtual machine
.NET Framework
- What .NET is, relationship to Visual Basic .NET
- Difference from older languages that compile to
directly executable code
- Advantages of the .NET framework
Computer Programming Overview
- What an algorithm is, why it is important
- Be able to design something using
flowcharts or pseudocode
VB.NET Form Design
- Dragging controls onto a form
- Textbox, Label, Listbox, Button, Checkbox, Radiobutton, Picturebox
- Setting properties of the control
- Text, Items, Name, Size, Position, Colors, etc.
- Adding text to a button, label, textbox
- Events
- What an event is, e.g. MouseClick, ButtonClick, Form Load ...
- How to add code in an event
Identifiers and Variables
-
Valid/Invalid identifiers
-
Data Types
-
Understand the concept of a data type
-
Know
String, Integer, Double,
Single - when it is appropriate to use each
-
Variables
-
What they are, how to
define them using a Dim statement
-
Assigning values to variables, initialization
-
Shorthand notations for assignment, e.g. +=, *=
...
-
Scope
of a variable declared at the subroutine
level vs. a variable declared at the Class level
Expressions and Operations
-
Basic
operators of +, -, *, /, ^, mod
-
String operations: & for concatenation,
length, substring
-
Type casting
-
Issues in using CDbl, CInt, CStr
- Reading from
text boxes or InputBox
-
Outputting to text boxes, MessageBox, or console
-
Boolean Expressions
-
=, <>, <, >, <
= , >
=
-
Combining with AND and OR and NOT to
produce complex logical expressions to be used in if
statements
Flow Control
-
If-then statement along with if-then-else
-
Select Case statement
Loops
- How to use while loops (be able to write code with
one loop level, or a loop with an if-statement inside)
Miscellaneous
-
Difference between Class/Module-level scope vs. Local scope of
variables
-
What option strict on does
-
How to use the integrated debugger
-
How to generate random numbers
-
Know how to draw lines, circles, rectangles, a pixel and the graphics coordinate
system
-
Understand the RGB color scheme and how to create a
color