study guide

2
1 CS225: Exam #1 Review/Study Guide Thomas College Fall, 2015 Your first exam will be on Friday, October 2 nd in Room AD-225. The exam itself is closed- book, closed-notes, closed-computer, etc. consisting of 25-30 multiple choice and short answer questions. The material for the exam will be drawn from the following, in order of importance: The lecture slides Head First C#, Chapters 1 & 2 Labs 1 & 2 Assignments 1 & 2 To help you focus your studying, here are the topics that are candidates for exam questions: Introduction to C# (Chapter 1) Be prepared to describe what a program and a framework are. Know the purposes of machine code and high-level programming languages Know the components of the .NET framework Know the roles of the following in relation to developing and running C# programs: o Common Language Runtime (JIT compiler and native code) o Common Intermediate Language (assemblies) o Compiling and linking Know C#’s basic coding rules o Case-sensitive class, variable, function and namespace names o How C# treats whitespace Be familiar with the Console class and its commands. o Two versions of WriteLine() – with and without string placeholders o ReadLine() Know the difference between syntax and logic errors Variables & Expressions (Chapter 2) Know the basic structure of a C# program (blocks, statements) Know what code comments are and how to write them Know what variables are o Three parts (name, type, value) o Declaring variables

Upload: alex-elcewicz

Post on 09-Feb-2016

5 views

Category:

Documents


0 download

DESCRIPTION

enjoy

TRANSCRIPT

1  

CS225: Exam #1 Review/Study Guide Thomas College Fall, 2015 Your first exam will be on Friday, October 2nd in Room AD-225. The exam itself is closed-book, closed-notes, closed-computer, etc. consisting of 25-30 multiple choice and short answer questions. The material for the exam will be drawn from the following, in order of importance:

The lecture slides

Head First C#, Chapters 1 & 2

Labs 1 & 2

Assignments 1 & 2 To help you focus your studying, here are the topics that are candidates for exam questions: Introduction to C# (Chapter 1)

Be prepared to describe what a program and a framework are.

Know the purposes of machine code and high-level programming languages

Know the components of the .NET framework

Know the roles of the following in relation to developing and running C# programs: o Common Language Runtime (JIT compiler and native code) o Common Intermediate Language (assemblies) o Compiling and linking

Know C#’s basic coding rules o Case-sensitive class, variable, function and namespace names o How C# treats whitespace

Be familiar with the Console class and its commands. o Two versions of WriteLine() – with and without string placeholders o ReadLine()

Know the difference between syntax and logic errors

Variables & Expressions (Chapter 2)

Know the basic structure of a C# program (blocks, statements)

Know what code comments are and how to write them

Know what variables are o Three parts (name, type, value) o Declaring variables

2  

Know the 12 simple numeric data types and their storage capabilities (i.e., # of bytes or bits)

Understand floating-point numbers vs. integers.

Know what literal values are (numeric and string)

Know what the string placeholder syntax is

Know what the escape character (“\”) is and when it is useful

Be prepared to discuss how assignment works Know the various mathematical and assignment operators Be familiar with operator precedence Know the key concepts of a debugger (breakpoints, stepping, and variable inspection) Be prepared to discuss how Debug.WriteLine() differs from

Console.WriteLine()

Decisions (introduced in Chapter 2)

Know what if and if-else statements are, and how to set up testing conditions

o Know the single-line format as well as the block {} format

Be familiar with else if, as well as switch statements. o Know the proper way to express dual and multiple alternatives (i.e. avoiding

successive if() statements with tests that are logically-connected)

Know the various conditional operators in C#.

Be familiar with the bool type, Boolean operators, and basic Boolean logic (i.e., truth tables)

Loops (introduced in Chapter 2)

Be familiar with loops o while loops

o for loops o What three components are essential to every loop?

Know the scope of variables inside and outside loops

Know what an off-by-one error is

Know the different ways to interrupt loops (break, continue, return)

Know the good practices when using for loops o Don’t update counters inside the loop o Remember to use semi-colons between expressions inside the for ( ) o Don’t use != as the end-of-range test

Look over the common algorithms for loops Be familiar with nested loops