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 JesperLeg
- {
- class Program
- {
- static void Main(string[] args)
- {
- Kunde kunde = new Kunde(1, "Haddock", "Kajplads 17", "test1", 6000, "Kolding", "[email protected]", 12345678, 1000.25);
- Console.WriteLine("Kunde Nr: {0}", kunde.Getnr());
- Console.WriteLine("Kunde Navn: {0}", kunde.GetNavn());
- kunde.SetNavn("Kaptajn Archibald Haddock");
- Console.WriteLine("Lulwut " + kunde.Tlfnr());
- Console.ReadLine();
- }
- }
- public class Kunde
- {
- private readonly int nr;
- private string navn;
- private string adresse1;
- private string adresse2;
- private int postnr;
- private string by;
- private string email;
- private readonly int _tlfnr;
- private readonly double _saldo;
- public Kunde(int nr, string navn, string adresse1, string adresse2, int postnr, string by, string email,
- int _tlfnr, double _saldo)
- {
- this.nr = nr;
- this.navn = navn;
- this.adresse1 = adresse1;
- this.adresse2 = adresse2;
- this.postnr = postnr;
- this.by = by;
- this.email = email;
- this._tlfnr = _tlfnr;
- this._saldo = _saldo;
- }
- public int Getnr()
- {
- return nr;
- }
- public string GetNavn()
- {
- return navn;
- }
- public void SetNavn(string navn)
- {
- this.navn = navn;
- }
- public string GetAdresse1()
- {
- return adresse1;
- }
- public void SetAdresse1(string adresse1)
- {
- this.adresse1 = adresse1;
- }
- public string GetAdresse2()
- {
- return adresse2;
- }
- public void SetAdresse2(string adresse2)
- {
- this.adresse2 = adresse2;
- }
- public int GetPostnr()
- {
- return postnr;
- }
- public void SetPostnr(int postnr)
- {
- this.postnr = postnr;
- }
- public string GetBy()
- {
- return by;
- }
- public void SetBy(string by)
- {
- this.by = by;
- }
- public string GetEmail()
- {
- return email;
- }
- public void SetEmail(string email)
- {
- this.email = email;
- }
- public int Tlfnr()
- {
- return _tlfnr;
- }
- public double Saldo()
- {
- return _saldo;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement