Vous êtes sur la page 1sur 25

Your Name Hardik Padhariya

Test Date 10th April 2019


Start Time 11:30 AM
End Time
Marks Earned 30
Total Marks 65

# Question

1 Explain delcarative knowledge and imperative knowledge

2 Explain difference between Interpreter and compiler

In the context of programming, what does primiitives mean? Give an


3 example

4 In the context of programming, What is static semantics?

5 Explain Newton-Ralphson method

6 Explain actual parameters and formal parameters with an example

8 Explain Name space


9 Explain Lexical Scoping

10 Expalin Test suite

11 Explain overt bug and covert bug

12 What is asymptotic analysis

13 Explain decomposition in brief

14 Explain Abstraction

15 What is a class?

16 What is an object?

17 What is Encapsulation?

18 What is Polymorphism?
19 What is Inheritance?

20 What are manipulators?

21 Define a constructor?

22 What is function overloading?

23 What is operator overloading?

24 What is an abstract class?


25 What is method overriding?

26 What is exception handling?

27 What are tokens?

28 Difference between overloading and overriding?

30 What are the various types of constructors?


31 What is the difference between structure and a class?

32 What is dynamic or run time polymorphism?

33 What is a base class, sub class, and super class?

35 What is "Order of growth" of any algorithm

36 Define computational complexity of an algorithm

List different complexity classes of an algorithm. Give one example for each

What is the time complexity of following code in terms of big O notation:


int a = 0;
for (i = 0; i < N; i++) {
for (j = N; j > i; j--) {
37 a = a + i + j;
}
}
What is the time complexity of following code in terms of big O notation:
int i, j, k = 0;
for (i = n / 2; i <= n; i++) {
for (j = 2; j <= n; j = j * 2) {
38 k = k + n / 2;
}
}

39 What is Positive and Negative Testing?

40 What is Test Environment?

41 What is test coverage?

42 What is Code coverage?

44 What is Top-Down Approach?

45 What is Non-Functional Testing?


47 What is Bug Severity?

48 What is Bug Priority?

49 What is SDLC?

50 What is traceability matrix?

51 What are the different test levels?

52 Explain what the meaning of Code Walk Through is?

53 Explain what it means by test harness?

55 Explain the term Stress Testing and Load testing.


56 What is binary search? Explain recursive binary search?

57 What is selection sort

58 What is merge sort


Correct Answer Marks

Declarative Knowledge refers to facts or information stored in the memory, that is


considered static in nature 1
Imperative knowledge is the knowledge exercised in the performance of some task

Interpreters and compilers are very similar in structure. The main difference is that an
interpreter directly executes the instructions in the source programming language 1
while a compiler translates those instructions into efficient machine code

A primitive is the smallest 'unit of processing' available to a programmer of a given 1


machine, or can be an atomic element of an expression in a language.

Syntax is about the structure or the grammar of the language. It answers the
question: how do I construct a valid sentence? All languages, even English and other 1
human (aka "natural") languages have grammars, that is, rules that define whether or
not the sentence is properly constructed.

method for finding successively better approximations to the roots (or zeroes) of a 1
real-valued function. It is one example of a root-finding algorithm.

Actual Parameters: The values/variables passed while calling a function are called
actual parameters.
1
Formal Parameters: ... The value(s) of the actual parameters are copied to formal
parameters when the call to that function is made

A namespace is a set of symbols that are used to organize objects of various kinds, so 1
that these objects may be referred to by name
Is a convention used with many programming languages that sets the scope (range of
functionality) of a variable so that it may only be called (referenced) from within the 1
block of code in which it is defined. The scope is determined when the code is
compiled.

is a collection of test cases that are intended to be used to test a software program to 1
show that it has some specified set of behaviours.

“Overt” means “done or shown openly” while “covert” means “not displayed or 1
openly acknowledged.

Asymptotic analysis refers to computing the running time of any operation in 1


mathematical units of computation.

Decomposition in computer science, also known as factoring, is breaking a complex


problem or system into parts that are easier to conceive, understand, program and 1
maintain

Through the process of abstraction, a programmer hides all but the relevant data 1
about an object in order to reduce complexity and increase efficiency.

A class is simply a representation of a type of object. It is the blueprint/ plan/ 1


template that describes the details of an object.

An object is an instance of a class. It has its own state, behavior, and identity. 1

Encapsulation is an attribute of an object, and it contains all data which is hidden.


That hidden data can be restricted to the members of that class. 1
Levels are Public, Protected, Private, Internal and Protected Internal.

Polymorphism is nothing but assigning behavior or value in a subclass to something


that was already declared in the main class. Simply, polymorphism takes more than 1
one form.
Inheritance is a concept where one class shares the structure and behavior defined in
another class. If inheritance applied on one class is called Single Inheritance, and if it 1
depends on multiple classes, then it is called multiple Inheritance.

Manipulators are the functions which can be used in conjunction with the insertion 1
(<<) and extraction (>>) operators on an object. Examples are endl and setw.

A constructor is a method used to initialize the state of an object, and it gets invoked
at the time of object creation. Rules forconstructor are:
1
Constructor Name should be same as class name.
A constructor must have no return type.

unction overloading an as a normal function, but it can perform different tasks. It


allows the creation of several methods with the same name which differ from each
other by the type of input and output of the function.
Example 1
void add(int& a, int& b);
void add(double& a, double& b);
void add(struct bob& a, struct bob& b);

Operator overloading is a function where different operators are applied and depends
on the arguments. Operator,-,* can be used to pass through the function, and it has 1
their own precedence to execute

An abstract class is a class which cannot be instantiated. Creation of an object is not


possible with an abstract class, but it can be inherited. An abstract class can contain 1
only Abstract method. Java allows only abstract method in abstract class while for
other languages allow non-abstract method as well.
Method overriding is a feature that allows a subclass to provide the implementation
of a method that overrides in the main class. This will overrides the implementation 1
in the superclass by providing the same method name, same parameter and same
return type.

An exception is an event that occurs during the execution of a program. Exceptions


can be of any type – Runtime exception, Error exceptions. Those exceptions are 1
adequately handled through exception handling mechanism like try, catch and throw
keywords.

The token is recognized by a compiler, and it cannot be broken down into component
elements. Keywords, identifiers, constants, string literals and operators are examples
of tokens.
1
Even punctuation characters are also considered as tokens – Brackets, Commas,
Braces and Parentheses.

Overloading is static binding whereas Overriding is dynamic binding. Overloading is


nothing but the same method with different arguments, and it may or may not return
the same value in the same class itself. 1
Overriding is the same method names with same arguments and return types
associated with the class and its child class.

There are three various types of constructors, and they are as follows:

– Default Constructor – With no parameters. 1


– Parametric Constructor – With Parameters. Create a new instance of a class and
also passing arguments simultaneously.
Structure default access type is public , but class access type is private. A structure is
used for grouping data whereas class can be used for grouping data and methods. 1
Structures are exclusively used for data, and it doesn’t require strict validation , but
classes are used to encapsulates and inherit data which requires strict validation

Dynamic or Run time polymorphism is also known as method overriding in which call
to an overridden function is resolved during run time, not at the compile time. It 1
means having two or more methods with the same name, same signature but with
different implementation.

The base class is the most generalized class, and it is said to be a root class.

A Sub class is a class that inherits from one or more base classes. 1

The superclass is the parent class from which another class inherits.

Order of growth in algorithm means how the time for computation increases when 1
you increase the input size.

The amount of resources required for running the algorithm 1

Constant Complexity
Logarithmic Complexity
Linear Complexity 12
Log-Linear Complexity
Polynomial Complexity
Exponential Complexity

O(N*N) 1
O(nLogn) 1

Positive Testing: It is to determine what system supposed to do. It helps to check


whether the application is justifying the requirements or not.
1
Negative Testing: It is to determine what system not supposed to do. It helps to find
the defects from the software.

Test Environment is the combination of hardware and software on which Test Team
1
performs testing.

Test coverage helps in measuring the amount of testing performed by a set of tests.
Test coverage can be done on both functional and non-functional activities. It assists 1
testers to create tests that cover areas which are missing.

Code coverage is different from Test coverage. Code coverage is about unit testing
practices that must target all areas of the code at least once. It is usually done by 1
developers or unit testers.

Testing takes place from top to bottom. High-level modules are tested first and then
low-level modules and finally integrating the low-level modules to a high level to 1
ensure the system is working as intended. Stubs are used as a temporary module if a
module is not ready for integration testing.

In simple words, how well the system performs is non-functionality testing. Non-
functional testing refers to various aspects of the software such as performance, load, 1
stress, scalability, security, compatibility etc., Main focus is to improve the user
experience on how fast the system responds to a request.
Bug/Defect severity can be defined as the impact of the bug on customer’s business.
It can be Critical, Major or Minor. In simple words, how much effect will be there on 1
the system because of a particular defec

Defect priority can be defined as how soon the defect should be fixed. It gives the
order in which a defect should be resolved. Developers decide which defect they 1
should take up next based on the priority. It can be High, Medium or Low. Most of the
times the priority status is set based on the customer requirement.

Software Development Life Cycle (SDLC) aims to produce a high-quality system that
meets or exceeds customer expectations, works effectively and efficiently in the 1
current and planned information technology infrastructure, and is inexpensive to
maintain and cost-effective to enhance.

The relationship between test cases and requirements is shown with the help of a 1
document. This document is known as a traceability matrix.

Unit/component/program/module testing
Integration testing 1
System testing
Acceptance testing

Code Walk Through is Cthe informal analysis of the program source code to find 1
defects and verify coding techniques

A test harness is configuring a set of tools and test data to test an application in
various conditions, and it involves monitoring the output with expected output for 1
correctness.

Stress Testing is a form of performance testing where the application is bound to go


through exertion or stress i.e. execution of application above the threshold of the 1
break to determine the point where the application crashes. This condition usually
arises when there are too many users and too much of data.
Recursive binary search is an implementation of the binary search algorithm that uses
recursive method calls (instead of iteratively searching for the item within a single
method call)
2
Binary search, also known as half-interval search, logarithmic search, or binary chop,
is a search algorithm that finds the position of a target value within a sorted array.
Binary search compares the target value to the middle element of the array.

The selection sort algorithm sorts an array by repeatedly finding the minimum
element (considering ascending order) from unsorted part and putting it at the
beginning. The algorithm maintains two subarrays in a given array.

1) The subarray which is already sorted. 1


2) Remaining subarray which is unsorted.

In every iteration of selection sort, the minimum element (considering ascending


order) from the unsorted subarray is picked and moved to the sorted subarray.

Merge Sort is a Divide and Conquer algorithm. It divides input array in two halves,
calls itself for the two halves and then merges the two sorted halves. The merge()
function is used for merging two halves. The merge(arr, l, m, r) is key process that 1
assumes that arr[l..m] and arr[m+1..r] are sorted and merges the two sorted sub-
arrays into one
Marks
earned

0
0

1
1

0
0

0
1

1
0

0
0

0
2

1
Decomposition, Abstractions, Functions
Recursion
Testing, Debugging, Exceptions, Assertions
Object Oriented Programming
Program Efficiency
Searching and Sorting

Vous aimerez peut-être aussi