[Cpp]/** Copyright (c) 2013, School of Computer Science, Yantai University * All rights reserved. * file name: test. cpp * Author: Fan Lulu * Completion Date: July 15, March 18, 2013 * version: v1.0 ** input Description: none * Problem description: * program output: * Problem Analysis: * Algorithm Design: slightly */# include <iostream> using namespace std; class Block {public: void set_date (); void volume (); // volume void areas (); // surface area private: float length; float width; float heigth;}; void Block: set_date () {cout <"Enter the length, width, and height of the cube in sequence :"; cin> length> Width> heigth;} void Block: volume () {float V; V = length * width * heigth; cout <"the size of the cube is" <V <". "<Endl;} void Block: areas () {float S; S = 2 * (length * width + width * heigth + length * heigth ); cout <"the surface area of the cube is" <S <". "<Endl ;}int main () {Block block; cout <" first cube "<endl; Block. set_date (); block. volume (); block. areas (); cout <"second cuboid" <endl; block. set_date (); block. volume (); block. areas (); cout <"third cuboid" <endl; block. set_date (); block. volume (); block. areas (); return 0 ;}