CSE 109 HW 3 Due 10:45 PM Monday 27 February 2012 This is an exercise in writing makefiles. For each scenario below, assume that for each class, the declaration is in a .h file whose name is the name of the class in lower case, with .h appended, and the definitions (code) for the class are stored in a file whose name is the name of the class in lower case, with .cc appended. E.g., if the class name is AClass, the two files would be aclass.h and aclass.cc. Assume, the code for the main program is stored in the file main.cc. Assume that when a variable is declared its methods are called by the function or method declaring the variable. Assume the information given below about each of the classes is complete. For each scenario, write the makefile that compiles and links the classes and main, storing the executable file in the file prog. 1. The code in main() declares variables of class type A, B, C, D. 2. The code in main() declares variables of class type A, B, and C. Class A has instance variables of type B and C. Class C has instance variables of type B and D. 3. The code in main() declares variables of class type A and B. Class A has a function with a parameter of type class B and class B has instance variables of type class C and D. 4. The code in main() declares variables of class type A and B. Class A each has instance variables of type class C and D. Class C has variables of type D. Class D has variables of type class E. Start this assignment by creating the subdirectory hw3 in your subdirectory csc109.121. Create a file Makefile in which you write the contents of each of the makefiles, separating each makefile by dashed lines (-------------). 1. All your makefiles should have good documentation, providing your name, course, purpose of the makefile, etc. 2. Each makefile should also have a command (target) clean:, which will remove all files with a ~ or .o suffix and will remove the file prog. 3. Invoking "make" subsequent to changes in one of the files should lead to the compilation and linking of only those files affected by changing that file. 4. Don't forget to use tabs in the appropriate places.