170 likes | 325 Views
ABSTRACTION. ABSTRACTION. Important points from Eckels Reading: All programming languages provide abstraction. The Object Oriented Programming approach to abstraction provides tools for the programmer to represent elements in the problem space.
E N D
ABSTRACTION Important points from Eckels Reading: • All programming languages provide abstraction. • The Object Oriented Programming approach to abstraction provides tools for the programmer to represent elements in the problem space. • The representation is general enough that the programmer is not constrained to any particular type of problem. The idea is that the program is allowed to adapt itself to the lingo of the problem by adding new types of object. • All objects, while being unique, are also part of a class of objects that have characteristics and behaviors in common.
I WANT ? Cute, Short Hair, Four Legs, Medium Size, Medium Weight, Yellow Eyes, Long Ears, Wet Nose, Long Tail, Whiskers, Brown Bark Loud, Walk Fast, Run Fast, Play with Sticks,Fetch the newspaper, Wag Tail, Eat Food, Drink Water, Sleep
Magic Box Cute, Short Hair, Four Legs, Medium Size, Medium Weight, Yellow Eyes, Long Ears, Wet Nose, Long Tail, Whiskers, Brown Bark Loud, Walk Fast, Run Fast,Play with Sticks,Fetch the newspaper, Wag Tail, Eat Food, Drink Water, Sleep
I Want A Fido! Cute, Short Hair, Four Legs, Medium Size, Medium Weight, Yellow Eyes, Long Ears, Wet Nose, Long Tail, Whiskers, Brown Bark Loud, Walk Fast, Run Fast,Play with Sticks,Fetch the newspaper, Wag Tail, Eat Food, Drink Water, Sleep
Fido Magic Box FIDO
I would be here all day Cute, Short Hair, Four Legs, Medium Size, Medium Weight, Yellow Eyes, Long Ears, Wet Nose, Long Tail, Whiskers, Black Bark Loud, Walk Fast, Run Fast,Play with Sticks,Fetch the newspaper, Wag Tail, Eat Food, Drink Water, Sleep BOB
What do they have in common? Cute, Short Hair, Four Legs, Medium Size, Medium Weight, Yellow Eyes, Long Ears, Wet Nose, Long Tail, Whiskers, Brown BarkLoud, Walk Fast, Run Fast, Play with Sticks,Fetch the newspaper, Wag Tail, Eat Food, Drink Water, Sleep Description: Hair, Legs, Size, Weight Eye Color, Ears, Tail,Whiskers, Fur Color Do: Bark, Walk, Run, Play, Fetch, Eat, Drink, Sleep
Use this instead Description: Hair, Legs, Int Size, Int Weight Eye Color, Ears, Tail,Whiskers, Fur Color Do: Bark(), Walk(), Run(), Play(), Fetch(), Eat(), Drink(), Sleep() DOG
ABSTRACTION Abstractions allow programmers to focus on the immediate problem they face without having to deal with unnecessary complexity. (StudyPlace Wiki - Abstraction)
Abstraction DOG
ABSTRACTION The basic paradigm for tackling any large problem is clear - we must “divide and rule.” How we choose to divide the problem is of overriding importance.” (Liskov, p.2)
References • Eckels, B. (2006). Thinking In Java, 4th ed. Upper Saddle River, New Jersey: Prentice Hall. • Liskov, B. (unknown). Program Development in Java.New York, New York; Addison Wesley. • Bates, B. (2005). Head First Java 2nd Ed. New York, New York; O’Reilly • Study Place Wikipedia