Generic programming in oop


Question 1: What do you mean by generic programming? How is it implemented in the c++?

Question 2: A template can be considered as a type of macro. Then, what is the basic difference between them?

Question 3: Differentiate between the overloaded functions and function templates.

Question 4: Differentiate between the word class template and the template class.

Question 5: A class template is termed as a parameterized class. Comment on it.

Question 6: Write down a function template for determining the minimum value contained in an array.

Question 7: Write down a class template to represent a generic vector. Comprise member functions to perform the given tasks:

a) To make the vector
b) To change the value of a given element
c) To multiply by a scalar values
d) To display the vector in the form (10, 20, 30 …)

Request for Solution File

Ask an Expert for Answer!!
C/C++ Programming: Generic programming in oop
Reference No:- TGS07810

Expected delivery within 24 Hours