programminga general overview class square publicexplicit squaredouble sides double getsideconst return sidedouble getareaconst return side sidedouble getperimeterconst return sidevoid printostream out cout const out <"(square <getside<")"bool operatorconst square rhs const return getsiderhs getside)privatedouble side}/define an output operator for square ostream operator<ostream outconst square rhs rhs printout )return outint mainvector square }square }square }cout <"largest square<findmaxv <endlreturn figure comparable can be class typesuch as square figure shows an example of class type that implements the functionality required of comparable and illustrates operator overloading operator overloading allows us to define the meaning of built-in operator the square class represents square by storing the length of side and defines operatorthe square class also provides zero-parameter constructoroperator=and copy constructor (all by defaultthusit has enough to be used as comparable in findmax