예제 #1
0
        static void Main(string[] args)
        {
            //instance => object
            var first_donor   = new Donor();
            var first_patient = new Patient(first_donor);

            // create a new project
            var first_project = new Project(first_patient, "first project");
            var Y             = new Donation(first_donor, first_project);

            // create another project
            var second_project = new Project(first_patient, "second project");

            Console.WriteLine($"Patient No: { first_patient.PatientID}, Project Type: {first_project.Name}, Donor NO:{first_donor.DonorID}");
        }
예제 #2
0
        public Patient(Donor inputDonor)

        {
            PatientDonor = inputDonor;
            PatientID    = lastpatientno + 1;
        }
예제 #3
0
 public Donation(Donor A, Project B)
 {
     DonorID   = A;
     ProjectID = B;
 }