Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Money : Pair
- {
- protected int rubles, kopeks;
- public int Rubles
- {
- get { return rubles; }
- set { rubles = value; }
- }
- public int Kopeks
- {
- get { return kopeks; }
- set { kopeks = value; }
- }
- public Money()
- : base()
- { rubles = 0; kopeks = 0; }
- public Money(int r, int k)
- : base(r, k)
- { rubles = r; kopeks = k; }
- public override string ToString()
- {
- return rubles + "p. " + kopeks + "kop. ";
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement