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;
- namespace ConsoleApplication1
- {
- enum KepzesTipus
- {
- Nappali,
- Esti,
- Levelezo
- }
- class Hallgato
- {
- private KepzesTipus kepzestipus;
- private int evfolyam = 0;
- private int azonosito = 100 - 1;
- private double erdemjegy = 0;
- public Hallgato()
- {
- Thread.Sleep(100);
- Random rand_hallgato = new Random();
- this.kepzestipus = (KepzesTipus)rand_hallgato.Next(0, 3);
- this.evfolyam = rand_hallgato.Next(1990, 2011);
- this.azonosito++;
- this.erdemjegy = rand_hallgato.NextDouble() * (5.0 - 1.0) + 1.0;
- }
- public string hallgatoAdatai()
- {
- return kepzestipus + ", " + evfolyam + ", " + azonosito + ", " + erdemjegy;
- }
- }
- class Adatbazis
- {
- }
- class Program
- {
- static void Main(string[] args)
- {
- Hallgato elso = new Hallgato();
- //1. függvény tesztelése
- Console.WriteLine(elso.hallgatoAdatai());
- //2. függvény tesztelése
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement