Chapter 11: Problem 18
Following is the definition for a class called Percent. Objects of type
Percent represent percentages such as 10% or 99%. Give the definitions of the
overloaded operators >> and << so that they can be used for input and output
with objects of the class Percent. Assume that input always consists of an
integer followed by the character ‘%’, such as 25%. All per-
centages are whole numbers and are stored in the int member variable named
value. You do not need to define the other overloaded operators and do not
need to define the constructor. You only have to define the overloaded
operators >> and <<.
#include
Short Answer
Step by step solution
Key Concepts
These are the key concepts you need to understand to accurately answer the question.