CSE 109 Test1 SPRING 2006

CSE 109 Test1 SPRING 2006 - CSE 109 Test1 Wednesday 1 March...

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

View Full Document Right Arrow Icon
CSE 109 Test1 Wednesday 1 March 2006 SUGGESTED ANSWERS 1. Jane Whizzbang has designed classes A and B, storing the declarations in the files a.h and b.h. She stored the definitions (code) in a.cc and b.cc. She designed a templated class C, storing the template in c.h. She wrote a program and stored it in p.cc. The program in p.cc uses variables of type B. Class B has data members of type C<A>. Write a Makefile for Jane. Include a command for "cleaning up" the directory where the files are located. The executable file should be stored in the file "Whizz". ======================================================================== #Jane Whizzbang #maitrisse d'informatique OPTS= -c -Wall -Werror whizz: p.o a.o b.o g++ -o Whizz p.o a.o b.o p.o: p.cc a.h b.h c.h g++ $(OPTS) p.cc a.o: a.cc a.h g++ $(OPTS) a.cc b.o: b.cc a.h b.h c.h g++ $(OPTS) b.cc cleanUp: rm -f Wizz *~ *.o core ======================================================================== 2. Provide code to be inserted in the code below at the indicated spot, so
Background image of page 1

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

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

Page1 / 3

CSE 109 Test1 SPRING 2006 - CSE 109 Test1 Wednesday 1 March...

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

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