Get premium membership and access questions with answers, video lessons as well as revision papers.
One reason of overloading a constructor is to provide flexibility, allowing you to choose the most appropriate constructor in the specific instance.
Another is to allow both initialized an uninitialized objects to be declared.you might want to overload a constructor so that dynamic arrays can be allocated.
Githiari answered the question on February 4, 2018 at 12:55
- Give one disadvantage of reference parameters.(Solved)
Give one disadvantage of reference parameters.
Date posted: February 4, 2018. Answers (1)
- What is the general forms of new that is used to initialize a dynamic variable? Give a correct example.(Solved)
What is the general forms of new that is used to initialize a dynamic variable? Give a correct example.
Date posted: February 4, 2018. Answers (1)
- Given a pointer to an object in a C++, what operator is used to access a member of that object?(Solved)
Given a pointer to an object in a C++, what operator is used to access a member of that object?
Date posted: February 4, 2018. Answers (1)
- What is a reference in programming? What is one advantage of using a reference parameter?(Solved)
What is a reference in programming? What is one advantage of using a reference parameter?
Date posted: February 4, 2018. Answers (1)
- Show the general forms for 'new' and 'delete'.What are some advantages of using them instead of using malloc() and free() in a C++ program.(Solved)
Show the general forms for 'new' and 'delete'.What are some advantages of using them instead of malloc() and free() in a C++ program.
Date posted: February 4, 2018. Answers (1)
- What is the 'this' pointer in a program code?(Solved)
What is the 'this' pointer in a program code?
Date posted: February 4, 2018. Answers (1)
- What is a friend function in a computer program?(Solved)
What is a friend function in a computer program?
Date posted: February 4, 2018. Answers (1)
- Explain why you must be careful when passing object to a function or returning objects from a function in a program.(Solved)
Explain why you must be careful when passing objects to a function or returning objects from a function in a program.
Date posted: February 4, 2018. Answers (1)
- Can the address of an object in a program be passed to a function as an argument?(Solved)
Can the address of an object in a program be passed to a function as an argument?
Date posted: February 4, 2018. Answers (1)
- What single prerequisite must be met in order for one object to be assigned to another during program creation?(Solved)
What single prerequisite must be met in order for one object to be assigned to another during program creation?
Date posted: February 4, 2018. Answers (1)
- Provide a troubleshooting guide to a computer that is unable to join a domain(Solved)
Provide a troubleshooting guide to a computer that is unable to join a domain.
Date posted: February 1, 2018. Answers (1)
- Explain major components which together constitute the open system(Solved)
Explain major components which together constitute the open system
Date posted: January 24, 2018. Answers (1)
- Outline the characteristics of a system(Solved)
Outline the characteristics of a system
Date posted: January 24, 2018. Answers (1)
- Define:
a)System
b) Information System
c) Computer application
d) System Analyst(Solved)
Define:
a)System
b) Information System
c) Computer application
d) System Analyst
Date posted: January 24, 2018. Answers (1)
- State and briefly describe the four methods that define the structure of an Applet.(Solved)
State and briefly describe the four methods that define the structure of an Applet.
Date posted: January 24, 2018. Answers (1)
- Explain the procedure for converting an applet to an application.(Solved)
Explain the procedure for converting an applet to an application.
Date posted: January 24, 2018. Answers (1)
- Using a code snippet show how to set the layout of a user interface.(Solved)
Using a code snippet show how to set the layout of a user interface.
Date posted: January 24, 2018. Answers (1)
- Differentiate between the following layout managers
i. GridLayout
ii. BorderLayout
iii. FlowLayout(Solved)
Differentiate between the following layout managers
i. GridLayout
ii. BorderLayout
iii. FlowLayout
Date posted: January 24, 2018. Answers (1)
- Explain the difference between the AWT components and the Swing Components using examples(Solved)
Explain the difference between the AWT components and the Swing Components using examples
Date posted: January 24, 2018. Answers (1)
- Distinguish between abstract classes and interfaces(Solved)
Distinguish between abstract classes and interfaces
Date posted: January 24, 2018. Answers (1)