CSE 250 - Fall 2008 Homework 1 Grading ******************* Deductions (Deducted after final score computed): -5 points if Money.h file missing -5 points if Money.cpp file missing -5 points if MoneyDriver.cpp file missing Money.h file should only contain declarations and Money.cpp should contain the definitions of the functions. If this was not done correctly, the student should be assessed a 15 point deduction. Part A - MoneyDriver.cpp (15 points possible) ============================================= This file should have testing code for the Money class. It should create instances of Money objects and test all of the functions that were a required part of this assignment. If the file is missing award zero points. If all functions are called, award 15 points. If only some of the functions are called, award 8 points. Part B - Constructors (12 points possible) ========================================== There are three constructors for the Money class. Each constructor is worth 4 points each. If constructor has only a partially correct implementation, award 2 points, otherwise, award 4 points. Partially correct includes constructors that allow the input of over 100 cents without proper conversion to dollars and cents. (Negative values can either be handled or ignored.) Part C - Destructor (3 points possible) ======================================= This destructor does not really need to have a function body, but I did instruct people who asked to put it in the file. However, since some students may have left it out because it was not really needed, award all students 3 points regardless of the state of the destructor. Part D - Accessors & Mutators (16 points possible) ================================================== There is an accessor and a mutator needed for each of the two pieces of private data, the dollars and the cents. Mutation of cents should convert if the amount is greater than 100, and negatives can either be supported, ignored, or throw exceptions. Each function is worth 4 points with partially correct functions earning only 2 points. Part E - Addition function (18 points possible) =============================================== A money object should be passed in as a parameter (3 points). The function should properly add the values together (3 points) and convert cents to dollars when necessary (4 points). The function should be non-mutative (should not change the private data (4 points - no partial credit). A brand new money object should be returned from the function (4 points). Part F - Subtraction function (18 points possible) ================================================== A money object should be passed in as a parameter (3 points). The function should properly subtract the values (3 points) and convert cents to dollars when necessary (4 points). The function should be non-mutative (should not change the private data (4 points - no partial credit). A brand new money object should be returned from the function (4 points). Part G - Interest function (18 points possible) =============================================== The function should properly compute the interest as passed in by the parameter (6 points). Note: Interest could be assumed to already be passed in as a percent, but if the student chose to do conversion, this is acceptable as well for full credit. The function should be mutative (should change the private data (4 points - no partial credit). Conversions should be done where necessary from cents to dollars. (8 points)