Friday, June 20, 2014

Class XII - Chapter 03 Function Overloading

Function Overloading 


Function Overloading is C++'s implementation of OOP's feature polymorphism.

So,
 Here the solutions of this chapter, to the Questions from sections: 'Short Answer Questions'(from Q5 on-wards except Q9) and 'Long Answer Questions'(Q1) . 

Kindly note that solutions from this blog only includes coding part for rest of answer statements you can discuss on our blog'sor choose do it urself.

Click on the 'Download Solutions' link of the correspond question to download the ZIP file.

Q. What is in ZIP file ?
A. The zip file contains following:
  • dotTXT(.txt) format text files in which answer is written.
  • dotCPP(.cpp) file having appropriate coding required to run the functions. Note that many questions in this chapter doesn't require full running coding, only a part or statement is required.
  • dotEXE(.exe) executable file of the cpp code.
*Download link for Solutions of question marked with '*' will be activated soon.*

TYPE A : SAQ


Ques 5. "Here are some desired efects. Indicate whether each can be accomplished with default arguments, with function overloading, with both, or with neither. Provide appropriate prototypes. ..."
       

"Note to Students:- function prototype only means the declaration part, however, I have included a sample definition part too for the desired effects so that you can know how to deal with various situations." 

           (i). "repeat (10, '-') displays......"
Sol. Q5(i) - Download Solution

Q5(ii). "average(4,7) returns int average of two..."
Sol Q5(ii). - Download Solution

Q5(iii). "mass(density, volume) returns the mass of....."
Sol Q5(iii). - Download Solution

Q5(iv). "average(4,7) returns an int average of the two..."
*Sol Q5(iv) - Download Solution

Q5(v). "handle (a-character) returns the reversed case..."
*Sol Q5(v) - Download Solution
------------------------------------------------------------------------------------
Ques 6. "Write function definitions for question 7 on page 119."
*Sol Q6 - Download Solution
------------------------------------------------------------------------------------
Ques 7. "Write function definitions for question 8 on page 119."
*Sol Q7 - Download Solution
------------------------------------------------------------------------------------
Ques 8. "Write definitions for two versions of an overloaded function. This function's 1st version sum() takes an argument, int array......."
*Sol Q8 - Download Solution
------------------------------------------------------------------------------------
Ques 10. "Raising a number n to a power p is the same as multiplying n by itself p times. Write as ....."
*Sol Q10 - Download Solution.
------------------------------------------------------------------------------------

TYPE B : LAQ

Q1. "Given below are incomplete definitions of two classes :
               Class Item ......."
*Download Solution

No comments:

Post a Comment

If you have any query,suggestion,request or complaint(if any),
Please Comment here and let me know. And Do not Abuse here
Thanks & don't forget to hit '+1'.

Note: Only a member of this blog may post a comment.