100 likes | 163 Views
Learn about OOP principles such as classes, objects, inheritance, and encapsulation. Improve coding reliability and maintenance. Develop analytical and conceptual skills. Explore teaching methods through simulation and examples like dog breeds.
E N D
Object Oriented Programming A brief introduction to OOP Key Concepts and Terms Skills Teaching Techniques Further Resources
A Brief Description • Primarily concerned with Classes and Objects • Objects communicate via messages • Encourage re-use • Speeds development • Improves reliability and maintenance
Key Concepts • Object • entity containing programming, code and data • Classes • determines everything about an object • Methods • a reaction to a message
Concepts • Inheritance • sub classes inherit characteristics from parent classes • Encapsulation (aka information hiding) • user only accesses objects through messages • ensures data is kept private • Polymorphism • allows objects to change depending on content
SKILLS REQUIRED • Analytical • Be able to analyse problems • Conceptual • Produce Ideas • ProjectManagement • Organise timetable for completion • People • Be able to work individually or in a group
Methods for Teaching • Didactic • Interactive (as J Grey’s presentation) • Car park simulation in Excel/Visual Basic • Dogs (or football or whatever is of interest to the class)
Inheritance • Dog • four legs • tail • barks • Wild Dog • savage • catches own food • Alsatian • short coat • large • growls • eats loads • Pet Dog • house trained (usually) • food from a tin • West Highland Terrier • short coat • small • yaps • eats small amounts
Encapsulation The Alsatian • Hungry • growling • menacing • drooling • Well Fed • friendly • placid • wagging tail Guard Dog Pet Dog Or a Guard Dog that has just done a good job!
Polymorphism growling menacing + = food Friendly
Resources • John Grey’s website (04-10-02) • John Grey’s presentation (04-10-02) • www.math.utah.edu/java/java/objects/ (04-10-02) • www.yahoo.com & search for “key concepts of object orientated programming” (04-10-02) • www.cee.hw.ac.uk/~alison/ds98/node15.html (04-10-02) • http://www.desy.de/gna/html/cc/introduction.html (09-10-02)