Week 4 Flashcards

1
Q

What’s a queue?

A

A first-in first-out structure of a list.

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

What does the enqueue function do?

A

The addition of an item to the end of the queue.

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

What does the dequeue function do?

A

Removes an item from the front of the queue.

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

What’s a stack?

A

A stack is a last-in first-out structure.

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

What does the push function do?

A

Addition of an element to the of the stack

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

What does the pop function do?

A

The removal of an element from the top of the stack.

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

What is a dictionary?

A

A collection of pairs with a key and a value.

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

What is a set?

A

A set is a datatype to which we can add or remove elements and we can check if an element is in the set or not. Sets are not ordered.

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

What is unit testing?

A

The process of testing program components such as methods or object classes.

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

How do use use visual studios to create a test method?

A

[TestClass()]
public class MyMathTests
{
[TestMethod()]
public void AddTest()
{

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

How do use use visual studios to create a test method?

A

[TestClass()]
public class MyMathTests
{
[TestMethod()]
public void AddTest()
{
int x = 1;
int y = -5;

//Act
int result = MyMatg.Add(x,y);

//Assertion
Assert.AreEqual(-4,result);
}
}

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

What does the Assert.Fail(); method do?

A

Always fails, a usual first assertion provided by the skeleton.

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

Other assert methods

A

AreEqual, AreNotEqual, IsFalse, IsTrue, IsNotNull

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