


















Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!



















Base class Derived classes Student GraduateStudent, UndergraduateStudent Shape Circle, Triangle, Rectangle Loan CarLoan, HomeImprovementLoan, MortgageLoan Employee Faculty, Staff, HourlyWorker, CommissionWorker BankAccount CheckingAccount, SavingsAccount
Base and Derived Classes in C#
Method Description Equals (^) This method compares two objects for equality and returns true if they are equal and false otherwise. Finalize (^) Finalize is called by the garbage collector before it reclaims an object’s memory. GetHashCode (^) The hashcode value returned can be used by a hashtable to determine the location at which to insert the corresponding value. GetType (^) Returns an object of class Type that contains information about the object’s type. MemberwiseClone (^) This protected method makes a copy of the object on which it is called. Instance-variable values in one object are copied into another object of the same type. For reference types, only the references are copied. ReferenceEquals (^) This static method returns true if two objects are the same instance or if they are null references. ToString (^) Returns a string representation of an object. The default implementation returns the namespace and class name.
Case Study: Payroll System Using
Polymorphism
Payroll System Using Polymorphism
Figure | Employee hierarchy UML class diagram