cs31 lecture 15

Setimagesize32 imsetcolorblack imsetcolorblack

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: eSize(32, 32); im.setImageSize(32, im.setColorBlack(); im.setColorBlack(); im.printImage(); im.printImage(); im.applyGradient(10); im.applyGradient(10); im.printImage(); im.printImage(); im.setPixel(10, 2, 1); im.setPixel(10, im.setPixel(20, 2, 1); im.setPixel(20, im.printImage(); im.printImage(); im.applySmooth(); im.applySmooth(); im.printImage(); im.printImage(); 3 Example of a design 4 Dynamic dispatch x Key feature of OOP x So far, classes hierarchy seen as a way to: Express a good design idea Express Reuse code x Dynamic dispatch enables the concept of “interface” It enables polymorphism x Main idea: the actual method implementation is selected at Main run-time, when the method is called run-time, 5 How...
View Full Document

This note was uploaded on 04/03/2014 for the course CS 31 taught by Professor Melkanoff during the Fall '00 term at UCLA.

Ask a homework question - tutors are online