Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <vasos.h>
- void TVaso::TVaso(double capacidad){
- capacidad_vaso=capacidad;
- cantidad_liquido=0;
- }
- void TVaso::EcharLiquido(double valor){
- cantidad_liquido+=valor;
- if(cantidad_liquido > capacidad_vaso){
- cantidad_liquido=0;
- }
- }
- void TVaso::Beber(double valor){
- cantidad_liquido-=valor;
- }
- double TVaso::VerCuantoQueda(void) {
- return cantidad_liquido;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement