Question: Please help with writing the code for the following. The language being used is C++ and I'm using vim to write the program. Thank you!
Please help with writing the code for the following. The language being used is C++ and I'm using vim to write the program. Thank you!

Remember not to include a main method in the files you submit. Project 6.a Write a class called Box that has three double fields called height, width and length. The class should have set methods for each feld. It should have a three-parameter constructor that takes three doubles and passes them to the set methods to initialize the fields of the Box. It should have a default constructor that uses the set methods to initialize each field to 1. It should have a method that calculates and returns the volume of the Box and a method that calculates and returns the surface area of the Box. The class declaration (interface) and the function definitions (implementation) must be in separate files - the interface or "header" file has a .hpp extension and the implementation has a.cpp extension. As usual, all data members should be private. The Box class might be used as follows Box box1(2.4, 7.1, 5.0) Box box2; double volume! = box1. calcVolume ( ); double surfaceArea box1 . calcSurfaceArea(); double volume2 = box2. calcVolume ( ); double surfaceArea2 box2 . calcSurfaceArea(); Your functions should have the following names setHeight . setWidth . setLengtlh .calcVolume . calcSurfaceArea The files must be named: Box.hpp and Box.cpp About using multiple files 1. Make sure you've read and understood section 7.11 2. Box.hpp should have "include guards" as discussed in section 7.11 (use "BOX_HPP") 3. Box.cpp needs to #include Box.hpp, when you include your own .hpp files (header files), put double quotes around them instead of angled brackets. (You should only #includehpp files, not .cpp files.) 4. When testing your program with your own main method, put it in a separate file (this is the "client" code) and give it a name with a.cpp extension 5. Your main method also needs to #include Box.hpp 6. If you named the file with your main method "boxMain.cpp", then you can compile your program with "g++ Box.cpp boxMain.cpp -o box
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
