eecs280sp13_MidtermExam

Obegetsomndvsrduldul eecs280 spring2013 515 uniqname

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: e function pointer. 1 bo srm(n) . oliPieit 2 itlatcmo_utpeit n) . n es_omnmlil(n,it 3 dul es_omnmlil(obe obe . obelatcmo_utpedul,dul) 4 itgets_omndvsrit n) . n raetcmo_iio(n,it 5 dul raetcmo_iio(obe obe . obegets_omndvsrdul,dul) 1.h) Draw a line connecting the functions that could be combined using function templates. 1 bo srm(n) . oliPieit 2 itlatcmo_utpeit n) . n es_omnmlil(n,it 3 dul es_omnmlil(obe obe . obelatcmo_utpedul,dul) 4 itgets_omndvsrit n) . n raetcmo_iio(n,it 5 dul raetcmo_iio(obe obe . obegets_omndvsrdul,dul) EECS 280 Spring 2013 5/15 uniqname: _________________________ Problem 2: Function Pointers Sun­Dried Brick Software (SDBS) is developing a new black­and­white digital painting program to compete with Microsoft Paint and Adobe Photoshop titled Paint280. Today is your first day as a software developer for SDBS and you have been tasked with verifying functionality of Paint280. You are given a short header file, Paint280.h, containing the various functions and structures used by the program as well as a short test case, Test.cpp. In this test case there are six calls to the function updateImage(), each of these calls draws or erases a shape from some location on the image. Your job is to draw out by hand (on the image in the space provided on the next page) what the image will look like after all of the calls to updateImage() have finished. The result of the first call has been drawn for you. /////////////////Pit8. //////////////// //////////////// an20h///////////////// src oriae tutCodnt{ itx ; n ,y } ; tpdfbo *hp)(oriae n,Codnt) yee ol(Sae Codnt,it oriae; tpdfvi *ol ) yee od(To)(; / oiis eut /Mdfe:rsl. / fet: pae eutt oti , hnrtrsapitrt eut /Efcs Udtsrsl ocnanxyte eun one orsl. Codnt*iiCodnt(oriae eut n ,ity; oriae ntoriaeCodnt*rsl,itx n ) / fet: rw hp oteiae /Efcs Dasasaet h mg. vi rw) odda(; / fet: rssasaefo h mg. /Efcs Eae hp rmteiae vi rs(; odeae) / fet: eun rewe h ie tpxlor swti h qae /Efcs Rtrstu hntepxla ieCodi ihntesur / e...
View Full Document

Ask a homework question - tutors are online