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

Define flowchart, Define Flowchart. A  process  of  expressing  an  alg...

Define Flowchart. A  process  of  expressing  an  algorithm  by  a  collection  of  linked  geometric  shapes   containing explanations of the algorithm's steps.

The first digit of a decimal constant, The first digit of a decimal constan...

The first digit of a decimal constant must be Decimal constants having of a set of digit, 0 to 9, preceded by an optional - or + sign.

Dynamic configuration of parallel virtual machine, Q. Dynamic Configuration...

Q. Dynamic Configuration of parallel virtual machine? int pvm_addhosts( char **hosts, int nhost, int *infos ) Add hosts to virtual machine. hosts is an arra

What is system-software, What is System-software? System-software is co...

What is System-software? System-software is collection of system programs which perform a variety of functions, name are: file editing, IO management, recourse accounting and s

What are different queues used, 1.Local queue -is a actual queue 2.Clus...

1.Local queue -is a actual queue 2.Cluster queue -is a local queue that is called as throughout a cluster of queue managers 3. Remote queue -structure explaining a queue

What is called when network address prefixed by 1110, Network address prefi...

Network address prefixed by 1110 is a? Network address prefixed through 1110 is a multicast address.

Define device interface, Define device interface. The buffer registers ...

Define device interface. The buffer registers DATAIN and DATAOUT and the status flags SIN and SOUT are part of circuitry commonly called as a device interface.

Array, list advantages of array

list advantages of array

What is gui status, What is GUI status? How to create /Edit GUI status? ...

What is GUI status? How to create /Edit GUI status? A GUI status is a subset of the interface elements used for a certain screen. The status comprises those elements that are c

Break keys, Like a normal read, your input should break on the new line cha...

Like a normal read, your input should break on the new line character "\n"   and also on the up and down arrow keys. You will process the input made by the user when he/she enters

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