Class Flashcards

1
Q

Abstraction in C#

A

Process of showing only essential information to user

Missing or incomplete implementation

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

Abstract class

A
base class cannot be used to create objects only can be accessed from inherited objects
cannot be static class
cannot have multiple inheritance
cannot be inherited from structures
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Abstract method

A

used only in abstract class without body and can be used by derived/inherited class

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

default access modifier

A

most restricted acess to that member

class —> internal

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

Indexer

A

Instance of a class or struct to be indexed as an array

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

Arguments to console application

A

string array object

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

DDL commands

A

Create, alter, truncate, drop

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

DML commands

A

Insert, update, delete,select

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

Default constructor parameters

A

zero. when no constructor defined

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

Connection pooling

A

Cache of the connection established so as to reuse when further requests to the database

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

struct / structure

A

value type – single variable hold related info/record

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

Cardianility

A

Relationship is one to one, one to many or many to many

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

Inheritance

A
Allow to define a class in terms or another class from one base class only  Object class is the ultimate base class
struct does not support inheritance
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Restriction to be a Base class

A

Only time class cannot be used as base class

  1. sealed
  2. only private constructors
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Polymorphism

A

Class to have multiple implementations with the same name
Static/Compile time polymorphism –>Early Binding
–>overloading
Dynamic/Runtime polymorphism —>Late Binding
–>overridng

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

Access base class virtual member

A

base.A()

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

shadowing

A
using 'new' keyword to hide the base class member
[method hiding]
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

nested class

A
class inside another class to logically group 
--->encapsulation
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

encapsulation

A

data hiding –>mark all variables as private and use public get set method to access data
or hiding the complexity

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

Garbage collection

A

The process of releasing memory

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

root

A

storage location with the reference to an object in managed heap

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

clrMD

A

Diagnostics. Runtime inspect crash dump and attach to live process and perform all sorts of queries against the runtime

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

MongoDb`

A

Collection and concepts
Database is a physical container of collections
Database –>Collection of documents/tables
Document–>Row or key value pairs

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

Hexadecimal

A

0-9 ABCDEF

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

Dynamic variable

A

Change variable type at run time based on assigned value

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

ExpandoObject

A

Will let you add objects at runtime

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

dynamic contact=new ExpandoObject()

A

statically typed object of expandoobject type

28
Q

value types are stored in stack and reference type in heap

A

int inside a class is stored in heap

29
Q

Objectcache xxx=memoryCache.Default in c#

A

In MVC controller can have attribute

OutputCache(duration:inseconds)

30
Q

Objectcache xxx=memoryCache.Default in c#

A

In MVC controller can have attribute
Default location: webserver,webbrowser, proxyserver)
OutputCache(duration:inseconds)

31
Q

main method is static

A

callable without creating an instance of a class

32
Q

data type

A

defines the size of memory to store data

33
Q

javascript – primitive, composite and special datatypes

A

primitive - string, boolean and number
composite - object array and function
special - undefined and null

34
Q

control transfer statement

A

break; continue

35
Q
control structure, repetitive statements
While loop
Do while loop
for loop
for each
A

control transfer statement break; continue,goto, throw

Continue statement can be used to go to the next iteration without exiting the loop

36
Q

do while loop executes once before condition reaches

A

while loop checks the condition before executing

37
Q

Recursion

A

Calls the method by itself

38
Q

Stackoverflowexception

A

very deep and unbounded recursion

39
Q

Objects are self contained data structures with events, properties and methods

A

properities are called smart fields –>data represent
Method —>behavior
events —>communication

40
Q

constructors

A

special methods executed when a class is initiated

41
Q

property has 2 accessors

A

get and set the value of property

42
Q

data fields are declared private

A

Accessed using public properties

43
Q

Delegates

A

Encapsulates a method with a special signature

44
Q

Delegates

A

Encapsulates a method with a special signature

public delegate void RectangleHandler(Rectangle rect)

45
Q

namespace

A

organize code and use unique class names

46
Q

int, byte, bool, char struct value type

A

string, class, interface, object, delegate, class are reference types

47
Q

Assembly

A

Unit of executable code .exe or dll

48
Q

Access modifies namespace - default public

class - internal

A

no access modifiers allowed for namespace

public and internal for class

49
Q

Abstract method provides a definition, no implementation

A

Any member of the class is abstract, class itsellf need to be marked as abstract

50
Q

cast an object any of it base types

A

Cast to its class types or any of the base class types

51
Q

is operator to check casting can be done

A

as operator returns null is casting failed

52
Q

Icomparable namespace interface

A

int compareto(Object obj)

53
Q

Interface

A

Class that implements interface must implement all methods of the interface

54
Q

Class can have multiple interfaces can have only one base clas

A

Class is a template for object creation
Properties are data
Methods behavior
Events communication

55
Q

Managed code - generated by c# compiler executed by CLR

A

Unmanaged code compiled to native machine code executed by operating system

56
Q

Unit Testing – unit of code testing
Integration testing —integration of components testing
(component works with external webservice etc)
System Testing – overall testing of system software
Acceptance testing —>Alpha testing and Beta testing
Regression testing ->make sure nothing is broken with new functionality implementation

A

Black Box Testing – Input output testing

White Box Testing — unit testing —

57
Q

Stack data structure – LIFO or FILO

Last in first out

A

push, pop, peek

heterogenous auto resize

58
Q
WCF-- Interface IService and class composite type
svc similar to asmx(web service)
A

IService –>OperationContract
CompositeType — >datacontract with datamember
communication mode –>tcp, http, named pipelines msmq and peer to peer

59
Q

Boxing is the process of converting a value type too reference type

A

stack to heap

60
Q

ArrayList can hold all variable types

A

array list is heterogeneous

Array is homogeneous

61
Q

Queue is a collection first in first out FIFO

circular array with head index and tail

A

Queue is heterogeneous- different variable types

Enqueue, dequeue, peek and contains

62
Q

Docker – container application

Docker Service, Kubernates, Service Fabric to work with multiple services in containers

A

container application are easy for debugging, deployment and testing

63
Q

Linked list is a collection of nodes with each node has a link to the next node in the sequence

A

Deletion and insertion fast and no limit to the size

64
Q

Sorting –> BubbleSort and QuickSort

A

Bubblesort —>comparison and swap

65
Q

Database bottlenecks:

A

abnormal cpu usage

memory leak — not enough RAM and database started using swap memory

66
Q

WCF–>endpoint

Address, Binding and Contract

A

Address: uri
Binding: HttpBinding or wshttpBinding
Contracts: Service, Data and Operation