200 likes | 342 Views
Object Oriented Programming Introduction. Bryan Duggan. Contact Details. Bryan Duggan School of Computing DIT, Kevin St. Phone: + 353 1 4024682 MSN: skooter500@yahoo.co.uk Skype: skooter500 Email: bryan.duggan@comp.dit.ie Web: http://www.comp.dit.ie/bduggan. Learning outcomes.
E N D
Object Oriented ProgrammingIntroduction Bryan Duggan
Contact Details Bryan Duggan School of Computing DIT, Kevin St. Phone: + 353 1 4024682 MSN: skooter500@yahoo.co.uk Skype: skooter500 Email: bryan.duggan@comp.dit.ie Web: http://www.comp.dit.ie/bduggan
Learning outcomes • To be good C and C++ programmers • To have a good understanding of OO • To be able to implement OO solutions/designs • To be able to learn new OO languages (Java, C#, JavaScript, PHP) easily • To be able to learn OO API’s such as Ogre3D easily
Book • A Guide to C++ Programming • Paul kelly • Pro Ogre3D programming • Gregory Junker
What is Computer Science? CSAA Robots AI MusicTech Games IR Machine Learning Graphics Networkprogramming Databases Web Programming Procedural Object Oriented 4GL’s Scripting Maths Digital logic Numbers Set Theory Statistics Geometry IntegrationAlgebraMatrices
Programming • I was lucky enough to get a job programming early supercomputers and discovered the amazing power of large machines to numerically simulate advanced designs. When I went to graduate school at UC Berkeley in the mid-1970s, I started staying up late, often all night, inventing new worlds inside the machines. Solving problems. Writing the code that argued so strongly to be written. • In The Agony and the Ecstasy, Irving Stone's biographical novel of Michelangelo, Stone described vividly how Michelangelo released the statues from the stone, "breaking the marble spell," carving from the images in his mind.4 In my most ecstatic moments, the software in the computer emerged in the same way. Once I had imagined it in my mind I felt that it was already there in the machine, waiting to be released. Staying up all night seemed a small price to pay to free it - to give the ideas concrete form. • Bill Joy from: • http://www.wired.com/wired/archive/8.04/joy.html
What is Procedural Programming? • Sequence of instructions • Variables • Conditions • Loops • Functions
What is OO Programming? • All of the above + • Encapsulation • Inheritance • Visibility (scoping of functions) • Polymorphism • Optional • Generics • Collections • Clever solutions to programming problems • Representing “software objects”
History of C++ • C Invented by Kernigan & Richie Bell Labs 1969 – 1972 • C++ Invented by Bjarne Strostrup 1979 – 1983 • First commercial version 1985 • Currently ANSI/ISO 1998 standard
5 Kinds of Programmers • Those who can’t • those who can without pointers • those who can with pointers • those who know object technology: OO • those who can use generics/templates
Motivation for OO with C++ • C++/Java most widely used languages, • OO is the way of the present, • familiarity increases marketability, • viable for many years, • excellent expressivity, and • excellent speed. • Easy to learn another language
Lots of “stuff” • There is an intimidating amount of material in C++ • C++ was designed to be a powerful tool for professional programmers solving real problems in diverse domains • C++ was NOT designed for academia! • C++ was NOT designed to be a nice, “pure” language, good for teaching students how to program