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

What do you mean by single construct in fortan, Q. What do you mean by Sing...

Q. What do you mean by Single Construct in FORTAN? Single construct specifies the associated structured block is executed by just one thread in team (not essentially the master

How to manage the web based projects, How to manage the web based projects?...

How to manage the web based projects? Many project management applications contain additional functions useful in the management of group projects. These features may contain g

Determine about the programmable read only memory, Programmable read only m...

Programmable read only memory (PROM) A PROM is a memory chip on which data can be written only one time. Once a program has been written onto a PROM, it's permanent. Unlike RAM

Define about classes of object oriented modelling, Define about classes of ...

Define about classes of object oriented modelling A class is a collection of things, or concepts that have the same properties. Each of these concepts or things is known an obj

Responsibilities of objects, The Transaction object is responsible for read...

The Transaction object is responsible for reading the transaction file, finding the relevant account in the array of customers and applying the transaction. To find the relevant ac

What is typical storage hierarchy, Q. What is typical storage hierarchy? ...

Q. What is typical storage hierarchy? A typical storage hierarchy is displayed in Figure above. Though Figure shows only block diagram however it includes storage hierarchy:

Multiple instruction and multiple data stream (mimd), Multiple Instruction ...

Multiple Instruction and Multiple Data stream (MIMD) In this association, multiple control units and multiple processing elements are prepared as in MISD. But the discrepancy i

How to information transfer from one register to another, Q. How to Informa...

Q. How to Information transfer from one register to another? Information transfer from one register to another is designated in symbolic notation by a replacement operator. For

How is a microsoft crm workflow tool enabled, How is a Microsoft CRM Workfl...

How is a Microsoft CRM Workflow tool enabled? A Microsoft CRM Workflow tool enables certainly one to as given below: • Explain business policies based upon established proce

Implication connective - modus ponens rule, Implication connective - Modus ...

Implication connective - Modus ponens rule: We notice that this is a trivial example, so it highlights how we use truth tables: as the first line is the only one when both abo

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