Skip to content

rishavraj12321/Constructor_Overloading

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

Constructor_Overloading

Create a class named 'Box' with three data members- length, breadth and height and a method to calculate the volume which is 'lengthbreadthheight'. The class has three constructors which are : 1 - Having no parameter - values of both length, breadth and height are assigned zero. 2 - Having three numbers as parameters - the three numbers are assigned as length, breadth and height respectively. 3 - Having one number as parameter - all length, breadth and height are assigned that number. Now, create objects of the 'Box' class having none, one and three parameters and print their volume.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages