Lecture 3 - GUI Programming I

Lecture 3 - GUI Programming I - GUIProgramming...

Info iconThis preview shows pages 1–10. Sign up to view the full content.

View Full Document Right Arrow Icon
GUI Programming Programming with GTK+ and C EEE 13
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Model View Controller (MVC) Architecture / Design pattern that separates  Logic and User Interface (UI) Changes/modification should have minimal  effect on other parts Model –  Data and Data manipulation  components View –  User interface elements like check  box, lists, etc Controller –  Manages communication  between User, View and Model components
Background image of page 2
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Object Orient Programming  Overview System is represented as a collection of  objects  and how they interact
Background image of page 4
Class A type (similar to structs) Describes common characteristics of objects  in terms of  variables (properties/attributes)  functions (methods) Example: Class: Animal Attributes:  Number of legs, Color, Age, . .. Methods:  Speak, Eat, Sleep . ..
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Object Variables declared of a particular class. Actual instance of a class Typically created (instantiated) using a  method of the class.  typically called “new” takes care of memory allocation and initialization  for the newly created object. 
Background image of page 6
Inheritance Special relationship between classes A more specific class obtains the characteristics of  a more general class ( base  class) Methods of the more general class are still  available in the  derived  class Methods are usually customized ( overridden ) Inheritance can be treated as an  “is an”   relationship. Example Dog inherits from Animal Animal = Base Class Dog = Derived Class Dog has attributes and methods of base class “Dog is an Animal”
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Polymorphism Treat derived classes as parent classes Allows programmers to just use parent classes Example Base class: Animal Methods: Speak, Eat, Sleep Derived class: Dog, Pig, Cat Animal objects can be assigned a Dog, Pig or Cat  instance Speak behavior of Animal, depends on what was  assigned If Animal was assigned a Cat object, Speak will “Meow”,  “Oink” if Pig, and “Woof” when Dog
Background image of page 8
GUI Programming Graphical User Interface (GUI)
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 10
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 30

Lecture 3 - GUI Programming I - GUIProgramming...

This preview shows document pages 1 - 10. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online