Problem solving using applications by James Tam |
Due Friday December 8 at 4 PM
You will write a VBA macro that will be included in a Word "macro-enabled document" (ends in the suffix ".docm") document. You only need to implement a single macro/sub(routine) in order to get credit, it's not recommended that you implement multiple subroutines. However, in order to get credit for the assignment you must write VBA macro code. You will get no credit, for instance, if you just take an existing Word document and manually edit it yourself. There are a number of sample documents that the TAs may use when marking your work. None of those documents will include things beyond the requirements of the features listed below, they will just evaluate how well you implemented your program. To get you started here is an [example document]. Use this document as a starting point and embed your VBA instructions here (make sure you don't save the VBA macros in "all word documents" but in the sample document. If you are unsure of what this entails then you should refer to your in class lecture notes (the first set of VBA lecture notes) but here is a reminder image of how you should save your macros:
Because your macros will be included in the document, when it comes time to submit your work you can just upload the macro-enabled document.
Double check that your VBA macro really is in the Word document that you upload! It is up to you to do the check, you shouldn't rely on us to do it for you. If you want to be extra safe (and I highly recommend that you do this) you can copy and paste your VBA program into a regular Word document and submit that extra Word document as well the macro-enabled document. As was the case with other assignments do not use other compression utilities (such as zip), otherwise your submission may not be marked.Similar to the previous assignment everyone starts out with a grade point of zero for this assignment. As you implement the features or documentation requirements listed below your grade will increase. Violating style requirements will result in a decreased assignment grade.
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
Good naming conventions: all program identifiers (variables, named constants, macro and file names must exhibit properties good naming conventions). A penalty of -0.1 GPA will applied for the first instance of a poor naming convention, -0.2 GPA for the second instance down to a
maximum penalty of -0.3 GPA for naming conventions.Appropriate use of named constants. If there is one instance where named constants could have been employed but you didn't define it then no penalty is applied. If there were two or more instances where named constants could have been employed then a
maximum penalty of -0.1 GPA will be applied. (To get you started the cut-off used to determine if the number of spelling mistakes is unacceptable is a prime candidate for a named constant e.g. "Const SPELLING_CUTOFF = 0").Appearance of the VBA instructions. This includes applying proper and consistent indenting (4 spaces for each level of nesting - see the VBA notes Part I). This also includes using white space (spaces, tabs, empty lines) to group related features. In essence this is the 'alignment' and 'proximity' parts of the C.R.A.P. design principles from the end of the notes on spreadsheets. For instance all the instructions associated with Feature #3 should be all grouped together (little or no white space between instructions) and separated from other features using white space. A penalty of -0.1 GPA will applied for the first instance of appearance problems/inconsistencies, -0.2 GPA for the second instance down to a maximum penalty of -0.3 GPA for issues associated with appearance.
Marking: