Explain the terms constructors and destructors, Computer Engineering

Assignment Help:

When we initialize the form at that time if we require to set any variable's value then we can set it by defining in constructor. Constructor's name always similar as class name and destructor is used to recover memory occupied by any variable important in constructor. Constructor and destructor is the new method in object oriented languages to initialize the variables at the time of object creation.

When we declare an object, we can pass the values to it and that values will be assigned to the data members of that class, whose object it is. A class can have no. of objects & no. of constructors. A constructor is called automatically when an object is formed. There is only one destructor in any class, that is to deallocated the memory of the object when an object is cracked or no longer exist  

 


Related Discussions:- Explain the terms constructors and destructors

Computer network architecture, A protocol is a formal description of messag...

A protocol is a formal description of message formats and the rules two or more machines must follow to exchange those messages. Because TCP (transmission control protocol) and IP

Nanoprogramming - computer architecture, Nanoprogramming:  Second c...

Nanoprogramming:  Second compromise: nanoprogramming  it use a 2-level control storage organization  Top level is a vertical format memory  Output of the top level

Dbms, Find a 3NF decomposition of the following relation scheme: University...

Find a 3NF decomposition of the following relation scheme: University (Faculty, Dean, Department, Chair, Professor, Rank, Student}. The University relation satisfies the following

Explain naming convention scripts, Explanation:- A script within Rationa...

Explanation:- A script within Rational Robot is a file that haves a sequence of SQABasic code. The extension of the file is always ".REC". Syntax [FEATURE] + "_" + [FUNCTION

How does vb.net achieve polymorphism, How does VB.NET/C# achieve polymorphi...

How does VB.NET/C# achieve polymorphism?  VB.Net / C# provide polymorphism through the following mechanisms: 1. Inheritance - base class gives overridable methods which ar

Assembly language - computer architecture, Assembly language: An assem...

Assembly language: An assembly program has a series of instructions--mnemonics that relate to a stream of executable instructions, when translated by an assembler that may be

Classification of digital computer, CLASSIFICATION  OF DIGITAL COMPUTER ...

CLASSIFICATION  OF DIGITAL COMPUTER Computer are classified under a number of factors.Some people classify them according to their processing speed.main memory,technology used

Use string manipulating functions , Write a script that will first initiali...

Write a script that will first initialize a string variable that will kept x and y coordinates of a point in the form 'x 3.1 y 6.4'.  Then, use string manipulating functions to ext

Write program to simulate conversation with an old and deaf, You are going ...

You are going to write a program to simulate a conversation with an old, deaf relative. You can type your statements, and whatever you say, the relative will reply randomly with on

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd