-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathWidget.h
41 lines (31 loc) · 840 Bytes
/
Widget.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#pragma once
#include <string>
#include <iostream>
using namespace std;
class Widget
{
private:
string nombre;
int cantidad;
double costo;
public:
Widget(string nombre, int cantidad, double costo);
Widget(string nombre, int cantidad);
Widget();
~Widget();
Widget & operator = (const Widget & e);
bool operator ==(const Widget & e)const;
bool operator !=(const Widget & e)const;
bool isEmpty()const;
void cambiarNombre(string nombre);
void cambiarCantidad(int cantidad);
void cambiarCosto(double costo);
string obtenerNombre()const;
int obtenerCantidad()const;
double obtenerCosto()const;
void pedirInfo();
void displayWidget();
void clear();
friend ostream & operator << (ostream & out, const Widget & e);
friend istream & operator >> (istream & in, Widget & e);
};