How to make student information program in C#

How to make student information program in C#

Object


Create a class Student for student registration system using constructors. The class must include:
·         First name
·         Last name
·         Father’s name
·         Program
·         University = Bahria University
·         Address
·         Gender
·         Email
·         Campus
·         Semester

Initialize the following in the default constructor:
·         Program
·         Campus
·         Semester

Also write methods for getData() and displayData().



Code


sing System;
using System.Collections.Generic;
using System.Text;
       
namespace wasiq_khan
{
   
    class DisplayData
    {
       
        string Programe, Campus, semister;
      

        public  DisplayData()
        {
          Programe = "Computer Science";
         Campus = "Bahria University Karachi Campus";
         semister = "4Th Semister";

        }
        public DisplayData(string FirstName, string Lastname, string FatherName, string Address, string Gender, string Email)
        {

            Console.Write("My First Name is.... ");
            FirstName = Console.ReadLine();
            Console.Write("My Last Name is.... ");
            Lastname = Console.ReadLine();
            Console.Write("My Father Name is.... ");
            FatherName = Console.ReadLine();

            Console.Write("My Gender is.... ");
            Gender = Console.ReadLine();
            Console.Write("My Address is.... ");
            Address = Console.ReadLine();
            Console.Write("My Email.........");
            Email = Console.ReadLine();
        }

        public void GetData()
       
        {
           
       Console.WriteLine("My Program is....."+Programe);
       Console.WriteLine("My Semister  is...."+semister);
       Console.WriteLine("My Campus  is.... "+Campus);
         
    }
       



    }
        class Program
        {
            static void Main(string[] args)
            {
                string FiName="";
                string Laname="";
                string FName="";
                string Addr="";
                string Gend="";
                string Ema="";

                DisplayData obj = new DisplayData( FiName,Laname, FName, Addr, Gend, Ema);
           
                DisplayData ob = new DisplayData();
               ob.GetData();
              



            }
        }

  
}
screen shot

Popular posts from this blog

Real marksheet using HTML

Salary Calculate Application in C#