-
-
Save zivanovicb/3e513cce8796c9ffb6a302ea8ca1c392 to your computer and use it in GitHub Desktop.
Klasa sa interfejsom
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.ComponentModel; | |
using System.Data; | |
using System.Drawing; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using System.Windows.Forms; | |
namespace WindowsFormsApplication21 | |
{ | |
public partial class Form1 : Form, Interfejs | |
{ | |
// I sad zato sto si implementirao interfejs ovde moras da implementiras te metode. Ovo ce te pitati | |
// Sve metode MORAJU da budu public! | |
public double povrsina() | |
{ | |
return 2.6; // Metode moraju da vracaju vrednost koja je navedena u interfejsu(U ovom slucaju double) | |
} | |
public void ispis() | |
{ | |
MessageBox.Show("Ispis neki"); | |
} | |
public string stringcina() | |
{ | |
return "Ovo je neki string"; | |
} | |
public Form1() | |
{ | |
InitializeComponent(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment