Don’t Worry, Be Happy!

November 8, 2008

Genealogy of Programming Languages

Filed under: School, Programming - kAreN maE @ 5:37 pm

1954Fortran

1957Cobol

1958Algol

1958Lisp

around 1958Comit

1960APL

1960Algol 60

1962Snobol

1964PL/I

1964Simula

1964Basic

1964TRAC

around 1965CPL

around 1966Algol W

1967BCPL

1968Logo

1969B

1969Smalltalk

1970Forth

1970Prolog

1970Pascal

1970Algol 68

1970Icon

1971C

1971sh

1972PL/M

1974Clu

1975Modula

1975Scheme

1978awk

1978csh

around 1978InterPress

1978JaM

1979Rex

1979Ada

1980C with Classes

1981ABC

1982ksh

1983Turbo Pascal

1983Objective-C

1983C++

1983ML

1984PostScript

1984Neon

1984Concurrent C

1984Common Lisp

1985Object Pascal

1986Eiffel

1987Oberon

1987Perl

1987Caml

1988Tcl

1988Modula 3

1989Yerk

1989Clos

1989bash

1991Python

1991NetRexx

1991Java

1991Sather

around 1991Visual Basic

around 1993Mops

1993Ruby

1995Delphi

1995PHP

1996J

1996Objective Caml

2000C#

2000Internet C++

August 2, 2008

C#: Code for Inheritance

Filed under: School, Programming - kAreN maE @ 10:32 pm

Form.cs

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace WindowsApplication1
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void label1_Click(object sender, EventArgs e)
        {


        }

        private void button1_Click(object sender, EventArgs e)
        {
           
            if (comboBox1.SelectedItem.ToString() == "male")
            {
                Male x = new Male();
                x.Name = textBox1.Text;
                x._gender = Gender.Male;
                MessageBox.Show(x.Talk());
            }

            else
            {
                Female x = new Female();
                x.Name = textBox1.Text;
                x._gender = Gender.Female;
                MessageBox.Show(x.Talk());
            }
           
        }
    }

}

Male.cs

using System;
using System.Collections.Generic;
using System.Text;

namespace WindowsApplication1
{
    class Male : human
    {
        public override string Talk()
        {
            return base.Talk() + "I am a boy";

        }
    }
}

Female.cs

using System;
using System.Collections.Generic;
using System.Text;

namespace WindowsApplication1
{
    class Female : human
    {
        public override string Talk()
        {
            return base.Talk() + "I am a girl";

        }
    }
}

Human.cs

using System;
using System.Collections.Generic;
using System.Text;
namespace WindowsApplication1
{
    public enum Gender
    {
        Male,
        Female
    }
    public class human
    {
        public human()
        {
            humanCounter++;
        }

        private string name;
        private Gender gender;
        public virtual string Talk()
        {

            return "my name is " + name + " and i am a " + gender + ".nCurrent Number of Instance of human" + humanCounter;

        }

        private static int humanCounter = 0;
        public string Name
        {
            get
            {
                return name;
            }
            set
            {
                name = value;
            }
        }

        public Gender _gender
        {
            get
            {
                return gender;
            }

            set
            {
                gender = value;
            }


        }

    }

}

C#: Code for HumanType

Filed under: School, Programming - kAreN maE @ 10:18 pm

Form1.cs

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace WindowsApplication1
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void label1_Click(object sender, EventArgs e)
        {

          
        }

        private void button1_Click(object sender, EventArgs e)
        {
            human x = new human();
            x.Name = textBox1.Text;
            if (comboBox1.SelectedItem.ToString() == "Male")
            {
                x._gender = Gender.Male;
            }
            else
            {
                x._gender = Gender.Female;
            }
            MessageBox.Show(x.Talk());
        }
    }

    }

Human.cs

using System;
using System.Collections.Generic;
using System.Text;
namespace WindowsApplication1
{
    public enum Gender
    {
        Male,
        Female
    }
    public class human
    {
        public human()
        {
            humanCounter++;
        }

        private string name;
        private Gender gender;
        public string Talk()
        {

            return "my name is " + name +" and i am a " + gender +".nCurrent Number of Instance of human" + humanCounter;

        }

        private static int humanCounter = 0;
        public string Name
        {
            get
            {
                return name;
            }
            set
            {
                name = value;
            }
        }

        public Gender _gender
        {
            get
            {
                return gender;
            }

            set
            {
                gender = value;
            }


        }

    }

}

Get free blog up and running in minutes with Blogsome
Theme designed by Alex King