<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-7762405448954283322</id><updated>2012-02-16T00:50:32.927-08:00</updated><category term='Object-Oriented Programming'/><category term='Visual Studio'/><category term='CLR'/><category term='C-Sharp'/><category term='Amazon.com'/><category term='Review'/><category term='Keyword'/><category term='C #'/><category term='CShap'/><category term='Programming'/><category term='Conversion'/><category term='blog entry'/><category term='Variable'/><category term='Garbage Collector'/><category term='inherit'/><category term='C#'/><category term='Abstract'/><category term='Namespace'/><category term='Concept'/><category term='class'/><category term='Convert'/><category term='OOP'/><category term='Code Example'/><category term='Garbage Collection'/><category term='CSharp'/><category term='polymorphism'/><category term='VB.Net'/><category term='C Sharp'/><category term='.Net Framework'/><title type='text'>C# Helper</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://csharphelper.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7762405448954283322/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://csharphelper.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>James</name><uri>http://www.blogger.com/profile/12968105462220114467</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>10</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7762405448954283322.post-3977814542813772006</id><published>2008-05-23T09:01:00.001-07:00</published><updated>2008-05-23T09:01:02.536-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Amazon.com'/><category scheme='http://www.blogger.com/atom/ns#' term='Convert'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><category scheme='http://www.blogger.com/atom/ns#' term='CSharp'/><category scheme='http://www.blogger.com/atom/ns#' term='.Net Framework'/><category scheme='http://www.blogger.com/atom/ns#' term='Programming'/><category scheme='http://www.blogger.com/atom/ns#' term='Review'/><category scheme='http://www.blogger.com/atom/ns#' term='C Sharp'/><category scheme='http://www.blogger.com/atom/ns#' term='VB.Net'/><category scheme='http://www.blogger.com/atom/ns#' term='blog entry'/><category scheme='http://www.blogger.com/atom/ns#' term='Conversion'/><category scheme='http://www.blogger.com/atom/ns#' term='C-Sharp'/><category scheme='http://www.blogger.com/atom/ns#' term='Code Example'/><category scheme='http://www.blogger.com/atom/ns#' term='C #'/><category scheme='http://www.blogger.com/atom/ns#' term='Visual Studio'/><title type='text'>Recent Review: C# &amp; VB.Net Conversion</title><content type='html'>&lt;p&gt;I wanted to write this quick blog entry to let you know I recently performed a review on a book called, &amp;quot;C# &amp;amp; VB.NET Conversion&amp;quot;. This book basically acts as a reference to help in the process of converting from C# to VB.Net (or vice versa).&lt;/p&gt;  &lt;p&gt;For under $6 (for used versions) it's well worth the read. It was written quite some time ago, but still very much applies in today's uses.&lt;/p&gt;  &lt;p&gt;You can read my blog entry, &amp;quot;Review: C# &amp;amp; VB.Net Conversion&amp;quot; at: &lt;a title="http://codingchat.blogspot.com/2008/05/review-c-vbnet-conversion.html" href="http://codingchat.blogspot.com/2008/05/review-c-vbnet-conversion.html"&gt;http://codingchat.blogspot.com/2008/05/review-c-vbnet-conversion.html&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Until next time, Happy Coding!&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7762405448954283322-3977814542813772006?l=csharphelper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://csharphelper.blogspot.com/feeds/3977814542813772006/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7762405448954283322&amp;postID=3977814542813772006' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7762405448954283322/posts/default/3977814542813772006'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7762405448954283322/posts/default/3977814542813772006'/><link rel='alternate' type='text/html' href='http://csharphelper.blogspot.com/2008/05/recent-review-c-vbnet-conversion.html' title='Recent Review: C# &amp;amp; VB.Net Conversion'/><author><name>James</name><uri>http://www.blogger.com/profile/12968105462220114467</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7762405448954283322.post-3488110917366183374</id><published>2008-02-27T10:31:00.001-08:00</published><updated>2008-02-27T10:31:06.137-08:00</updated><title type='text'>Blog’n Again…</title><content type='html'>&lt;span xmlns=''&gt;&lt;p&gt;Well, it's been a little over 6 months since my last entry for this blog. Life's been a challenge and required my absence from this blog (and my other blogs).&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Now things have settled down. My health is stable, my career has become stable. Now, it's time to get this blog back to being stable! I hope to be able to continue along the path I was headed with this blog.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;You may, or may not, know that Microsoft is in process of releasing its 2008 versions of SQL Server, Windows Server, and Visual Studio. I will remain focused on the 2005 version for the most part; however, I will try to touch upon some 2008 new features and enhancements. This blog may evolve to covering the 2008 version as they become more main stream…and as I evolve to using those versions primarily. As with any new products being released, I will go through rigorous testing and validating before I convert over. &lt;br /&gt;&lt;/p&gt;&lt;p&gt;My current objective is to write an entry for this blog about once a week; however, it could be more or less. I hope to not go any longer than two weeks between entries from here forth.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Until next time…Happy Coding!&lt;/p&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7762405448954283322-3488110917366183374?l=csharphelper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://csharphelper.blogspot.com/feeds/3488110917366183374/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7762405448954283322&amp;postID=3488110917366183374' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7762405448954283322/posts/default/3488110917366183374'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7762405448954283322/posts/default/3488110917366183374'/><link rel='alternate' type='text/html' href='http://csharphelper.blogspot.com/2008/02/blogn-again.html' title='Blog’n Again…'/><author><name>James</name><uri>http://www.blogger.com/profile/12968105462220114467</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7762405448954283322.post-3244528628916518384</id><published>2007-04-19T10:01:00.000-07:00</published><updated>2007-04-19T10:04:57.735-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='polymorphism'/><category scheme='http://www.blogger.com/atom/ns#' term='Abstract'/><category scheme='http://www.blogger.com/atom/ns#' term='inherit'/><title type='text'>A brief look at "Abstract Classes" and how to use them...</title><content type='html'>&lt;h3&gt;What are abstract classes?&lt;/h3&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;An &amp;ldquo;&lt;i&gt;&lt;a title="Abstract Class definition by Microsoft" href="http://msdn2.microsoft.com/en-us/library/ms173150(VS.80).aspx" target="_blank"&gt;abstract class&lt;/a&gt;&lt;/i&gt;&amp;rdquo; is a class that is created with the intention of never being instantiated by an object. Basically this means that the created class will define what properties, methods, and/or events are contained within the class. The methods and/or events may also contain required arguments, as well as expected return data types.&lt;/p&gt;&lt;br /&gt;&lt;h3&gt;How do you use abstract classes?&lt;/h3&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;We use &amp;ldquo;&lt;i&gt;&lt;a title="Abstract Classes defined by Microsoft" href="http://msdn2.microsoft.com/en-us/library/ms173150(VS.80).aspx" target="_blank"&gt;abstract classes&lt;/a&gt;&lt;/i&gt;&amp;rdquo; through derived classes. Derived classes are the most common type of method used with abstract classes by beginning software developers. This is because they are based on principals that are already learned, and an abstract class can contain both abstract members and non-abstract members. Since the abstract member&amp;rsquo;s (methods in particular) don&amp;rsquo;t have implementation code, you may wonder how the derived class would know what to do. This is where &lt;i&gt;&lt;a title="Polymorphism defined by Microsoft" href="http://msdn2.microsoft.com/en-us/library/ms173152(vs.80).aspx" target="_blank"&gt;polymorphism&lt;/a&gt;&lt;/i&gt; would come in; you are defining the method at the time you create the derived class, the only thing the &amp;ldquo;&lt;em&gt;abstract base class&lt;/em&gt;&amp;rdquo; is requiring is that you match all of it&amp;rsquo;s arguments at minimum and you must use the same data types for the arguments, and if applicable you must use the same data type for the returned values also. &lt;/p&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;You should be made aware of another way of getting the same result as an abstract class is through an &amp;ldquo;&lt;a title="Interface defined by Microsoft" href="http://msdn2.microsoft.com/en-us/library/87d83y5b.aspx" target="_blank"&gt;&lt;em&gt;interface&lt;/em&gt;&lt;/a&gt;&amp;rdquo;. Interfaces slightly differ in two ways:&lt;/p&gt;&lt;br /&gt;&lt;ul style="MARGIN-TOP: 0in; MARGIN-BOTTOM: 0in" type="disc"&gt;&lt;br /&gt;&lt;li class="MsoNormal"&gt;Interfaces members &lt;b&gt;&lt;u&gt;must all&lt;/u&gt;&lt;/b&gt; be implemented (there is absolutely no implementation code in an Interface), where as an&amp;nbsp;abstract class&amp;nbsp;could hold both abstract methods and methods that can be used by the base class, and &lt;/li&gt;&lt;br /&gt;&lt;li class="MsoNormal"&gt;a derived class can use as many&amp;nbsp;Interfaces as the developer wishes, where as only one abstract class can be used inherited (there are ways around this by creating derived abstract classes of the base abstract class, and then chaining down the abstract classes until all are included and then creating a final derived class to be used &amp;ndash; I.E. abstract 1 into abstract 2 into abstract 3 into abstract 4 into derived class 1; thus creating a derived class containing all 4 abstracts).&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;All of this may seem difficult to understand at first, especially the &amp;lsquo;why would you want to use abstract classes over interfaces&amp;rsquo;, this will be discussed in a future blog. For now, I&amp;rsquo;ll concentrate on solidifying the concept and use of an abstract class.&lt;/p&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;First, I&amp;rsquo;ll try to give you a better real-world relation to what an abstract class is. I will use an example of abstract art to relate this (you may have heard of this term previously, although not in programming classes or discussions, and you may have even seen this type of art before). Imagine a professor of an advanced art class sets an apple on the table and tells his class he wants an abstract of the apple, and he specifies they must use their own method of creating this art; they are not allowed to use any methods taught within that particular art class. One artist (we&amp;rsquo;ll call him &lt;i&gt;Artist A&lt;/i&gt;) creates an painting of the art using oil-based paints, another artist (&lt;i&gt;Artist B&lt;/i&gt;) creates a clay model of the apple, and yet another artist (&lt;i&gt;Artist C&lt;/i&gt;) creates a photograph of the apple. Now imagine the same professor in a beginner&amp;rsquo;s art class and shows them a red rubber ball; he tells them they can only recreate the art using a pencil and paper. So each artist returns with a very basic black, gray and white drawing of the ball.&lt;/p&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;The reason I use this example is because the professor is a real-world example of an abstract class; he had given a definition to his advanced class of what he wanted (recreation of the apple), and he specified they were to create their own methods. The method was chosen by each artist (painting, pottery, and photography). In his beginner&amp;rsquo;s class he had specified 1 method that must be used (to recreate the ball). All of these artists would be considered our &lt;i&gt;derived classes&lt;/i&gt;. The professor would be an &amp;ldquo;abstract base class&amp;rdquo; because he had forced 1 class to create their own method; but also remember that he also had the ability to force 1 class to use a specific method! (NOTE: This will become an important point in understanding differences between &amp;ldquo;abstract&amp;rdquo; and &amp;ldquo;interfaces&amp;rdquo;)&lt;/p&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;Now, I&amp;rsquo;ll give you a real-world programming example of how you would use an abstract class. Imagine you are creating an application that records the results of all examinations performed by any doctor on any patient. We would want to use an abstract class in the records class because we do not have the specific information as to what the exam is, who the patient is, what the results of the exam are, or the comments left by the doctor. In particular our record will need to hold all this information. We obviously don&amp;rsquo;t want to create a very large block of code to handle all possibilities. First problem we will face is that we don&amp;rsquo;t know what exams there are or if there are any special requirements of information (from the doctor or the patient) to complete this exam. An example of special requirements is that a patient who has a physical would need to have their age, height, weight and such recorded; where a patient having a follow-up visit for a broken arm may only need their age recorded. Another example would be a patient receiving a pregnancy exam may need to have their expected due date recorded.&lt;/p&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;A good solution to this is to create an abstract base class that would hold common information for all patients, regardless of exam being used. Since this class is simply just a template of the patients information we need to record we will not want to allow any implementations of the information for two specific reasons, 1) we don&amp;rsquo;t want to create duplication of information between classes (this allows for easier code maintainability later), and 2) we want to force our &lt;i&gt;derived classes&lt;/i&gt; to determine how they want to use the information (we only want to ensure they include this basic information, they can determine if additional information is required).&lt;/p&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;So, we know that every patient has the property of: &lt;i&gt;first name&lt;/i&gt;, &lt;i&gt;last name&lt;/i&gt;, and &lt;i&gt;age&lt;/i&gt;. We also know that every patient will have a method of: &lt;i&gt;exam results&lt;/i&gt;, and &lt;i&gt;doctor&amp;rsquo;s comments&lt;/i&gt;. We would then create the base class using they keyword &lt;i&gt;&lt;font color="#0000ff"&gt;abstract&lt;/font&gt;&lt;/i&gt;. We will define any properties and methods as public within this class that the derived class can use; remember we are not telling the derived class how to implement the public properties and methods, we are only telling the derived class that it must implement them (we don&amp;rsquo;t care how).&lt;/p&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;You will see in this block of coding I had created a class called &amp;ldquo;&lt;i&gt;base_patient&lt;/i&gt;&amp;rdquo;. This is our &lt;i&gt;abstract base class&lt;/i&gt;:&lt;/p&gt;&lt;br /&gt;&lt;table id="AutoNumber1" style="BORDER-COLLAPSE: collapse" bordercolor="#111111" cellspacing="0" cellpadding="0" width="100%" border="1"&gt;&lt;br /&gt;&lt;tbody&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;td width="100%"&gt;&lt;pre&gt;using System;&lt;br /&gt;using System.Collections.Generic;&lt;br /&gt;using System.Text;&lt;br /&gt;&lt;br /&gt;namespace AbstractClass_1&lt;br /&gt;{&lt;br /&gt;    public abstract class base_patient&lt;br /&gt;    {&lt;br /&gt;        //Declare our variables to be used throughout the class&lt;br /&gt;        //these are private because we don't want a class or object&lt;br /&gt;        //from the outside setting these.&lt;br /&gt;        private string firstName;&lt;br /&gt;        private string lastName;&lt;br /&gt;        private int age;&lt;br /&gt;&lt;br /&gt;        //We create a public constructor that the derived class&lt;br /&gt;        //will use to implement the base class&lt;br /&gt;        public base_patient(string first, string last, int ptntAge)&lt;br /&gt;        {&lt;br /&gt;            firstName = first;&lt;br /&gt;            lastName = last;&lt;br /&gt;            age = ptntAge;&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        //destructor of object class&lt;br /&gt;        ~base_patient() { }&lt;br /&gt;&lt;br /&gt;        //public string to only get the patient's first name&lt;br /&gt;        public string frstName&lt;br /&gt;        {&lt;br /&gt;            get&lt;br /&gt;            {&lt;br /&gt;                return firstName;&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        //public string to only get the patient's last name&lt;br /&gt;        public string lstName&lt;br /&gt;        {&lt;br /&gt;            get&lt;br /&gt;            {&lt;br /&gt;                return lastName;&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        //public integer to only get the patient's age&lt;br /&gt;        public int ptAge&lt;br /&gt;        {&lt;br /&gt;            get&lt;br /&gt;            {&lt;br /&gt;                return age;&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        //Now we define our methods; remember we do not&lt;br /&gt;        //create any coding to implement the method; that&lt;br /&gt;        //is the job of the derived class.&lt;br /&gt;&lt;br /&gt;        //public method of string type for exam results&lt;br /&gt;        public abstract void ExamResults(string exName, string exRslt);&lt;br /&gt;&lt;br /&gt;        //public method of string type for doctor's comments&lt;br /&gt;        public abstract void DoctorsComments(string dComments);&lt;br /&gt;&lt;br /&gt;    }//ends public abstract class&lt;br /&gt;}//ends namespace&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;Listing 1 (&amp;ldquo;base_patient.cs&amp;rdquo;)&lt;/span&gt; &lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;Now that we have our abstract class, let&amp;rsquo;s look at an example of where a derived class will use the abstract class. Let&amp;rsquo;s implement a derived class that is just for a general check-up for all patients; in particular it &amp;nbsp;will consist of: &lt;i&gt;a blood pressure test&lt;/i&gt;, &lt;i&gt;exam results&lt;/i&gt; and &lt;i&gt;tonsil examination&lt;/i&gt; (if patient still has tonsils). Notice the last examination is based on if the patient still has their tonsils; but, you may have also noticed that our abstract class doesn&amp;rsquo;t contain this information! Remember, we are using a derived class, so we can create a new property in this derived class to hold that information, and since we are implementing our own method, we can determine if we want anything specific to happen if the patient does or doesn&amp;rsquo;t have tonsils.&lt;/p&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;Here is the coding to create the general check-up class, named, &amp;ldquo;&lt;i&gt;general_&lt;/i&gt;checkup&amp;rdquo;:&lt;/p&gt;&lt;br /&gt;&lt;table id="AutoNumber2" style="BORDER-COLLAPSE: collapse" bordercolor="#111111" cellspacing="0" cellpadding="0" width="100%" border="1"&gt;&lt;br /&gt;&lt;tbody&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;td width="100%"&gt;&lt;pre&gt;using System;&lt;br /&gt;using System.Collections.Generic;&lt;br /&gt;using System.Text;&lt;br /&gt;&lt;br /&gt;namespace AbstractClass_1&lt;br /&gt;{&lt;br /&gt;    class general_checkup : base_patient&lt;br /&gt;    {&lt;br /&gt;        //declare variable to be used from within the vlass&lt;br /&gt;        //private keyword ensures outside classes cannot use&lt;br /&gt;        //the variable.&lt;br /&gt;        private int weight;&lt;br /&gt;&lt;br /&gt;        //Create constructor of derived class; it is important&lt;br /&gt;        //that our construct has equal or more arguments as the&lt;br /&gt;        //base class; it is also important that our constructor&lt;br /&gt;        //matches the order of arguments as the base class.&lt;br /&gt;        public general_checkup(string first, string last, int age, int patWeight)&lt;br /&gt;            : base(first, last, age)&lt;br /&gt;        {&lt;br /&gt;            weight = patWeight;&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        //Create our destuctor of the class&lt;br /&gt;        ~general_checkup() { }&lt;br /&gt;&lt;br /&gt;        //Create public property of the patients weight&lt;br /&gt;        public int ptWt&lt;br /&gt;        {&lt;br /&gt;            get&lt;br /&gt;            {&lt;br /&gt;                return weight;&lt;br /&gt;            }&lt;br /&gt;            set&lt;br /&gt;            {&lt;br /&gt;                weight = value;&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        //Create our overriding method for the ExamResults&lt;br /&gt;        //This allows us to define the implementation code&lt;br /&gt;        //for this method and by declaring this method public&lt;br /&gt;        //we will allow instantiating objects access to this&lt;br /&gt;        //method.&lt;br /&gt;        public override void ExamResults(string exName, string exRslt)&lt;br /&gt;        {&lt;br /&gt;            //string exRes;&lt;br /&gt;&lt;br /&gt;            //We write the exam name and results to the&lt;br /&gt;            //console window.&lt;br /&gt;            Console.WriteLine("Exam performed: " + exName);&lt;br /&gt;            Console.WriteLine("Exam results are: " + exRslt);&lt;br /&gt;           //exRes = "Exam performed: " + exName + ", Exam results are: " + exRslt;&lt;br /&gt;           //return exRes;&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        //Create our overriding method for the Doctor's Comments.&lt;br /&gt;        public override void DoctorsComments(string dComments)&lt;br /&gt;        {&lt;br /&gt;            //We write the comments from the doctor to the&lt;br /&gt;            //console window.&lt;br /&gt;            Console.WriteLine("Doctor's comments: " + dComments);&lt;br /&gt;            //resultsDocComments = "Doctor's comments: " + dComments;&lt;br /&gt;            //return resultsDocComments;&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        //We create a new method to determine the bloodpressure&lt;br /&gt;        //exam results; this will later be used in our ExamResults&lt;br /&gt;        //method to be displayed back.&lt;br /&gt;        public string BloodPressureExam(string systolic, string diastolic)&lt;br /&gt;        {&lt;br /&gt;            string bpResults;&lt;br /&gt;            bpResults = "The patient's bloodpressure is: " + systolic + "/" + diastolic;&lt;br /&gt;            return bpResults;&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        public string TonsilExam(string TonsilExist)&lt;br /&gt;        {&lt;br /&gt;            string tResult,&lt;br /&gt;                tExist;&lt;br /&gt;            tExist = TonsilExist;&lt;br /&gt;            if (tExist == "y")&lt;br /&gt;            {&lt;br /&gt;                Console.WriteLine("Please enter evaluation of tonsils:");&lt;br /&gt;                tResult = Console.ReadLine();&lt;br /&gt;            }&lt;br /&gt;            else&lt;br /&gt;                tResult = "Tonsil's cannot be evaluated. Exam was aborted.";&lt;br /&gt;            return tResult;&lt;br /&gt;        }&lt;br /&gt;    }//ends class&lt;br /&gt;}//ends namespace&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;Listing 2 (&amp;ldquo;general_checkup.cs&amp;rdquo;)&lt;/span&gt; &lt;br /&gt;&lt;p class="MsoNormal"&gt;Now that we have a derived class, we can then use this class within our program to display the information of the patient and the results of the exam. Remember all information is stored within an object instance of the derived class,&amp;rdquo;&lt;i&gt;general_checkup&lt;/i&gt;&amp;rdquo;, because the base class, &amp;ldquo;&lt;i&gt;base_patient&lt;/i&gt;&amp;rdquo; is an abstract class and cannot be instantiated.&lt;/p&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;Here is the coding to create the basic program file called &amp;ldquo;&lt;i&gt;program.cs&lt;/i&gt;&amp;rdquo;:&lt;/p&gt;&lt;br /&gt;&lt;table id="AutoNumber3" style="BORDER-COLLAPSE: collapse" bordercolor="#111111" cellspacing="0" cellpadding="0" width="100%" border="1"&gt;&lt;br /&gt;&lt;tbody&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;td width="100%"&gt;&lt;pre&gt;using System;&lt;br /&gt;using System.Collections.Generic;&lt;br /&gt;using System.Text;&lt;br /&gt;&lt;br /&gt;namespace AbstractClass_1&lt;br /&gt;{&lt;br /&gt;    class Program&lt;br /&gt;    {&lt;br /&gt;        //Declare variables to be used within the program&lt;br /&gt;        //we declare them public so they may be altered from&lt;br /&gt;        //outside classes and objects.&lt;br /&gt;&lt;br /&gt;        static void Main(string[] args)&lt;br /&gt;        {&lt;br /&gt;            string resultsBPExam,&lt;br /&gt;                commentsBPExam,&lt;br /&gt;                verifyTonsilExist,&lt;br /&gt;                resultsTonsilExist,&lt;br /&gt;                commentsTonsilExam,&lt;br /&gt;                getSystolic,&lt;br /&gt;                getDiastolic;&lt;br /&gt;&lt;br /&gt;            //This coding creates a new object and sets the&lt;br /&gt;            //appropriate properties.&lt;br /&gt;            general_checkup genCheckUpResults = new general_checkup("John", "Smith", 59, 192);&lt;br /&gt;&lt;br /&gt;            //This coding will ask to ensure the patient has tonsils.&lt;br /&gt;            //Be aware this is not the ideal method to do this, as is&lt;br /&gt;            //the same with the implementation code within the method&lt;br /&gt;            //being called, ideally some sort of verification would be&lt;br /&gt;            //performed prior to allowing the method to be called.&lt;br /&gt;            Console.WriteLine("Does the patient still have thier tonsils?");&lt;br /&gt;            Console.WriteLine("Please enter 'y' or 'n' for answer.");&lt;br /&gt;            verifyTonsilExist = Console.ReadLine();&lt;br /&gt;            resultsTonsilExist = genCheckUpResults.TonsilExam(verifyTonsilExist);&lt;br /&gt;            //We store any comments about the exam here&lt;br /&gt;            //we will use an if statement to generalize a comment&lt;br /&gt;            //based on if there patient does / doesn't have tonsils.&lt;br /&gt;            if (verifyTonsilExist == "y")&lt;br /&gt;                commentsTonsilExam = "This patient has nice tonsils";&lt;br /&gt;            else&lt;br /&gt;                commentsTonsilExam = "This patient does not have any tonsils!!!";&lt;br /&gt;&lt;br /&gt;            //This coding will call the blood pressure exam method&lt;br /&gt;            //again we would ideally want verification coding prior&lt;br /&gt;            //to calling the method.&lt;br /&gt;            Console.WriteLine("Please enter the systolic reading:");&lt;br /&gt;            getSystolic = Console.ReadLine();&lt;br /&gt;            Console.WriteLine("Please enter the diastolic reading:");&lt;br /&gt;            getDiastolic = Console.ReadLine();&lt;br /&gt;            resultsBPExam = genCheckUpResults.BloodPressureExam(getSystolic, getDiastolic);&lt;br /&gt;            //We create a general comment about BP results from&lt;br /&gt;            //the doctor.&lt;br /&gt;            commentsBPExam = "This patient is alive!";&lt;br /&gt;&lt;br /&gt;            //Now we will build our record and display the results.&lt;br /&gt;            //This coding will display the patients basic information&lt;br /&gt;            //by calling the properties that were set; this will verify&lt;br /&gt;            //the derived class is storing the inherited properties and&lt;br /&gt;            //the new property that was created.&lt;br /&gt;&lt;br /&gt;            //First we clear the console.&lt;br /&gt;            Console.Clear();&lt;br /&gt;            //We then create our header for the report; this will&lt;br /&gt;            //include the patients information.&lt;br /&gt;            Console.WriteLine();&lt;br /&gt;            Console.WriteLine("This patient's name is: " + genCheckUpResults.lstName + ", " + genCheckUpResults.frstName + ".");&lt;br /&gt;            Console.WriteLine("This patient is " + genCheckUpResults.ptAge + " years old.");&lt;br /&gt;            Console.WriteLine("This patient weighs: " + genCheckUpResults.ptWt + " lbs.");&lt;br /&gt;            Console.WriteLine();&lt;br /&gt;            Console.WriteLine();&lt;br /&gt;&lt;br /&gt;            //Here we return the results that are stored&lt;br /&gt;            //in the application from the exams just entered.&lt;br /&gt;            Console.WriteLine("The exam information and results are as follows:");&lt;br /&gt;            Console.WriteLine();&lt;br /&gt;            //This will return the results of the Tonsil Exam&lt;br /&gt;            genCheckUpResults.ExamResults("Tonsil Exam", resultsTonsilExist);&lt;br /&gt;            genCheckUpResults.DoctorsComments(commentsTonsilExam);&lt;br /&gt;            Console.WriteLine();&lt;br /&gt;            //This will return the results of the Blood Pressure Exam&lt;br /&gt;            genCheckUpResults.ExamResults("Blodd Pressure Exam", resultsBPExam);&lt;br /&gt;            genCheckUpResults.DoctorsComments(commentsBPExam);&lt;br /&gt;            Console.WriteLine();&lt;br /&gt;&lt;br /&gt;            //This coding will pause our application so we may&lt;br /&gt;            //read what was written to the console, otherwise&lt;br /&gt;            //everything may appear faster than we can read.&lt;br /&gt;            Console.WriteLine();&lt;br /&gt;            Console.WriteLine("Please press the 'ENTER' key to continue...");&lt;br /&gt;            Console.ReadLine();&lt;br /&gt;        }&lt;br /&gt;    }//ends class&lt;br /&gt;}//ends namespace&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;Listing 3 (&amp;ldquo;program.cs&amp;rdquo;)&lt;/span&gt; &lt;br /&gt;&lt;p class="MsoNormal"&gt;As you can see from the above coding examples the abstract class can come in handy for determining what properties, methods (including arguments and return values, if we want), and events will be used in the derived class.&lt;/p&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;You will want to use abstract classes to allow your programs to maintain flexibility and help to ensure code quality. By specifying within the abstract class what properties and methods are required you can ensure that all derived classes contain this; should any derived class not contain this information then an error can be generated. For this to occur you only need to use the keyword &lt;em&gt;&lt;font color="#0000ff"&gt;abstract&lt;/font&gt;&lt;/em&gt; in the method that must be inherited and overridden. &lt;/p&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;In this particular instance I had only created one (1) derived class; this is just to shorten the length of the blog; as you may remember from the real-world comparison I had used three artists, and each one had implemented their own methods of creating the end-result. This is the exact same idea behind programming derived classes. In the first derived class we had created an additional property of Boolean type that had stored if the patient had their tonsils or not.&lt;/p&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;One other thing I had not quite covered is that you can derive a class from a derived class and have the second-generation derived class inherit all of the first-generation&amp;rsquo;s derived properties, methods and events. You can also create abstract classes that are derived from an abstract class.&lt;/p&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;An example of where you may want to create a &amp;lsquo;second-generation&amp;rsquo; abstract class, based on our &amp;ldquo;base_patient&amp;rdquo; abstract class is if you had wanted to have a sub-set of classes for pregnancy related exams. You may have two exams for pregnancy women, one to determine what trimester of pregnancy the patient is in, and one for general follow-up exams during the pregnancy.&lt;/p&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;As you can imagine these two pregnancy classes could have overlapping properties; thus you may want to create an abstract class containing general pregnancy properties and methods. Such properties you may want to contain in the abstract class would be the conception date and patients weight (as you can tell, I had omitted this property from the abstract base class for demonstration reasons in this paragraph). You may also want to define methods within this &amp;lsquo;second-generation&amp;rsquo; abstract class, such as: &lt;i&gt;a calculation of due date&lt;/i&gt;.&lt;/p&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;Once you have this &amp;lsquo;second-generation&amp;rsquo; abstract class you could then create derived classes that would implement these properties and methods as appropriate for their needs. You will want to test these concepts out on your own, such as take this coding and create an abstract class deriving from the abstract base class, then creating a derived class from the &amp;lsquo;second-generation&amp;rsquo; abstract class (&lt;i&gt;an idea would be instead of working with dates, you could have the abstract pregnancy class hold the patients number of conceived days, and then have the method defined to calculate the remaining number of days until expected due date. You could have a derived pregnancy exam implement the calculation using the total_days_within_pregnancy minus conceived days&lt;/i&gt;).&lt;/p&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;One last thing, you may be wondering why I chose to call the base abstract class &amp;ldquo;base_patient&amp;rdquo;, as opposed to something like &amp;ldquo;base_records&amp;rdquo;. This is to show you how polymorphism kind of plays into the abstract world, although this is not truly polymorphism (for more information about &amp;ldquo;&lt;i&gt;polymorphism&lt;/i&gt;&amp;rdquo; see my previous blog called, &amp;ldquo;&lt;a title="Polymorphism blog by C# Helper" href="http://csharphelper.blogspot.com/2007/04/brief-look-at-polymorphism-and-how-it.html" target="_blank"&gt;A brief look at polymorphism and how it is used&amp;hellip;&lt;/a&gt;&amp;rdquo;). You can make a fairly decent assumption based on the class name that the original intention of the base class was for creating objects, or in this case derived classes, relating directly to patients. Records are somewhat related to patients; however, they are not a direct link to the patient class. In this instance I am demonstrating how you can take an abstract class and use it in any form of derived class as you wish, as long as you maintain the inheritance rules (for my information about &amp;ldquo;inheritance&amp;rdquo; see&amp;nbsp;my previous blog called, &amp;ldquo;&lt;a title="Inheritance blog by C# Helper" href="http://csharphelper.blogspot.com/2007/04/brief-look-at-and-how-to.html" target="_blank"&gt;A brief look at inheritance and how to inherit&lt;/a&gt;&amp;rdquo;).&lt;/p&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;As you can see abstract offers a large amount of flexibility in your programs and should be used when possible or practical. In this example we had simply created a way for you to create a default class for records of exams and made it so you can easily add additional record exam classes as you need them. This has minimized the amount of code required, by eliminating repetitive code such as the patients name and age, and it has also used a method to ensure the proper use of the method by defining the method&amp;rsquo;s arguments. This will seem like a lot of information to take in at first, after a few trial-and-error runs you will quickly get the hang of how to use abstract classes. If you are still unsure of the benefits of using abstract classes, then try re-creating this code by creating separate classes, then imagine trying to do this with a full-featured application that could have hundreds of properties for the patient, hundreds of methods for exams and thousands of records with different types of information; you will quickly realize the benefits that are gained from this simple concept.&lt;/p&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;In my next blog I will delve a little deeper into the &amp;ldquo;&lt;i&gt;abstract&lt;/i&gt;&amp;rdquo; world and start to discuss &amp;ldquo;&lt;i&gt;abstract methods&lt;/i&gt;&amp;rdquo; and the following blog will be about &amp;ldquo;&lt;i&gt;interfaces&lt;/i&gt;&amp;rdquo;. These two&amp;nbsp;upcoming blogs&amp;nbsp;will compliment, and build upon, your knowledge of &amp;ldquo;&lt;i&gt;abstract classes&lt;/i&gt;&amp;rdquo;.&lt;/p&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;Until then&amp;hellip;Happy Coding!&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7762405448954283322-3244528628916518384?l=csharphelper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://csharphelper.blogspot.com/feeds/3244528628916518384/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7762405448954283322&amp;postID=3244528628916518384' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7762405448954283322/posts/default/3244528628916518384'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7762405448954283322/posts/default/3244528628916518384'/><link rel='alternate' type='text/html' href='http://csharphelper.blogspot.com/2007/04/brief-look-at-abstract-classes-and-how.html' title='A brief look at &quot;Abstract Classes&quot; and how to use them...'/><author><name>James</name><uri>http://www.blogger.com/profile/12968105462220114467</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7762405448954283322.post-4253165031910794163</id><published>2007-04-12T17:40:00.001-07:00</published><updated>2007-04-12T17:40:17.964-07:00</updated><title type='text'>A brief look at Polymorphism and how it is used...</title><content type='html'>&lt;h3&gt;What is &lt;i&gt;Polymorphism&lt;/i&gt;?&lt;/h3&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;Polymorphism is the ability to use a class as more than one type. The class can use a derived type or its own type. The most common use of polymorphism is redefining a method; this can be accomplished by either replacing the members of the base class with the derived class&amp;rsquo; members or overriding the members of the base class.&amp;nbsp;&lt;/p&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;To make this a little more clear I will break down this definition into more manageable terminology. You basically use polymorphism every time you create an object that uses the members of a class (such as in previous blogs I had created objects that implemented members of the &lt;i&gt;Base_Patient&lt;/i&gt; and &lt;i&gt;Derived_Patient&lt;/i&gt; classes). Microsoft has stated that all objects in C# are an instance of polymorphism. The basic idea is that you are allowing the derived class or object to implement methods, properties and events in manners different than that of which the base class already implements them.&lt;/p&gt;&lt;br /&gt;&lt;h3&gt;How do I use polymorphism?&lt;/h3&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;An example of using polymorphism would be if in a doctor&amp;rsquo;s office they had wanted to track the distance of walking a patient could do within a given time frame and then compare this to an average distance of other patients within the same age span.&amp;nbsp;&lt;/p&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;To begin we would create a class that sets the properties that all patients have in common. We know that all patients have a first name, last name and age. In this sample I had created a class called &amp;ldquo;Base_Patient&amp;rdquo; and placed the following code in it:&lt;/p&gt;&lt;br /&gt;&lt;table class="MsoTableGrid" style="BORDER-RIGHT: medium none; BORDER-TOP: medium none; BORDER-LEFT: medium none; BORDER-BOTTOM: medium none; BORDER-COLLAPSE: collapse" cellspacing="0" cellpadding="0" width="766" border="1"&gt;&lt;br /&gt;&lt;tbody&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;td style="BORDER-RIGHT: windowtext 1pt solid; PADDING-RIGHT: 5.4pt; BORDER-TOP: windowtext 1pt solid; PADDING-LEFT: 5.4pt; PADDING-BOTTOM: 0in; BORDER-LEFT: windowtext 1pt solid; WIDTH: 750px; PADDING-TOP: 0in; BORDER-BOTTOM: windowtext 1pt solid" valign="top"&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Courier New"&gt;using&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt; System;&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Courier New"&gt;using&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt; System.Collections.Generic;&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Courier New"&gt;using&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt; System.Text;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Courier New"&gt;namespace&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt; polymorphism_1&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;{&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: blue"&gt;class&lt;/span&gt; &lt;span style="COLOR: teal"&gt;Base_Patient&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//This creates our strong type variables that we will&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//want to allow to be accessed from outside of our class.&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: blue"&gt;public&lt;/span&gt; &lt;span style="COLOR: blue"&gt;string&lt;/span&gt; strFirstName,&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; strLastName;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: blue"&gt;public&lt;/span&gt; &lt;span style="COLOR: blue"&gt;int&lt;/span&gt; intAge;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//default constructor for base class&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: blue"&gt;public&lt;/span&gt; Base_Patient() { }&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//We create the constructor requiring the values of&amp;nbsp;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//the patient at the time the class is constructed.&amp;nbsp;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//Notice later a property of "Age" is created; however, we&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//do not use it in this constructor..it wil be used later&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//in the derived class (when polymorphing this constructor).&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: blue"&gt;public&lt;/span&gt; Base_Patient(&lt;span style="COLOR: blue"&gt;string&lt;/span&gt; strFN, &lt;span style="COLOR: blue"&gt;string&lt;/span&gt; strLN)&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; strFirstName = strFN;&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; strLastName = strLN;&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//destructor of object class&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ~Base_Patient() { }&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//We set our property accessors as private so we may&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//ensure that an outside class has to assign these values&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="COLOR: green"&gt;//through our predetermined methods. This is considered a&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//best practice.&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//property firstName of patient&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: blue"&gt;private&lt;/span&gt; &lt;span style="COLOR: blue"&gt;string&lt;/span&gt; FirstName&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: blue"&gt;get&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: blue"&gt;return&lt;/span&gt; strFirstName;&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="COLOR: blue"&gt;set&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; strFirstName = &lt;span style="COLOR: blue"&gt;value&lt;/span&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//property lastName of patient&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: blue"&gt;private&lt;/span&gt; &lt;span style="COLOR: blue"&gt;string&lt;/span&gt; LastName&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: blue"&gt;get&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: blue"&gt;return&lt;/span&gt; strLastName;&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="COLOR: blue"&gt;set&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; strLastName = &lt;span style="COLOR: blue"&gt;value&lt;/span&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//property Age of patient&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: blue"&gt;private&lt;/span&gt; &lt;span style="COLOR: blue"&gt;int&lt;/span&gt; Age&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: blue"&gt;get&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: blue"&gt;return&lt;/span&gt; Age;&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: blue"&gt;set&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;intAge = &lt;span style="COLOR: blue"&gt;value&lt;/span&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//We declare our methods as public so our derived objects&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//can polymorph them later.&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: blue"&gt;public&lt;/span&gt; &lt;span style="COLOR: blue"&gt;void&lt;/span&gt; DisplayName()&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: teal"&gt;Console&lt;/span&gt;.WriteLine(&lt;span style="COLOR: maroon"&gt;"This patients name is: "&lt;/span&gt; + strFirstName + &lt;span style="COLOR: maroon"&gt;" "&lt;/span&gt; + strLastName);&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: blue"&gt;public&lt;/span&gt; &lt;span style="COLOR: blue"&gt;void&lt;/span&gt; DisplayAge()&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: teal"&gt;Console&lt;/span&gt;.WriteLine(&lt;span style="COLOR: maroon"&gt;"This patient is: "&lt;/span&gt; + intAge + &lt;span style="COLOR: maroon"&gt;" years old."&lt;/span&gt;);&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//You will notice the method to display the&amp;nbsp;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//RateofWalk does not contain implementation code,&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//this is because we will force any derived class to&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//create the method (polymorph this method).&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//We use the modifier "virtual" because it allows a derived class to&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//override this method. We also set these methods to return an expected&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//integer (of double type) result since we want to perform a calculation.&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//We must use the "double" as the type because during our calculation&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//the result will briefly be a decimal value; the data type "int"&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//cannot handle this type (the result would be rounded to nearest&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//real value..i.e. 0.3 would be 0).&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: blue"&gt;public&lt;/span&gt; &lt;span style="COLOR: blue"&gt;virtual&lt;/span&gt; &lt;span style="COLOR: blue"&gt;void&lt;/span&gt; RateOfWalk(&lt;span style="COLOR: blue"&gt;double&lt;/span&gt; dblPtntRate, &lt;span style="COLOR: blue"&gt;double&lt;/span&gt; dblMinutesWalked){}&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;span style="COLOR: green"&gt;//ends the class&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;}&lt;span style="COLOR: green"&gt;&lt;font color="#000000"&gt;//&lt;/font&gt;ends the namespace&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;span style="FONT-SIZE: 8pt"&gt;Figure 1 (Base class called &amp;ldquo;Base_Patient.cs&amp;rdquo;)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;Now that we have our base class we can create our derived class. In this sample I created a class called &amp;ldquo;Derived_Patient&amp;rdquo; and placed the following code in it:&lt;/p&gt;&lt;br /&gt;&lt;table class="MsoTableGrid" style="BORDER-RIGHT: medium none; BORDER-TOP: medium none; BORDER-LEFT: medium none; BORDER-BOTTOM: medium none; BORDER-COLLAPSE: collapse" cellspacing="0" cellpadding="0" width="765" border="1"&gt;&lt;br /&gt;&lt;tbody&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;td style="BORDER-RIGHT: windowtext 1pt solid; PADDING-RIGHT: 5.4pt; BORDER-TOP: windowtext 1pt solid; PADDING-LEFT: 5.4pt; PADDING-BOTTOM: 0in; BORDER-LEFT: windowtext 1pt solid; WIDTH: 749px; PADDING-TOP: 0in; BORDER-BOTTOM: windowtext 1pt solid" valign="top"&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Courier New"&gt;using&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt; System;&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Courier New"&gt;using&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt; System.Collections.Generic;&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Courier New"&gt;using&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt; System.Text;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Courier New"&gt;namespace&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt; polymorphism_1&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;{&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//This inherits from our base class.&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: blue"&gt;class&lt;/span&gt; &lt;span style="COLOR: teal"&gt;Derived_Patient&lt;/span&gt; : &lt;span style="COLOR: teal"&gt;Base_Patient&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//We create a public variable that will handle the&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//value of our returned rate from our calculation method&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//we will create later when polymorphing the "RateOfWalk" method.&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: blue"&gt;public&lt;/span&gt; &lt;span style="COLOR: blue"&gt;double&lt;/span&gt; dblPtntReturnedRate;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//We create a constructor that polymorphs the base&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//class' constructor method. You can tell because our&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//base class uses only 2 arguments and we use 3 here!&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: blue"&gt;public&lt;/span&gt; Derived_Patient(&lt;span style="COLOR: blue"&gt;string&lt;/span&gt; strDP_FN, &lt;span style="COLOR: blue"&gt;string&lt;/span&gt; strDP_LN, &lt;span style="COLOR: blue"&gt;int&lt;/span&gt; intDP_Age)&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; strFirstName = strDP_FN;&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; strLastName = strDP_LN;&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; intAge = intDP_Age;&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//Here we override our base class' "RateOfWalk" method, thus&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//we are polymorphing it.&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: blue"&gt;public&lt;/span&gt; &lt;span style="COLOR: blue"&gt;override&lt;/span&gt; &lt;span style="COLOR: blue"&gt;void&lt;/span&gt; RateOfWalk(&lt;span style="COLOR: blue"&gt;double&lt;/span&gt; dblPatientRate, &lt;span style="COLOR: blue"&gt;double&lt;/span&gt; dblPatientMinutesWalked)&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//Remember that our base class has no defined method&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//procedures? Here we place our procedures as we want.&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//Here we are calculating the rate of walk for the patient&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//over a specified period of time. Our calculation assumes&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="COLOR: green"&gt;//the "intPtntRate" is the miles walked per hour.&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//We divide the MPH by 60 (minutes in an hour) and multiple by&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//the amount of minutes walked.&amp;nbsp;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//I.E. 6 MPH for 30 minutes = .10 miles per minute&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: blue"&gt;if&lt;/span&gt; (intAge &amp;gt;= 55)&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dblPtntReturnedRate = ((dblPatientRate / 60) * dblPatientMinutesWalked);&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: blue"&gt;else&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//I chose to add the "* 2" at the end of this arithmetic statement&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="COLOR: green"&gt;//based on average someone of much younger age than 55 is assumed&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//to walk twice as fast. The alternate route would be to decrease&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//the divisor of 60 to be 30.&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dblPtntReturnedRate = (((dblPatientRate / 60) * dblPatientMinutesWalked) * 2);&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//This line will output our results into a console window.&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: teal"&gt;Console&lt;/span&gt;.WriteLine(&lt;span style="COLOR: maroon"&gt;"This patient has walked: "&lt;/span&gt; + dblPtntReturnedRate + &lt;span style="COLOR: maroon"&gt;" miles during "&lt;/span&gt; + dblPatientMinutesWalked + &lt;span style="COLOR: maroon"&gt;" minutes!"&lt;/span&gt;);&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;span style="COLOR: green"&gt;//ends the class&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;}&lt;span style="COLOR: green"&gt;//ends the namespace&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;span style="FONT-SIZE: 8pt"&gt;Figure 2 (Derived class called &amp;ldquo;Derived_Patient.cs&amp;rdquo;)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;Now we create our &amp;ldquo;Program.cs&amp;rdquo; file and place the following code in it:&lt;/p&gt;&lt;br /&gt;&lt;table class="MsoTableGrid" style="BORDER-RIGHT: medium none; BORDER-TOP: medium none; BORDER-LEFT: medium none; BORDER-BOTTOM: medium none; BORDER-COLLAPSE: collapse" cellspacing="0" cellpadding="0" width="764" border="1"&gt;&lt;br /&gt;&lt;tbody&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;td style="BORDER-RIGHT: windowtext 1pt solid; PADDING-RIGHT: 5.4pt; BORDER-TOP: windowtext 1pt solid; PADDING-LEFT: 5.4pt; PADDING-BOTTOM: 0in; BORDER-LEFT: windowtext 1pt solid; WIDTH: 748px; PADDING-TOP: 0in; BORDER-BOTTOM: windowtext 1pt solid" valign="top"&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Courier New"&gt;using&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt; System;&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Courier New"&gt;using&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt; System.Collections.Generic;&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Courier New"&gt;using&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt; System.Text;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Courier New"&gt;namespace&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt; polymorphism_1&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;{&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: blue"&gt;class&lt;/span&gt; &lt;span style="COLOR: teal"&gt;Program&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: blue"&gt;static&lt;/span&gt; &lt;span style="COLOR: blue"&gt;void&lt;/span&gt; Main(&lt;span style="COLOR: blue"&gt;string&lt;/span&gt;[] args)&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//We create our object as a "new" object and set the name and age&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//of the patient.&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: teal"&gt;Derived_Patient&lt;/span&gt; clsDP = &lt;span style="COLOR: blue"&gt;new&lt;/span&gt; &lt;span style="COLOR: teal"&gt;Derived_Patient&lt;/span&gt;(&lt;span style="COLOR: maroon"&gt;"John"&lt;/span&gt;, &lt;span style="COLOR: maroon"&gt;"Smith"&lt;/span&gt;, 62);&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//The following lines of code will call the polymorphed and unchanged&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//methods of the derived class. You will see that we have the choice&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//of what methods are overriden; as long as the base class does not&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//force overriding or restrict overriding.&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: teal"&gt;Console&lt;/span&gt;.WriteLine(&lt;span style="COLOR: maroon"&gt;"The following 2 lines will display information that isn't polymorphed:"&lt;/span&gt;);&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; clsDP.DisplayName();&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; clsDP.DisplayAge();&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: teal"&gt;Console&lt;/span&gt;.WriteLine();&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: teal"&gt;Console&lt;/span&gt;.WriteLine(&lt;span style="COLOR: maroon"&gt;"This line will display the polymorphed method in our derived class"&lt;/span&gt;);&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//RateOfWalk requires 2 arguments: Miles walked per hour, and&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//amount of time walked by the patient.&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;clsDP.RateOfWalk(6, 30);&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: teal"&gt;Console&lt;/span&gt;.ReadLine();&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;span style="COLOR: green"&gt;//ends the class&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;}&lt;span style="COLOR: green"&gt;//ends the namespace&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;span style="FONT-SIZE: 8pt"&gt;Figure&amp;nbsp;3 (Program file&amp;nbsp;called &amp;ldquo;Program.cs&amp;rdquo;)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;You can see from above that polymorphing had happened intentionally, by creating a method for the &amp;ldquo;RateOfWalk&amp;rdquo; that was originally declared in the base class and later used in the derived class. Another instance of polymorphism, although much more subtle, is when we created our constructor of the derived class. The base class contained a property for the patient&amp;rsquo;s age; however, the constructor of the base class did NOT set this property. When we created the constructor of the derived class we had added the requirement of the patient&amp;rsquo;s age, thus creating a polymorphed constructor (albeit unconventional).&amp;nbsp;&lt;/p&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;The calculations used in the &amp;ldquo;RateOfWalk&amp;rdquo; method in the derived class may not be practical (I chose this method so I can also demonstrate the use of an &amp;ldquo;if&amp;rdquo; statement), and especially not clear cut; although it should show clearly that you can create different implementation code for methods declared in other base classes. Don&amp;rsquo;t get hung up on what the code is calculating or why it is; just remember that we did not have any implementation code of the method in the base class and we were able to create the implementation code in the derived class!&amp;nbsp;&lt;/p&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;Keep in mind this blog is only introducing you to the concept of &amp;ldquo;&lt;i&gt;polymorphism&lt;/i&gt;&amp;rdquo;, there are many more features and rules than what I can cover. There are many resources available; books have chapters discussing this, websites have sections and forums discussing this and you will come across it in many examples (rather you realize it or not). The best starting point I can give you, without requiring the purchasing of materials, is to refer you to Microsoft&amp;rsquo;s website discussing &amp;ldquo;&lt;a style="COLOR: blue; TEXT-DECORATION: underline; text-underline: single" href="http://msdn2.microsoft.com/en-us/library/ms173152(vs.80).aspx"&gt;polymorphism&lt;/a&gt;&amp;rdquo;. It is a decent starting point; however, it does get very technical. Google is another good way to find out more information; do be aware that &amp;ldquo;&lt;i&gt;polymorphism&lt;/i&gt;&amp;rdquo; is slightly different in programming languages, so you should ensure that you are reading material related to C# programming.&amp;nbsp;&lt;/p&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;Happy coding!&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7762405448954283322-4253165031910794163?l=csharphelper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://csharphelper.blogspot.com/feeds/4253165031910794163/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7762405448954283322&amp;postID=4253165031910794163' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7762405448954283322/posts/default/4253165031910794163'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7762405448954283322/posts/default/4253165031910794163'/><link rel='alternate' type='text/html' href='http://csharphelper.blogspot.com/2007/04/brief-look-at-polymorphism-and-how-it.html' title='A brief look at Polymorphism and how it is used...'/><author><name>James</name><uri>http://www.blogger.com/profile/12968105462220114467</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7762405448954283322.post-3726450677463398943</id><published>2007-04-12T02:58:00.001-07:00</published><updated>2007-04-12T03:10:03.373-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='class'/><category scheme='http://www.blogger.com/atom/ns#' term='Code Example'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><category scheme='http://www.blogger.com/atom/ns#' term='OOP'/><category scheme='http://www.blogger.com/atom/ns#' term='inherit'/><category scheme='http://www.blogger.com/atom/ns#' term='Object-Oriented Programming'/><title type='text'>A brief look at "inheritance" and how to "inherit"...</title><content type='html'>&lt;h3&gt;What is &lt;i&gt;inheritance&lt;/i&gt;?&lt;/h3&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;In previous years of programming the developer would often create a class that would contain specific members (properties and methods). When the developer wanted to create another class that would cater to different specific needs, even if they needs were similar in many areas with enough differences to not allow use of the first class, the developer would need to create another class, including all of the members, to fill these needs.&amp;nbsp;&lt;/p&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;As Object-Oriented Programming (OOP) had caught on the idea of the ability to re-use code was a major benefit of this new concept. To enable to developer to avoid from having to recreate a class with minor changes Microsoft (and other language specific providers) had introduced the idea of &amp;ldquo;inheritance&amp;rdquo; of classes. A developer could create a second class (the derived class) based on the first class&amp;rsquo; (base class) members. In many cases the derived class would have proven error-free methods and properties the developer would want to bring into the derived class. The developer was then given the option to use &amp;ldquo;inheritance&amp;rdquo; of the base class in the derived class. The developer would then be able to pick and choose what members the derived class would be allowed to have access to, as well as what members the derived class would utilize.&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;Another nice feature was that the developer could create a derived class from the original derived class, any inherited members of the derived (second derived) classes are considered to be &amp;ldquo;indirect base class&amp;rdquo; inheritances. The inheritances found in the first derived class are class &amp;ldquo;direct base class&amp;rdquo; inheritances.&lt;/p&gt;&lt;br /&gt;&lt;h3&gt;How do you &lt;i&gt;inherit&lt;/i&gt;?&lt;/h3&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;To derive a class you simply follow the class identifier with a colon and then the name of the base class.&amp;nbsp;&lt;/p&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;Figure 1 shows the creation of the base class called &amp;ldquo;Base_Patient.cs&amp;rdquo;:&lt;/p&gt;&lt;br /&gt;&lt;table class="MsoTableGrid" style="BORDER-RIGHT: medium none; BORDER-TOP: medium none; BORDER-LEFT: medium none; BORDER-BOTTOM: medium none; BORDER-COLLAPSE: collapse" cellspacing="0" cellpadding="0" border="1"&gt;&lt;br /&gt;&lt;tbody&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;td style="BORDER-RIGHT: windowtext 1pt solid; PADDING-RIGHT: 5.4pt; BORDER-TOP: windowtext 1pt solid; PADDING-LEFT: 5.4pt; PADDING-BOTTOM: 0in; BORDER-LEFT: windowtext 1pt solid; WIDTH: 6.15in; PADDING-TOP: 0in; BORDER-BOTTOM: windowtext 1pt solid" valign="top" width="590"&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Courier New"&gt;using&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt; System;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Courier New"&gt;namespace&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt; inheritance_1&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;{&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: blue"&gt;public&lt;/span&gt; &lt;span style="COLOR: blue"&gt;class&lt;/span&gt; &lt;span style="COLOR: teal"&gt;Base_Patient&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: blue"&gt;public&lt;/span&gt; &lt;span style="COLOR: blue"&gt;string&lt;/span&gt; strFirstName,&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; strLastName;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;// default values constructor class&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: blue"&gt;public&lt;/span&gt; Base_Patient() { }&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;// preferred constructor method&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: blue"&gt;public&lt;/span&gt; Base_Patient(&lt;span style="COLOR: blue"&gt;string&lt;/span&gt; strFN, &lt;span style="COLOR: blue"&gt;string&lt;/span&gt; strLN)&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; strFirstName = strFN;&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; strLastName = strLN;&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//destructor of object class&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ~Base_Patient() { }&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//property firstName of patient&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: blue"&gt;private&lt;/span&gt; &lt;span style="COLOR: blue"&gt;string&lt;/span&gt; FirstName&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: blue"&gt;get&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: blue"&gt;return&lt;/span&gt; strFirstName;&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: blue"&gt;set&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; strFirstName = &lt;span style="COLOR: blue"&gt;value&lt;/span&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;span style="COLOR: green"&gt;//property lastName of patient&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: blue"&gt;private&lt;/span&gt; &lt;span style="COLOR: blue"&gt;string&lt;/span&gt; LastName&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: blue"&gt;get&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: blue"&gt;return&lt;/span&gt; strLastName;&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: blue"&gt;set&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; strLastName = &lt;span style="COLOR: blue"&gt;value&lt;/span&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//Displaying patient's name (last, first)&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: blue"&gt;public&lt;/span&gt; &lt;span style="COLOR: blue"&gt;void&lt;/span&gt; DisplayName()&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: teal"&gt;Console&lt;/span&gt;.WriteLine(&lt;span style="COLOR: maroon"&gt;"The patient's name is "&lt;/span&gt; + strLastName + &lt;span style="COLOR: maroon"&gt;", "&lt;/span&gt; + strFirstName + &lt;span style="COLOR: maroon"&gt;"."&lt;/span&gt;);&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;span style="COLOR: green"&gt;//end class&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;}&lt;span style="COLOR: green"&gt;//end namespace&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;font size="1"&gt;Figure 1 (Base class "Base_Patient.cs")&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;Figure 2 shows the creation of the derived class called &amp;ldquo;Derived_Patient.cs&amp;rdquo;:&lt;/p&gt;&lt;br /&gt;&lt;table class="MsoTableGrid" style="BORDER-RIGHT: medium none; BORDER-TOP: medium none; BORDER-LEFT: medium none; BORDER-BOTTOM: medium none; BORDER-COLLAPSE: collapse" cellspacing="0" cellpadding="0" border="1"&gt;&lt;br /&gt;&lt;tbody&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;td style="BORDER-RIGHT: windowtext 1pt solid; PADDING-RIGHT: 5.4pt; BORDER-TOP: windowtext 1pt solid; PADDING-LEFT: 5.4pt; PADDING-BOTTOM: 0in; BORDER-LEFT: windowtext 1pt solid; WIDTH: 6.15in; PADDING-TOP: 0in; BORDER-BOTTOM: windowtext 1pt solid" valign="top" width="590"&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Courier New"&gt;using&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt; System;&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Courier New"&gt;using&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt; System.Collections.Generic;&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Courier New"&gt;using&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt; System.Text;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Courier New"&gt;namespace&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt; inheritance_1&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;{&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//The following line of code inherits from the base class called "Base_Patient"&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: blue"&gt;class&lt;/span&gt; &lt;span style="COLOR: teal"&gt;Derived_Patient&lt;/span&gt; : &lt;span style="COLOR: teal"&gt;Base_Patient&lt;/span&gt;&amp;nbsp;&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//Here we are just declaring a new variable that will be used in the class&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//this variable can also be called from outside objects and classes&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: blue"&gt;public&lt;/span&gt; &lt;span style="COLOR: blue"&gt;string&lt;/span&gt; strMiddleName;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//Here we create our constructor for the derived class&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="COLOR: green"&gt;//notice we don't have to recreate the constructors for the&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//base class as we have 'inherited' that constructor method.&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: blue"&gt;public&lt;/span&gt; Derived_Patient(&lt;span style="COLOR: blue"&gt;string&lt;/span&gt; strMN, &lt;span style="COLOR: blue"&gt;string&lt;/span&gt; strFrstN, &lt;span style="COLOR: blue"&gt;string&lt;/span&gt; strLstN)&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//The only requirement we have to utilize the properties that&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//have already been created in the base class is to create&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//assigments of values to the variables. In the instances where&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//the values were previously assigned in the base class this&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//inherited class would already have them stored and we would&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//not need to assign a value, unless we wanted to overrite that&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//value with one from this class. NOTE: Assigning a new value here&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//would not replace the base class value, it would only be creating&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//the value in this class reference and this class would only see&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//that new reference (and any derived classes of this derived class).&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; strMiddleName = strMN;&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;strFirstName = strFrstN;&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; strLastName = strLstN;&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//Here we created our destructor of the class&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ~Derived_Patient() { }&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//Here we are creating the property and the method of setting / getting&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//the values of that property. Notice we have declared the property method&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//as private. This will ensure that no outside calls can modify this&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//property without going through our pre-defined constructor class. This is&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//a best practice method because we are controlling access to the property.&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: blue"&gt;private&lt;/span&gt; &lt;span style="COLOR: blue"&gt;string&lt;/span&gt; MiddleName&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: blue"&gt;get&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: blue"&gt;return&lt;/span&gt; strMiddleName;&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: blue"&gt;set&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; strMiddleName = &lt;span style="COLOR: blue"&gt;value&lt;/span&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//Here I am creating a simple console writing statment that will display&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//our middle name along with the First and Last name of the base class&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//we had inherited.&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//Notice in particular the references to the "strFirstName" and "strLastName"&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//properties that were defined in the base class; we did NOT need to do one&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//line of coding to utilize these properties!!!&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: blue"&gt;public&lt;/span&gt; &lt;span style="COLOR: blue"&gt;void&lt;/span&gt; DisplayFullName()&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//This writes to the console&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: teal"&gt;Console&lt;/span&gt;.WriteLine(&lt;span style="COLOR: maroon"&gt;"The patients FULL name is: "&lt;/span&gt; + strFirstName + &lt;span style="COLOR: maroon"&gt;" "&lt;/span&gt; + strMiddleName + &lt;span style="COLOR: maroon"&gt;" "&lt;/span&gt; + strLastName);&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;span style="COLOR: green"&gt;//This ends class&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;}&lt;span style="COLOR: green"&gt;//This ends the namespace&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;font size="1"&gt;Figure&amp;nbsp;2 (Derived class "Derived_Patient.cs")&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;Figure 3 shows the creation of the &amp;ldquo;Program.cs&amp;rdquo;:&lt;/p&gt;&lt;br /&gt;&lt;table class="MsoTableGrid" style="BORDER-RIGHT: medium none; BORDER-TOP: medium none; BORDER-LEFT: medium none; BORDER-BOTTOM: medium none; BORDER-COLLAPSE: collapse" cellspacing="0" cellpadding="0" border="1"&gt;&lt;br /&gt;&lt;tbody&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;td style="BORDER-RIGHT: windowtext 1pt solid; PADDING-RIGHT: 5.4pt; BORDER-TOP: windowtext 1pt solid; PADDING-LEFT: 5.4pt; PADDING-BOTTOM: 0in; BORDER-LEFT: windowtext 1pt solid; WIDTH: 6.15in; PADDING-TOP: 0in; BORDER-BOTTOM: windowtext 1pt solid" valign="top" width="590"&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Courier New"&gt;using&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt; System;&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Courier New"&gt;using&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt; System.Collections.Generic;&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Courier New"&gt;using&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt; System.Text;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Courier New"&gt;namespace&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt; inheritance_1&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;{&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: blue"&gt;class&lt;/span&gt; &lt;span style="COLOR: teal"&gt;Program&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: blue"&gt;static&lt;/span&gt; &lt;span style="COLOR: blue"&gt;void&lt;/span&gt; Main(&lt;span style="COLOR: blue"&gt;string&lt;/span&gt;[] args)&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//The following 2 lines of code will demonstrate how to create objects of&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//the derived class and the base class. You will want to pay attention that&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//I had intentionally created the derived class object first to show you that&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="COLOR: green"&gt;//when I create the base class information it does not overwrite the derived&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//class' information. The order of calling methods does not matter in this&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//case because each object occupies its own memory resource and can fully&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//function independently.&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: teal"&gt;Derived_Patient&lt;/span&gt; clsDerivedPatient = &lt;span style="COLOR: blue"&gt;new&lt;/span&gt; &lt;span style="COLOR: teal"&gt;Derived_Patient&lt;/span&gt;(&lt;span style="COLOR: maroon"&gt;"Edward"&lt;/span&gt;, &lt;span style="COLOR: maroon"&gt;"John"&lt;/span&gt;, &lt;span style="COLOR: maroon"&gt;"Smith"&lt;/span&gt;);&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: teal"&gt;Base_Patient&lt;/span&gt; clsBasePatient = &lt;span style="COLOR: blue"&gt;new&lt;/span&gt; &lt;span style="COLOR: teal"&gt;Base_Patient&lt;/span&gt;(&lt;span style="COLOR: maroon"&gt;"Jane"&lt;/span&gt;, &lt;span style="COLOR: maroon"&gt;"Doe"&lt;/span&gt;);&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//The following lines of code will demonstrate how to call the methods from&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//within the derived class and base class. You will want to pay attention that&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//I am intentionally calling the derived class first to show that even though&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//the last line of code ABOVE had called and written to the property of the&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//base class' "First Name" and "Last Name" that the derived class' properties&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//were not overwritten. The order of calling methods does not matter in this&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//case because each object occupies its own memory resource and can fully&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//function independently.&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: teal"&gt;Console&lt;/span&gt;.WriteLine(&lt;span style="COLOR: maroon"&gt;"This is to display the derived class' information..."&lt;/span&gt;);&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; clsDerivedPatient.DisplayFullName();&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: teal"&gt;Console&lt;/span&gt;.WriteLine();&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: teal"&gt;Console&lt;/span&gt;.WriteLine(&lt;span style="COLOR: maroon"&gt;"This is to display the base class' information..."&lt;/span&gt;);&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; clsBasePatient.DisplayName();&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: teal"&gt;Console&lt;/span&gt;.ReadLine();&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//You can feel free to move the lines of code around in your own implementation&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//of this code example. You will see that regardless of what order you place the&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//lines of coding you will get the same results; with exception, of course, of&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//the results being displayed in different order if moved to a different order&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;span style="COLOR: green"&gt;//This ends the class&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;}&lt;span style="COLOR: green"&gt;&lt;font color="#000000"&gt;//&lt;/font&gt;This ends the namespace&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;font size="1"&gt;Figure&amp;nbsp;3 (Main program "Program.cs")&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;You can see from above an example of how you can inherit from another class and how you can still use the base class&amp;rsquo; members. The main point to understand here is that when you inherit from a class you are not necessarily overwriting that class; there are other keyword modifiers that can be used with the creation of classes that can force the developer to overwrite a class&amp;rsquo; member, and likewise there are keyword modifiers that can prevent a developer from overwriting a class&amp;rsquo; member.&amp;nbsp;&lt;/p&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;The next blog will touch on &amp;ldquo;polymorphism&amp;rdquo;; which is one of the methods used to define or redefine the base class&amp;rsquo; members (typically methods).&amp;nbsp;&lt;/p&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;Hopefully this will help you to grab a good grasp on inheritance and how to inherit from a class. Remember that trial and error are the best way to learn in programming, regardless of the amount of books and blogs you read or classes you take trying out what you learn will surpass in learning experiences. Written forms can only tell you so much, so please try what you learn and always change things around and try out ideas. I find it enjoyable to think of a new thing I want to see if I can do and just start coding it in and see where my ideas fall short at and how to make them work in the real world.&amp;nbsp;&lt;/p&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;Happy coding!&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7762405448954283322-3726450677463398943?l=csharphelper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://csharphelper.blogspot.com/feeds/3726450677463398943/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7762405448954283322&amp;postID=3726450677463398943' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7762405448954283322/posts/default/3726450677463398943'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7762405448954283322/posts/default/3726450677463398943'/><link rel='alternate' type='text/html' href='http://csharphelper.blogspot.com/2007/04/brief-look-at-and-how-to.html' title='A brief look at &amp;quot;inheritance&amp;quot; and how to &amp;quot;inherit&amp;quot;...'/><author><name>James</name><uri>http://www.blogger.com/profile/12968105462220114467</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7762405448954283322.post-8292009125322299225</id><published>2007-04-11T13:38:00.001-07:00</published><updated>2007-04-12T00:46:06.173-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='class'/><category scheme='http://www.blogger.com/atom/ns#' term='Code Example'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><category scheme='http://www.blogger.com/atom/ns#' term='OOP'/><category scheme='http://www.blogger.com/atom/ns#' term='Object-Oriented Programming'/><title type='text'>A brief look at classes and how to use them...</title><content type='html'>&lt;h3&gt;What are classes?&lt;/h3&gt;&lt;br /&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;Classes are a collection of unlike data and functions. Quite simply put; classes can hold string, integers, double, Booleans and other types of data in one bundled location.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;An example would be if you were to create an application for a doctor&amp;rsquo;s office to hold patient information. Some basic information each patient may be required to supply is their first name, last name, age, medical group number, if they are a minor.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;A class would hold all of this information. Each person&amp;rsquo;s information would be placed into a class through the use of an object. An object, in this instance, would be thought of as the person themselves. Each person would tell the class what their information is (we will cover this in more detail in a future blog about objects).&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;How do you use classes?&lt;/h3&gt;&lt;br /&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;An example of how you would build a simple class to hold the persons information would be:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;First I created a class file called &amp;ldquo;Base_Patient.cs&amp;rdquo; and placed the following code in it: &lt;br /&gt;&lt;table id="AutoNumber2" style="BORDER-COLLAPSE: collapse" bordercolor="#111111" cellspacing="0" cellpadding="0" width="100%" border="1"&gt;&lt;br /&gt;&lt;tbody&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;td width="100%"&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: Courier New"&gt;//This line of coding will implement the classes within&lt;br /&gt;//the "System" framework. This implementation is created&lt;br /&gt;//by using the keyword "using". We implement "System" so&lt;br /&gt;//we may use the "Console" class. We can avoid implementing&lt;br /&gt;//the "System" class by calling the "Console" class directly&lt;br /&gt;//through the framework it is stored within.&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Courier New"&gt;using&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt; System;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Courier New"&gt;namespace&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt; myDoctors_Application&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: blue"&gt;public&lt;/span&gt; &lt;span style="COLOR: blue"&gt;class&lt;/span&gt; &lt;span style="COLOR: teal"&gt;Base_Patient&lt;br /&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//patient attributes (2 strings, 2 integers, 1 boolean)&lt;br /&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//Here we are declaring these variable public so classes&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //and method calls from outside this class can access&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //them. If we have a variable we wish not to be modified&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //outside of this class we would then declare it as "private"&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: blue"&gt;public&lt;/span&gt; &lt;span style="COLOR: blue"&gt;string&lt;/span&gt; strFirstName,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; strLastName;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: blue"&gt;public&lt;/span&gt; &lt;span style="COLOR: blue"&gt;int&lt;/span&gt; intAge,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; intMedicalGroup;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: blue"&gt;public&lt;/span&gt; &lt;span style="COLOR: blue"&gt;bool&lt;/span&gt; blnIsMinor;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;// default values constructor class&lt;br /&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: blue"&gt;public&lt;/span&gt; Base_Patient() { }&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;// preferred constructor method&lt;br /&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//This constructor class shall place all variables&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //provided to it in our instance of the class. You&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //can see in the subsequent lines of code in this&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //constructor that we are matching the appropriate&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //variable in the constructor's&amp;nbsp;argument list&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//to the appropriate variable we had previously&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //declared as public (or we could have made private&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //if we didn't want the variable&amp;rsquo;s value leaving this class).&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: blue"&gt;public&lt;/span&gt; Base_Patient(&lt;span style="COLOR: blue"&gt;string&lt;/span&gt; strFN, &lt;span style="COLOR: blue"&gt;string&lt;/span&gt; strLN, &lt;span style="COLOR: blue"&gt;int&lt;/span&gt; intA, &lt;span style="COLOR: blue"&gt;int&lt;/span&gt; intMGN, &lt;span style="COLOR: blue"&gt;bool&lt;/span&gt; blnM)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; strFirstName = strFN;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; strLastName = strLN;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; intAge = intA;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; intMedicalGroup = intMGN;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; blnIsMinor = blnM;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//destructor of object class&lt;br /&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;~Base_Patient() { }&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//The all of the following property methods just set&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //and get the appropriate variables.&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//This should be self explanatory.&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//property firstName of patient&lt;br /&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: blue"&gt;private&lt;/span&gt; &lt;span style="COLOR: blue"&gt;string&lt;/span&gt; FirstName&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="COLOR: blue"&gt;get&lt;br /&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: blue"&gt;return&lt;/span&gt; strFirstName;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: blue"&gt;set&lt;br /&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; strFirstName = &lt;span style="COLOR: blue"&gt;value&lt;/span&gt;;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//property lastName of patient&lt;br /&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: blue"&gt;private&lt;/span&gt; &lt;span style="COLOR: blue"&gt;string&lt;/span&gt; LastName&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="COLOR: blue"&gt;get&lt;br /&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: blue"&gt;return&lt;/span&gt; strLastName;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: blue"&gt;set&lt;br /&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; strLastName = &lt;span style="COLOR: blue"&gt;value&lt;/span&gt;;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//property Age of patient&lt;br /&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: blue"&gt;private&lt;/span&gt; &lt;span style="COLOR: blue"&gt;int&lt;/span&gt; Age&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: blue"&gt;get&lt;br /&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: blue"&gt;return&lt;/span&gt; intAge;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: blue"&gt;set&lt;br /&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; intAge = &lt;span style="COLOR: blue"&gt;value&lt;/span&gt;;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//property MedicalGroupNumber of patient&lt;br /&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: blue"&gt;private&lt;/span&gt; &lt;span style="COLOR: blue"&gt;int&lt;/span&gt; MGN&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: blue"&gt;get&lt;br /&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="COLOR: blue"&gt;return&lt;/span&gt; intMedicalGroup;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: blue"&gt;set&lt;br /&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; intMedicalGroup = &lt;span style="COLOR: blue"&gt;value&lt;/span&gt;;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//property IsMinor&amp;nbsp;&lt;br /&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: blue"&gt;private&lt;/span&gt; &lt;span style="COLOR: blue"&gt;bool&lt;/span&gt; Minor&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: blue"&gt;get&lt;br /&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="COLOR: blue"&gt;return&lt;/span&gt; blnIsMinor;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: blue"&gt;set&lt;br /&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; blnIsMinor = &lt;span style="COLOR: blue"&gt;value&lt;/span&gt;;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//The following methods show that you can choose&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //to have your base class perform lines of code&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //and return the results to the calling object class.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//Displaying the patient's age&lt;br /&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: blue"&gt;public&lt;/span&gt; &lt;span style="COLOR: blue"&gt;void&lt;/span&gt; DisplayAge()&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//This was written this way to show you how to&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //use an inner-joining concatenation for strings and&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//variables. The "+" is our concatenation operator.&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: teal"&gt;Console&lt;/span&gt;.WriteLine(&lt;span style="COLOR: maroon"&gt;"This patient is "&lt;/span&gt; + intAge + &lt;span style="COLOR: maroon"&gt;" years old."&lt;/span&gt;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//Displaying patient's name (last, first)&lt;br /&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: blue"&gt;public&lt;/span&gt; &lt;span style="COLOR: blue"&gt;void&lt;/span&gt; DisplayName()&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: teal"&gt;Console&lt;/span&gt;.WriteLine(&lt;span style="COLOR: maroon"&gt;"The patient's name is "&lt;/span&gt; + strLastName + &lt;span style="COLOR: maroon"&gt;", "&lt;/span&gt; + strFirstName + &lt;span style="COLOR: maroon"&gt;"."&lt;/span&gt;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//Display if patient is a minor&lt;br /&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: blue"&gt;public&lt;/span&gt; &lt;span style="COLOR: blue"&gt;void&lt;/span&gt; DisplayIsMinor()&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: teal"&gt;Console&lt;/span&gt;.WriteLine(&lt;span style="COLOR: maroon"&gt;"Is this patient a minor? "&lt;/span&gt; + blnIsMinor);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//Display the patients Medical Group #&lt;br /&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: blue"&gt;private&lt;/span&gt; &lt;span style="COLOR: blue"&gt;void&lt;/span&gt; DisplayMedicalGroup()&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: teal"&gt;Console&lt;/span&gt;.WriteLine(&lt;span style="COLOR: maroon"&gt;"The patient's medical group # is: "&lt;/span&gt; + intMedicalGroup);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;span style="COLOR: green"&gt;//end class&lt;br /&gt;&lt;/span&gt;}&lt;span style="COLOR: green"&gt;//end namespace&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;span style="FONT-SIZE: 8pt; FONT-FAMILY: Arial"&gt;Figure 1 (base class coding; &amp;ldquo;Base_Patient.cs&amp;rdquo;).&lt;/span&gt;&amp;nbsp;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;Next I created the primary program file called &amp;ldquo;Program.cs&amp;rdquo; and paced the following code in it: &lt;br /&gt;&lt;table id="AutoNumber1" style="BORDER-COLLAPSE: collapse" bordercolor="#111111" cellspacing="0" cellpadding="0" width="100%" border="1"&gt;&lt;br /&gt;&lt;tbody&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;td width="100%"&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: Courier New"&gt;//I have commented out the declaration implementing the "System"&lt;br /&gt;//class to show ways to implement the console by directly calling&lt;br /&gt;//it from the class it is stored in.&lt;br /&gt;//using System;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Courier New"&gt;namespace&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt; myDoctors_Application&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: blue"&gt;class&lt;/span&gt; &lt;span style="COLOR: teal"&gt;DerivedPatientClass&lt;/span&gt;: &lt;span style="COLOR: teal"&gt;Base_Patient&lt;/span&gt;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//main entry point&lt;br /&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: blue"&gt;static&lt;/span&gt; &lt;span style="COLOR: blue"&gt;void&lt;/span&gt; Main(&lt;span style="COLOR: blue"&gt;string&lt;/span&gt;[] args)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="COLOR: green"&gt;//This line of coding creates a new&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //object called "clsPatient"&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//it is an object derived from the base&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //class called "Base_Patient".&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//We use the "new" operator to create the object&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //and we are using the overloaded method of&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //the constructor inside the base class.&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: teal"&gt;Base_Patient&lt;/span&gt; clsPatient = &lt;span style="COLOR: blue"&gt;new&lt;/span&gt; &lt;span style="COLOR: teal"&gt;Base_Patient&lt;/span&gt;(&lt;span style="COLOR: maroon"&gt;"John"&lt;/span&gt;, &lt;span style="COLOR: maroon"&gt;"Smith"&lt;/span&gt;, 28, 123456, &lt;span style="COLOR: blue"&gt;false&lt;/span&gt;);&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//The following lines of code that start with&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //"Console.WriteLine" are methods that are&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //built-in to the "System" class and will allow&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //us to create a console window and write to the&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //console window...you can see in the first two lines&amp;nbsp;&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//I had created a simple text that is written&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //to the console.&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.&lt;font color="#000000"&gt;&lt;span style="COLOR: teal"&gt;Console&lt;/span&gt;.WriteLine(&lt;/font&gt;&lt;span style="COLOR: maroon"&gt;&lt;font color="#000000"&gt;"&lt;/FONT&gt;This is to display the patient's information we stored in our base class!"&lt;/span&gt;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.&lt;span style="COLOR: teal"&gt;Console&lt;/span&gt;.WriteLine(&lt;span style="COLOR: maroon"&gt;"Patient Info: "&lt;/span&gt;);&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//Here I am calling the object "clsPatient"&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //that I had created earlier;&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//I am exposing the methods that were made&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //public in the class since the class methods&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //already contain code to write to the console we can&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//omit the "Console.WriteLine" method call&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //in these instances.&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; clsPatient.DisplayName();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; clsPatient.DisplayAge();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; clsPatient.DisplayIsMinor();&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//If you uncomment the below line you will&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//recieve an error; this is because in the&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //base class this method was declared as private;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //this means only the base class itself can use that&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //method! To be able to display this method from the&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//base class you can go into the base class and change&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //the line from "private void DisplayMedicalGroup()"&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //to "public void DisplayMedicalGroup()"&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="BACKGROUND: yellow; COLOR: green"&gt;//clsPatient.DisplayMedicalGroup();&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;font size="2"&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;/font&gt;&lt;font color="#008000" size="2"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&lt;font color="#000000"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;span style="COLOR: green"&gt;//This line of code shows that even though the &amp;ldquo;DisplayMedicalGroup()&amp;rdquo;&lt;br /&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&lt;font color="#000000"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;span style="COLOR: green"&gt;//method is declared private you can still access the variable called&lt;br /&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&lt;font color="#000000"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;span style="COLOR: green"&gt;//&amp;rdquo;intMedicalGroup&amp;rdquo;; you can access it because the variable was created&lt;br /&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&lt;font color="#000000"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;span style="COLOR: green"&gt;//as a &amp;ldquo;public&amp;rdquo; variable. Remember that properties, methods, variables (etc..)&lt;br /&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&lt;font color="#000000"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;span style="COLOR: green"&gt;//that are &amp;ldquo;public&amp;rdquo; can be read / written to from the base class and all derived&lt;br /&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&lt;font color="#000000"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;span style="COLOR: green"&gt;//classes and objects.&amp;nbsp;Properties, methods and variables&amp;nbsp;created &amp;ldquo;private&amp;rdquo;&lt;br /&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&lt;font color="#000000"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;span style="COLOR: green"&gt;//can only be accessed from within the base class that created it.&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.&lt;font color="#000000"&gt;&lt;span style="COLOR: teal"&gt;Console&lt;/span&gt;.WriteLine(&lt;/font&gt;&lt;span style="COLOR: maroon"&gt;&lt;font color="#000000"&gt;"&lt;/FONT&gt;Patient is from Group # " &lt;font color="#000000"&gt;+ clsPatient.intMedicalGroup);&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//This line of code is actually meant to be used&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //to receive user input from the console window;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //however, in this example we are simply using it&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //to pause the application from continuing to run&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //until the end-user has pressed the "ENTER"&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//key; otherwise the console window would appear&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //and disappear faster than you could read the contents&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //and verify everything is appearing as intended.&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.&lt;span style="COLOR: teal"&gt;Console&lt;/span&gt;.ReadLine();&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;span style="COLOR: green"&gt;//end &lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: Courier New"&gt;Main()&lt;br /&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;span style="COLOR: green"&gt;//end class&lt;br /&gt;&lt;/span&gt;}&lt;span style="COLOR: green"&gt;//end namespace&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;span style="FONT-SIZE: 8pt; FONT-FAMILY: Arial"&gt;Figure 2 (main program coding; &amp;ldquo;Program.cs&amp;rdquo;).&lt;/span&gt;&amp;nbsp;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;These examples have detailed explanation of why each line of code exists.&amp;nbsp;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;The primary purpose of these examples are to show how the class is created (see Figure 1) and how you can create an object of the created class and use the methods within the class (see Figure 2).&amp;nbsp;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;I would like to point out in this blog, as well as it is already commented in the coding, the use of the public and private keyword modifiers. This will be covered in more detail in a future blog. The important thing here is to realize that in the base class code the &amp;ldquo;private&amp;rdquo; keyword used with the &lt;i&gt;DisplayMedicalGroup()&lt;/i&gt; method limits the use of this method to calls from within the base class ONLY!&amp;nbsp;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;You will notice in the creation of the base class (Figure 1) that the first line of code &amp;ldquo;using System;&amp;rdquo; was included. This allows for us to call the &amp;ldquo;Console&amp;rdquo; method directly from the &amp;ldquo;System&amp;rdquo; class. We can omit this line of coding should we desire; however, this would create additional coding to be used to use the &amp;ldquo;Console&amp;rdquo; method. You can see a demonstration of how-to call the &amp;ldquo;Console&amp;rdquo; method directly from the class in the main program coding (Figure 2).&amp;nbsp;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;Hopefully this has given you a decent understanding of how to initiate a class, at the base level, and call it from within your application coding (by creating an object-instance of the class).&amp;nbsp;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;Happy coding! &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7762405448954283322-8292009125322299225?l=csharphelper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://csharphelper.blogspot.com/feeds/8292009125322299225/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7762405448954283322&amp;postID=8292009125322299225' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7762405448954283322/posts/default/8292009125322299225'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7762405448954283322/posts/default/8292009125322299225'/><link rel='alternate' type='text/html' href='http://csharphelper.blogspot.com/2007/04/brief-look-at-classes-and-how-to-use_6294.html' title='A brief look at classes and how to use them...'/><author><name>James</name><uri>http://www.blogger.com/profile/12968105462220114467</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7762405448954283322.post-2161979389107523722</id><published>2007-04-10T18:51:00.001-07:00</published><updated>2007-04-11T13:19:36.785-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.Net Framework'/><category scheme='http://www.blogger.com/atom/ns#' term='Programming'/><category scheme='http://www.blogger.com/atom/ns#' term='Garbage Collection'/><category scheme='http://www.blogger.com/atom/ns#' term='Garbage Collector'/><category scheme='http://www.blogger.com/atom/ns#' term='CLR'/><title type='text'>Why is Garbage Collection uncontrollable?</title><content type='html'>&lt;p&gt;This is partially true. The Garbage Collection is a set of classes that is a part of .NET Framework&amp;rsquo;s Common Language Runtime (CLR). The reason it is percieved as being uncontrollable is because Microsoft uses the Garbage Collection classes at unknown times. Thus, it is unpredictable. The part that is untrue of this class being uncontrollable is that the developer can call its methods at anytime and force the Garbage Collection to occur. &lt;/p&gt;&lt;br /&gt;&lt;p&gt;If you would like to read more detail of how to do this and how the Garbage Collection class works you can read&amp;nbsp;a detailed summary I have prepared of the Garbage Collection class in another blog called &amp;ldquo;&lt;a title="A brief look at Garbage Collection" href="http://codingchat.blogspot.com/2007/04/brief-look-at-garbage-collection.html" target="_blank"&gt;A brief look at Garbage Collection&lt;/a&gt;&amp;rdquo;. I would recommend reading the blog because the Garbage Collection class affects each developer regardless of chosen programming language.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7762405448954283322-2161979389107523722?l=csharphelper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://csharphelper.blogspot.com/feeds/2161979389107523722/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7762405448954283322&amp;postID=2161979389107523722' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7762405448954283322/posts/default/2161979389107523722'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7762405448954283322/posts/default/2161979389107523722'/><link rel='alternate' type='text/html' href='http://csharphelper.blogspot.com/2007/04/why-is-garbage-collection.html' title='Why is Garbage Collection uncontrollable?'/><author><name>James</name><uri>http://www.blogger.com/profile/12968105462220114467</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7762405448954283322.post-4632405581148225231</id><published>2007-04-04T21:15:00.001-07:00</published><updated>2007-04-11T13:21:44.563-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.Net Framework'/><category scheme='http://www.blogger.com/atom/ns#' term='class'/><category scheme='http://www.blogger.com/atom/ns#' term='Namespace'/><title type='text'>How do you use the .NET Framework?</title><content type='html'>&lt;p style="MARGIN: 0in 0in 0pt"&gt;&lt;font face="Times New Roman"&gt;If you are unsure of what the .NET Framework is; you can read a brief discription in our blog (located at: &lt;/font&gt;&lt;a onclick="return top.js.OpenExtLink(window,event,this)" href="http://codingchat.blogspot.com/2007/04/what-is-net.html" target="_blank"&gt; &lt;font face="Times New Roman" color="#800080"&gt;http://codingchat.blogspot.com/2007/04/what-is-net.html&lt;/font&gt;&lt;/a&gt;&lt;font face="Times New Roman"&gt;).&lt;/font&gt;&lt;/p&gt; &lt;p style="MARGIN: 0in 0in 0pt"&gt;&lt;font face="Times New Roman"&gt;&amp;nbsp;&lt;/font&gt;&lt;/p&gt; &lt;p style="MARGIN: 0in 0in 0pt"&gt;&lt;font face="Times New Roman"&gt;Accessing the &lt;a href="http://msdn.microsoft.com/netframework"&gt;.NET Framework&lt;/a&gt; from within a programming language is actually a very simple task to accomplish. The reason it is so simple is that during the development of the framework Microsoft had created what is called  &lt;a href="http://msdn2.microsoft.com/en-us/library/cxtk6h5e(vs.80).aspx"&gt;Namespaces&lt;/a&gt;. &lt;/font&gt;&lt;/p&gt; &lt;p style="MARGIN: 0in 0in 0pt"&gt;&lt;font face="Times New Roman"&gt;&amp;nbsp;&lt;/font&gt;&lt;/p&gt; &lt;p style="MARGIN: 0in 0in 0pt"&gt;&lt;font face="Times New Roman"&gt;Namespaces are basically the logical location of a class. Namespaces are a structured system. It all starts with 3 primary namespaces: Microsoft, System, &amp;lt;Your Application Name&amp;gt;. The namespace can be increased to include any outside classes you reference into your application (  i.e. Custom classes you previously created, 3&lt;sup&gt;rd&lt;/sup&gt; party classes, etc). Namespaces are then logically grouped inside 1 of the previous primary namespaces. Example is the &amp;#39;Security&amp;#39; class is located inside the System name space; it would be accessed by importing the  System.Security namespace. &lt;/font&gt;&lt;/p&gt; &lt;p style="MARGIN: 0in 0in 0pt"&gt;&lt;font face="Times New Roman"&gt;&amp;nbsp;&lt;/font&gt;&lt;/p&gt; &lt;p style="MARGIN: 0in 0in 0pt"&gt;&lt;font face="Times New Roman"&gt;&lt;a href="http://www.microsoft.com"&gt;Microsoft&lt;/a&gt; has listed all of the currently supported namespaces on their MSDN website. You can view it at: &lt;/font&gt;&lt;a onclick="return top.js.OpenExtLink(window,event,this)" href="http://msdn2.microsoft.com/en-us/library/ms306608(VS.80).aspx" target="_blank"&gt; &lt;font face="Times New Roman" color="#800080"&gt;http://msdn2.microsoft.com/en-us/library/ms306608(VS.80).aspx&lt;/font&gt;&lt;/a&gt;&lt;font face="Times New Roman"&gt;. You should periodically review the &lt;a href="http://msdn.microsoft.com"&gt;Microsoft MSDN &lt;/a&gt; website to ensure you are correctly importing your desired namespace. Keep in mind this is for .NET 2.0. The .NET 1.0, 1.1 and 3.0 may have different namespace locations and/or arguments used to access them. &lt;/font&gt;&lt;/p&gt;  &lt;p style="MARGIN: 0in 0in 0pt"&gt;&lt;font face="Times New Roman"&gt;&amp;nbsp;&lt;/font&gt;&lt;/p&gt; &lt;p style="MARGIN: 0in 0in 0pt"&gt;&lt;font face="Times New Roman"&gt;This brings us to the next gap filled by Microsoft that was plagued when using the API interfaces. The developer didn&amp;#39;t have a clear, concise method to know how to call the API correctly. In other words if you didn&amp;#39;t have all the arguments correctly referenced then you would possibly produce errors, or worse yet, possibly not even have a working application. There are three things Microsoft did to fix this problem. First, they had made their IDE provide tooltips on what the expected arguments are. Second, they had made the namespaces available for review offline and online through usage of the MSDN website and documentation. Third, and this could be the largest benefiting factor, is that Microsoft had made it so that some classes could be overloaded.  &lt;/font&gt;&lt;/p&gt; &lt;p style="MARGIN: 0in 0in 0pt"&gt;&lt;font face="Times New Roman"&gt;&amp;nbsp;&lt;/font&gt;&lt;/p&gt; &lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;font face="Times New Roman"&gt;What is overloading a class? How do you do it? The basic principal is that you can redefine the class and its arguments; thus &amp;#39;overloading&amp;#39; the class. You then would call the &amp;#39;overloaded&amp;#39; class and the MSIL would interpret what you want to use and use the appropriate class method. This will be explained in better detail in a future blog.  &lt;/font&gt;&lt;/div&gt; &lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;font face="Times New Roman"&gt;&lt;/font&gt;&amp;nbsp;&lt;/div&gt; &lt;p style="MARGIN: 0in 0in 0pt"&gt;&lt;font face="Times New Roman"&gt;There is one most common practiced method; the developer will call a line of coding to initiate the desired class from the framework. In most cases this is done prior to all other lines of coding. An example in  &lt;a href="http://msdn2.microsoft.com/en-us/vcsharp/default.aspx"&gt;Visual C#&lt;/a&gt; to initiate the SQL class would be calling the &amp;quot;&lt;a href="http://msdn2.microsoft.com/en-us/library/sf0df423(VS.80).aspx"&gt;using&lt;/a&gt;&amp;quot; keyword prior to all other lines of coding in the class. An example would look like this:  &lt;/font&gt;&lt;/p&gt; &lt;p style="MARGIN: 0in 0in 0pt"&gt;&lt;font face="Times New Roman"&gt;&amp;nbsp;&lt;/font&gt;&lt;/p&gt; &lt;p style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 10pt"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;font face="times new roman,serif" size="1"&gt;Using System.Data.SQL;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 10pt"&gt;&lt;font face="times new roman,serif" size="1"&gt;&amp;nbsp;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 10pt"&gt;&lt;font face="times new roman,serif"&gt;&lt;font size="1"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Public Class MyClass&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 10pt"&gt;&lt;font face="times new roman,serif"&gt;&lt;font size="1"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;{&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 10pt"&gt;&lt;font face="times new roman,serif"&gt;&lt;font size="1"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;//Coding utilizing the class goes here &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 10pt"&gt;&lt;font face="times new roman,serif"&gt;&lt;font size="1"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;}&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="MARGIN: 0in 0in 0pt"&gt;&lt;font face="Times New Roman"&gt;&amp;nbsp;&lt;/font&gt;&lt;/p&gt; &lt;p style="MARGIN: 0in 0in 0pt"&gt;&lt;font face="Times New Roman"&gt;You will notice in this example the first line of coding uses the keyword &amp;quot;using&amp;quot; and then attached to the syntax is the desired class (We will cover the keyword &amp;quot;using&amp;quot; in a future blog). You may be asking yourself; since ODBC is also within the  System.Data class, then why not just reference the System.Data class instead. Well, the reason is that the sub-classes (i.e. SQL, ODBC) are not visible to the parent class. Another way to put it is comparing the question to reading a book. How come you can&amp;#39;t just read the first page of a book and claim you read the whole book, after all the remaining pages are under the first page. Well, it&amp;#39;s simple really, it&amp;#39;s because the top pages cover the pages under it. You have to specifically tell your application that you want to use the code under the parent class.  &lt;/font&gt;&lt;/p&gt; &lt;p style="MARGIN: 0in 0in 0pt"&gt;&lt;font face="Times New Roman"&gt;&amp;nbsp;&lt;/font&gt;&lt;/p&gt; &lt;p style="MARGIN: 0in 0in 0pt"&gt;&lt;font face="Times New Roman"&gt;Most programming languages will operate in a similar instance to initiate a class from the framework; you will want to verify with your reference material the exact statements/syntax to use in your desired programming language.  &lt;/font&gt;&lt;/p&gt; &lt;p style="MARGIN: 0in 0in 0pt"&gt;&lt;font face="Times New Roman"&gt;&amp;nbsp;&lt;/font&gt;&lt;/p&gt; &lt;p style="MARGIN: 0in 0in 0pt"&gt;&lt;font face="Times New Roman"&gt;This will conclude how to use the .NET framework; as I have stated previously it is not intended to be a complete resource of the subject. The starting point is the MSDN website (See the links in the links sidebar of this blog). There are many books and other websites that will cover this subject in much more detail and probably provide more thorough information. The objective of this blog was to introduce you to how to use the framework and give you resources to expand your knowledge. Always keep in mind there are three ways to program:  &lt;/font&gt;&lt;/p&gt; &lt;p style="MARGIN: 0in 0in 0pt"&gt;&lt;font face="Times New Roman"&gt;&amp;nbsp;&lt;/font&gt;&lt;/p&gt; &lt;ol style="MARGIN-TOP: 0in" type="1"&gt; &lt;li style="MARGIN: 0in 0in 0pt"&gt;&lt;font face="Times New Roman"&gt;The most logical way (logical to you, the developer). &lt;/font&gt; &lt;li style="MARGIN: 0in 0in 0pt"&gt;&lt;font face="Times New Roman"&gt;The most commonly accepted way (typically will include a &amp;#39;best practice&amp;#39;). &lt;/font&gt; &lt;li style="MARGIN: 0in 0in 0pt"&gt;&lt;font face="Times New Roman"&gt;The practical way (this is the way you can get it done, rather good or bad practices).&lt;/font&gt; &lt;/li&gt;&lt;/li&gt;&lt;/li&gt;&lt;/ol&gt; &lt;p style="MARGIN: 0in 0in 0pt"&gt;&lt;font face="Times New Roman"&gt;&amp;nbsp;&lt;/font&gt;&lt;/p&gt; &lt;p style="MARGIN: 0in 0in 0pt"&gt;&lt;font face="Times New Roman"&gt;Regardless of the method of development, regardless of the knowledge you have; always keep plugging away and always keep expanding your knowledge. The more you learn will mean the better your programs will be and the faster you can develop them. Never be afraid to ask a question to someone more experienced than you and never be afraid to try things out and see what happens (do always be careful when using any commands that will alter and/or delete files!).  &lt;/font&gt;&lt;/p&gt; &lt;p style="MARGIN: 0in 0in 0pt"&gt;&lt;font face="Times New Roman"&gt;&amp;nbsp;&lt;/font&gt;&lt;/p&gt; &lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;font face="Times New Roman"&gt;Happy programming!&lt;/font&gt;&lt;/div&gt; &lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;font face="Times New Roman"&gt;James&lt;/font&gt;&lt;/div&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7762405448954283322-4632405581148225231?l=csharphelper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://csharphelper.blogspot.com/feeds/4632405581148225231/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7762405448954283322&amp;postID=4632405581148225231' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7762405448954283322/posts/default/4632405581148225231'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7762405448954283322/posts/default/4632405581148225231'/><link rel='alternate' type='text/html' href='http://csharphelper.blogspot.com/2007/04/how-do-you-use-net-framework_6501.html' title='How do you use the .NET Framework?'/><author><name>James</name><uri>http://www.blogger.com/profile/12968105462220114467</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7762405448954283322.post-871936982615710629</id><published>2007-04-04T00:59:00.000-07:00</published><updated>2007-04-04T01:18:30.154-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Concept'/><category scheme='http://www.blogger.com/atom/ns#' term='C-Sharp'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><category scheme='http://www.blogger.com/atom/ns#' term='C #'/><category scheme='http://www.blogger.com/atom/ns#' term='OOP'/><category scheme='http://www.blogger.com/atom/ns#' term='CShap'/><category scheme='http://www.blogger.com/atom/ns#' term='Object-Oriented Programming'/><title type='text'>What is OOP and why do you need it?</title><content type='html'>Ok, this was actually covered in fairly good detail on our sister blog site: &lt;a href="http://visualbasichelper.blogspot.com"&gt;Visual Basic Helper&lt;/a&gt;; however, the topic pertains to C# users as well as the VB users. Below you will find some excerpts from the original blog posting. You can view the entire posting by visiting: &lt;a href="http://visualbasichelper.blogspot.com/2007/03/what-is-object-oriented-programming-oop.html"&gt;http://visualbasichelper.blogspot.com/2007/03/what-is-object-oriented-programming-oop.html&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:times new roman;"&gt;Object-Oriented Programming (OOP) is a concept used for programming. It is like a different way to look at things. The basic principle of OOP is that everything is either an object, a property to the object, or a method of the object. Before we can get into why you need OOP, you need to know a few other things first. &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:times new roman;font-size:85%;"&gt;OOP originally was designed to provide an answer to a "software development crisis" in the 1960s. The problem was as the software was beginning to become more and more complex there was no methods around to ensure the quality was maintained. Introduce Object-Oriented programming concept. The concept is that every program contains "objects" and these "objects" would have properties and/or methods. (Notice the use of "and/or"; some objects can have both, or just one or the other). Objects would also be able to 'inherit', 'polymorph', and 'encapsulate' to and from other objects.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;a href="http://www.microsoft.com/"&gt;&lt;span style="font-family:times new roman;font-size:85%;"&gt;Microsoft&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:times new roman;font-size:85%;"&gt; had finally decided that they had to make a serious effort to be competitive in the enterprise software development market. Their first major step in this effort was a huge improvement; it was the introduction of .NET! The reason this was a huge improvement was because the .NET architecture is based on OOP concepts. A prime example of this is that the entire .NET architecture is a collection of classes. Classes are the foundation of OOP! (.NET will be further explored in a future blog)&lt;br /&gt;&lt;br /&gt;Please take a few minutes and read-up on the concepts of OOP and how to use them. If you are unsure of where to begin then there are two resources I would recommend. &lt;/span&gt;&lt;a href="http://www.wikipedia.org/"&gt;&lt;span style="font-family:times new roman;font-size:85%;"&gt;Wikipedia&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:times new roman;font-size:85%;"&gt; and &lt;/span&gt;&lt;a href="http://www.google.com/"&gt;&lt;span style="font-family:times new roman;font-size:85%;"&gt;Google&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:times new roman;font-size:85%;"&gt;. In both cases do a search for "Object-Oriented Programming"; if you want more in-depth information than head out to your local bookstore that carries programming reference materials and pick up a book on the subject; you will find many titles available, and you will see just how vast the subject is and quickly realize the importance to learn this.&lt;br /&gt;&lt;br /&gt;OOP will be the cornerstone of all of your programming needs and answers.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7762405448954283322-871936982615710629?l=csharphelper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://csharphelper.blogspot.com/feeds/871936982615710629/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7762405448954283322&amp;postID=871936982615710629' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7762405448954283322/posts/default/871936982615710629'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7762405448954283322/posts/default/871936982615710629'/><link rel='alternate' type='text/html' href='http://csharphelper.blogspot.com/2007/04/what-is-oop-and-why-do-you-need-it.html' title='What is OOP and why do you need it?'/><author><name>James</name><uri>http://www.blogger.com/profile/12968105462220114467</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7762405448954283322.post-2508760975726464651</id><published>2007-03-31T00:07:00.000-07:00</published><updated>2007-04-04T00:17:29.377-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Keyword'/><category scheme='http://www.blogger.com/atom/ns#' term='Programming'/><category scheme='http://www.blogger.com/atom/ns#' term='C Sharp'/><category scheme='http://www.blogger.com/atom/ns#' term='C-Sharp'/><category scheme='http://www.blogger.com/atom/ns#' term='CSharp'/><category scheme='http://www.blogger.com/atom/ns#' term='C #'/><category scheme='http://www.blogger.com/atom/ns#' term='Visual Studio'/><category scheme='http://www.blogger.com/atom/ns#' term='Variable'/><title type='text'>Welcome to C # Helper Blog</title><content type='html'>This blog is intended to focus on helping the beginning C # (pronounced C-Sharp) programmer. This blog will cover topics such as what a keyword is, how to use a keyword, how to declare a variable, etc. This blog will not cover topics in-depth that are clearly beyond the capability of a beginning / novice C # programmer. This blog will not cover topics that are unrelated to C #.&lt;br /&gt;&lt;br /&gt;If you are looking to read a blog that covers additional topics and languages please read my Program / Coding Chat blog (&lt;a href="http://codingchat.blogspot.com"&gt;http://codingchat.blogspot.com&lt;/a&gt;).&lt;br /&gt;&lt;br /&gt;If you are looking to read a blog that will help you to learn how to program in the Visual Basic language, please read my Visual Basic Helper blog (&lt;a href="http://visualbasichelper.blogspot.com"&gt;http://visualbasichelper.blogspot.com&lt;/a&gt;).&lt;br /&gt;&lt;br /&gt;Thank you,&lt;br /&gt;James&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7762405448954283322-2508760975726464651?l=csharphelper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7762405448954283322/posts/default/2508760975726464651'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7762405448954283322/posts/default/2508760975726464651'/><link rel='alternate' type='text/html' href='http://csharphelper.blogspot.com/2007/03/welcome-to-c-helper-blog.html' title='Welcome to C # Helper Blog'/><author><name>James</name><uri>http://www.blogger.com/profile/12968105462220114467</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry></feed>
