Homework
1 Details for MPCS 51410
Each
homework assignment will consist of a small problem in some OO
code, which is somehow problematic, given your developing
understanding of good OO best practices and patterns, you will
improve, thus eliminating any negative issues in the code you
are given. Each homework assignment is intended to give every
student hands-on experience with the core concepts covered
during the course. You may code your solution to the
problem in any legitimate OO language of your choice. You
need to submit labs to the TAs for grading--see submission
instructions below. Generally, unless otherwise specified,
you will have one week to complete each assigned homework
problem.
See
the
syllabus for information on grading. Turning in lab
assignments on time is required, without exception, and all late deliveries will be
penalized, regardless
of cause. Submit your assignments to the
subversion repository according to the directions on the
syllabus page.
You
may
write these solutions in any programming language of
your choice. Our suggestion is now is not the time to
learn a new programming language along with the concepts
themselves. So our suggestion is to use whatever
programming language you know best.
Homework
1 Due: 5:00 pm, Monday,
February 8, 2021
Coding
Problem:
BACKGROUND:
Like
all programming-related problems, learning a new programming
language or style is not an exercise in reading but rather an
exercise in thinking and typing. This homework is designed
to give you hands-on experience in some fundamental skills
involved in object-oriented design and coding. You will
generally find the References section below helpful in addition
to the required and recommended reading.
WHAT YOU NEED TO DO:
See the code here. You
are to read and understand the code, what it is intending to
accomplish, and what the responsibilities are of the class or
classes. Nonetheless, there are one or more problems in the
code and its design which require your insight in their
amelioration. Your mission, should you choose to accept it,
is to "fix" the problem(s) in the code (they are design problems,
not syntactic problems or bugs...the code will indeed "run"),
without introducing any new problems, by writing a replacement set
of code in any legitimate object-oriented programming of your
choice.
STEP 1:
Your first assignment is to create a UML diagram of this simple
program (using whatever tool you wish), showing the classes and
the operations and attributes. You are to produce and
deliver an image or pdf (etc.) of this "current state" model in
your submission.
STEP 2:
Next, examine your model in
light of the following facts about the organization that
produced this code. Consider the organizational chart
below. Note that Sue who is the CFO along with Billy
Bob, who is in charge of Human Resources, have
recently created a corporate policy requiring that all
accounting actions (including reporting) must include
protections around PII, Personally Identifiable Information, and
this includes financial information as well as address
information (electronic and physical). Bart, who is in
charge of all corporate communications, has been storming up and
down the corridors of IT complaining that financial reporting is
taking "way too long" and that all reporting information should
be co-located in source code for performance
reasons. Note that the CIO, who reports
to Sue, naturally trying to please everyone, has directed his
development staff to create code aligned with Bart's directives,
primarily because he shouts the loudest. You have a
portion of that code presented to your in this homework
assignment.

STEP N:
Your job is
to rewrite/modify the code presented to you according to
object-oriented best practices. You are
to produce and deliver an image or pdf (etc.) of this
"target state solution" model in your submission as well.
In preparation for submission, be sure to include a README with
instructions on how to compile (if necessary) and run your coded
solution.
Very important: Inside comments at the top of your
coded solution, you are to fully describe the problem(s) in the
original code as you have determined it, and describe how your
solution handles the original problem(s), and defend your solution
in light of object-oriented best practices.
References:
You
may
find the following references helpful:
Submitting:
Use the
folder named "hw1" in your Subversion repository. See the
syllabus for more info about submission using Subversion. Upload
your HW1 solution file(s) and any supporting materials to the
repo.