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