Advertisement
Guest User

Untitled

a guest
Dec 12th, 2011
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.13 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5.  
  6. namespace ConsoleApplication1
  7. {
  8.     enum KepzesTipus
  9.     {
  10.         Nappali = 0,
  11.         Esti,
  12.         Levelezo
  13.     }
  14.  
  15.     class Hallgato
  16.     {
  17.         private KepzesTipus kepzestipus;
  18.         private int evfolyam = 0;
  19.         private int azonosito = 100 - 1;
  20.         private double erdemjegy = 0;
  21.  
  22.         public Hallgato()
  23.         {
  24.             Random rand = new Random();
  25.             this.evfolyam = rand.Next(1990, 2011);
  26.             this.azonosito++;
  27.             this.erdemjegy = rand.NextDouble() * (5.0 - 1.0) + 1.0;
  28.         }
  29.  
  30.         public string hallgatoAdatai(Hallgato nev)
  31.         {
  32.             //Ez lenne az
  33.             string adatok = nev.evfolyam + ", " + nev.azonosito + ", " + nev.erdemjegy;
  34.             return adatok;
  35.         }
  36.     }
  37.  
  38.     class Adatbazis
  39.     {
  40.     }
  41.  
  42.     class Program
  43.     {
  44.         static void Main(string[] args)
  45.         {
  46.             Hallgato elso = new Hallgato();
  47.             //1. függvény tesztelése
  48.             Console.WriteLine(elso.hallgatoAdatai(elso));
  49.         }
  50.     }
  51. }
  52.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement