The object oriented programming help us to thing in real world objects. with the help of object oriented programming we are able to create more flexible and understandable any system. by using the object oriented programming we will create the relationship between two or more things.
using System;
public class Program
{
public static void Main()
{
Console.WriteLine("Hello World");
}
}
public class Patient
{
public string name { get; set; }
public string address { get; set; }
public Doctor doctorwhowilltreat { get; set; }
}
public class Doctor
{
public string name { get; set; }
}
In the hospital management system we have class Patient and Doctor, in the patient class we have used the doctor class to build a relationship between Patient & Doctor.
No comments:
Post a Comment