Month: September 2021

b) Write the definition for a class called “cuboidSolid” that has length, breadth, height, and mass has float data members. The class has a following member functions. Setters and getters for each of the data members. float getVolume() that returns the volume of the metal float getSurfaceArea() that returns the surface area float getDensity() that returns the density Write a main program to illustrate the use of the above class.

Write the definition for a class called cuboidSolid that has length, breadth, height, and mass has float data members. CPP / Assignment 9 / Set A

a) Write the definition class called ‘time’ that has hours, minutes & seconds as integer data members. The class has the following member functions as follow: void settime(int, int, int) to set the specified values of hours, minutes, and seconds in object void showtime() to display contents of time object time add(time) add the corresponding values of hours, minutes and seconds (<60) in time object argument to current time object and make appropriate conversions and return time. time diff(time) subtract values of hours, minutes, and seconds in time object argument from current time object after making appropriate conversions and return time difference. Write a main program to illustrate the use of the above class.

CPP / Assignment 9 / Set A