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
Dynamic variable
Change variable type at run time based on assigned value
26
ExpandoObject
Will let you add objects at runtime
27
dynamic contact=new ExpandoObject()
statically typed object of expandoobject type
28
value types are stored in stack and reference type in heap
int inside a class is stored in heap
29
Objectcache xxx=memoryCache.Default in c#
In MVC controller can have attribute | OutputCache(duration:inseconds)
30
Objectcache xxx=memoryCache.Default in c#
In MVC controller can have attribute Default location: webserver,webbrowser, proxyserver) OutputCache(duration:inseconds)
31
main method is static
callable without creating an instance of a class
32
data type
defines the size of memory to store data
33
javascript -- primitive, composite and special datatypes
primitive - string, boolean and number composite - object array and function special - undefined and null
34
control transfer statement
break; continue
35
``` control structure, repetitive statements While loop Do while loop for loop for each ```
control transfer statement break; continue,goto, throw | Continue statement can be used to go to the next iteration without exiting the loop
36
do while loop executes once before condition reaches
while loop checks the condition before executing
37
Recursion
Calls the method by itself
38
Stackoverflowexception
very deep and unbounded recursion
39
Objects are self contained data structures with events, properties and methods
properities are called smart fields -->data represent Method --->behavior events --->communication
40
constructors
special methods executed when a class is initiated
41
property has 2 accessors
get and set the value of property
42
data fields are declared private
Accessed using public properties
43
Delegates
Encapsulates a method with a special signature
44
Delegates
Encapsulates a method with a special signature | public delegate void RectangleHandler(Rectangle rect)
45
namespace
organize code and use unique class names
46
int, byte, bool, char struct value type
string, class, interface, object, delegate, class are reference types
47
Assembly
Unit of executable code .exe or dll
48
Access modifies namespace - default public | class - internal
no access modifiers allowed for namespace | public and internal for class
49
Abstract method provides a definition, no implementation
Any member of the class is abstract, class itsellf need to be marked as abstract
50
cast an object any of it base types
Cast to its class types or any of the base class types
51
is operator to check casting can be done
as operator returns null is casting failed
52
Icomparable namespace interface
int compareto(Object obj)
53
Interface
Class that implements interface must implement all methods of the interface
54
Class can have multiple interfaces can have only one base clas
Class is a template for object creation Properties are data Methods behavior Events communication
55
Managed code - generated by c# compiler executed by CLR
Unmanaged code compiled to native machine code executed by operating system
56
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
Black Box Testing -- Input output testing | White Box Testing --- unit testing ---
57
Stack data structure -- LIFO or FILO | Last in first out
push, pop, peek | heterogenous auto resize
58
``` WCF-- Interface IService and class composite type svc similar to asmx(web service) ```
IService -->OperationContract CompositeType --- >datacontract with datamember communication mode -->tcp, http, named pipelines msmq and peer to peer
59
Boxing is the process of converting a value type too reference type
stack to heap
60
ArrayList can hold all variable types
array list is heterogeneous | Array is homogeneous
61
Queue is a collection first in first out FIFO | circular array with head index and tail
Queue is heterogeneous- different variable types | Enqueue, dequeue, peek and contains
62
Docker -- container application | Docker Service, Kubernates, Service Fabric to work with multiple services in containers
container application are easy for debugging, deployment and testing
63
Linked list is a collection of nodes with each node has a link to the next node in the sequence
Deletion and insertion fast and no limit to the size
64
Sorting --> BubbleSort and QuickSort
Bubblesort --->comparison and swap
65
Database bottlenecks:
abnormal cpu usage | memory leak --- not enough RAM and database started using swap memory
66
WCF-->endpoint | Address, Binding and Contract
Address: uri Binding: HttpBinding or wshttpBinding Contracts: Service, Data and Operation