63 203
Assignments Done
99,3%
Successfully Done
In July 2018

Answer to Question #8429 in C++ for Cheryl

Question #8429
is having two methods in a class permissible? why?
explain the purpose of a constructor and the implication of having two in one class.
Expert's answer
Methods may be several. The method in object-oriented programming - it is a function or procedure, belonging to any class or object. In object-oriented programming class constructor - a special block of instructions is called when an object is created. The constructor method is similar to but different from the method that does not explicitly defined the return type is not inherited, and usually has different rules for consideration of modifiers. Constructors are often distinguished by having the same name as the class name, which is declared. Their task - to initialize the members of the object

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions