Skip to content

Latest commit

 

History

History

5 - Sobrecarga de Operadores

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

Sobrecagra de Operadores


Exercício 1:

Definition of member function simplify. This method checks for values in the inches member greater than twelve or less than zero. If such a value is found, the numbers in feet and inches are adjusted to conform to a standard feet & inches expression.

For example:
3 feet 14 inches would be adjusted to 4 feet 2 inches and 5 feet -2 inches would be adjusted to 4 feet 10 inches.

 void FeetInches::simplify() {

    // method implementation

 }

img1

Execício 2:

img2

Execício 3:

img3

Execício 4:

img4