Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace Zad1
- {
- public class Racun
- {
- private int _stanje;
- private string _brojracuna;
- private Vlasnikcs _vlasnik;
- public int Stanje
- {
- get
- {
- return _stanje;
- }
- }
- public string Brojracuna
- {
- get
- {
- return _brojracuna;
- }
- set
- {
- _brojracuna = value;
- }
- }
- public Vlasnikcs Vlasnik
- {
- get
- {
- return _vlasnik;
- }
- set
- {
- _vlasnik = value;
- }
- }
- public Racun()
- {
- _vlasnik = new Vlasnikcs();
- }
- public Racun(int stanje):this()
- {
- _stanje = stanje;
- }
- public void Uplata(int iznos)
- {
- _stanje += iznos;
- }
- public void Isplata(int iznos)
- {
- if (iznos <= _stanje)
- {
- _stanje -= iznos;
- }
- else
- {
- Console.WriteLine("Nemate dovoljno sredstava");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement