Midterm Flashcards

1
Q

What is object-oriented programming?

A

A programming methodology where programmers create software objects that model things.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Why do people like OOP?

A

It enhances programmer productivity and reduces software costs.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Machine vs assembley vs high level languages.

A

Machine language is directly understood by computers.
Assembly language uses English like abbreviations to represent elementary operations.
High-level languages are translated to machine language using compiler programs.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What are objects and methods used for?

A

Objects are reusable software components and methods are used to perform a task in a program.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How are objects created?

A

Objects are created with attributes and behaviors.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What are the characteristics of the C# language?

A

C# is event-driven and a visual programmin glanguage that allows for multiple tasks to be performed at the same time.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is the Common Language Runtime (CLR) and platorm independence?

A

CLR provides functionality that makes .NET programs easier to develop and debug.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is an IDE used for?

A

An IDE (integrated development environment) provides programmers with tools to aid in software development and allows you to write, run, test, and debug C# programs quickly.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What are namespaces and code blocks?

A

Namespaces are named collections of classes.

Code blocks are defined by curly brackets ({ }).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

C# comments

A

’//’ comments out a single-line

‘//’ comments out multiple lines.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Naming Conventions

A

Cannot use keywords, pick a name that is descriptive, but not too long, class names should have each new word capitalized, identifiers should use camelBack casing.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

How do you write to the console?

A

Conosle.WriteLine( ) or Console.Write( )

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is a variable and how do you declare one?

A

A memory location where a value can be stored for use later in an app.
Declared with a name and type.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Characteristics of C# integers and types.

A

32 bit integer value

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Integer Math

A

Follows order of operations (PEMDAS)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What are the main categories of structured programming?

A

Sequence statements, repetition statements, selection statements.

17
Q

Conditions

A

An expression that can be classified as true or false.

18
Q

Three types of selection statements.

A

if statement
if else statement
else if statement

19
Q

C# Error Types

A

Dangling-else: which if is the else associated with?
Logic Errors: only effect resulting output
Syntax Errors

20
Q

The four types of repetition statements

A

While loop
do while loop
for loop
infinite loop

21
Q

Control/Counter variables

A

Control: typing in something that matches with the control variable to end the loop

Counter: adding a value to a variable till it matches the number you want to reach

22
Q

Assignment Operator

A

A variable is definitely assigned when its guaranteed to be assigned a value before being used.

23
Q

Sentinel vs counter controlled repetitions

A

Sentinel: values that signify the end of data entry
Counter: counts till it reaches a number to end the loop

24
Q

Variable Scope

A

Defines where the variable can be use in an application

25
Q

Break vs Continue

A

Break: causes an immediate exit from the statement
Continue: skips the remaining statements in the loop body and proceeds with the next iteration

26
Q

Characteristics of C# arrays

A

Fixed-length
Elements must all be the same type
Indexing starts at 0
c.Length gets the length of array c

27
Q

Array-access and creation expressions

A

Need to specify a type and length

28
Q

C# Constants

A

const declares a constant
Muse be initialized when declared and cannot be modified
Should be written in capital letters

29
Q

Jagged Arrays

A

Maintained as a 1D array referring to another 1D array’s elements
More flexible than other arrays
Length of the arrays DO NOT need to be the same
Each 1D array needs to be initialized separately

30
Q

Rectangular Arrays

A

Each row has the same number of rows and columns

Can be accessed with arrayName[row,column]