import math
class mug:
  def __init__(self,r,h):
    self.rad=r
    self.height=h
    self.vol=0.0
  def add(self,v):
    self.vol=self.vol+v
  def getVol(self):
    return self.vol
  def getRad(self):
    return self.rad
  def getHeight(self):
    return self.height
  def getCapacity(self):
    return self.height*math.pi*self.rad**2
  def getCap2(self):
    return math.pi*self.getRad()**2*self.getHeight()
  def pour(self,v):
    if (v<self.vol):
      self.vol=self.vol-v
    else:
      self.vol=0
m1=mug(2,8)
print (m1.getVol())
m1.add(4)
print (m1.getVol())
m1.add(3.0)
print (m1.getVol())
print (m1.getHeight())
print (m1.getRad())
m2=mug(3,9)
print (m2.getVol())
print (m2.getCapacity())
print (m2.getCap2())
m1.pour(5)
print (m1.getVol())

