Homework 1

Homework 1 consists of answering the questions below and submitting the assignment to me via e-mail using the guidelines presented on slide 13 of lecture 1. This homework is worth 40 points (10 points for each question).

  1. What is the difference between abstraction and encapsulation? Define both terms and then discuss the difference. Provide examples to support your definitions and discussion.
  2. A company has asked us to design a payroll system that will pay employees for the work they perform each month. Using a level of abstraction, similar to that shown in Chapter 1 of the textbook and as shown on slide 6 of lecture 2, develop a design for this system using the functional decomposition approach. You can assume the existence of a database that contains all of the information you need on the employees. First, describe the functional decomposition approach, discuss what assumptions you have made concerning this application domain, and then present your design.
  3. Now, develop a design for the payroll system using the object-oriented approach, keeping in mind the points discussed on slides 22-27 of lecture 2. Identify the classes you would include in your design and their responsibilities. (As before, you can assume the existence of a database and that you'll be able to create objects based on the information stored in that database.) Then, identify what objects you would instantiate and in what order and how they would work together to fulfill the responsibilities associated with the payroll system.
  4. Imagine that your customer has submitted the following change request: In December, managers receive a 25% bonus and front-line employees receive a 15% bonus on top of their normal monthly pay. Show how this request alters your two designs. You do not need to recreate each design from scratch to handle this new requirement, simply discuss how each design above would be changed to handle this change request.

Notes on Grading: There is no "single right answer" to questions 2-4. This assignment is meant to reveal the quality of the design skills possessed by the students in this class. We will be grading you on your thoughtfulness and your completeness in answering the questions above along with the overall quality of the work you submit. Do not go overboard in developing these designs. You want to keep your level of granularity to one that is close to the level used in the textbook and what we've seen in lecture.

Due Dates: Homework 1 is due by 11:59 PM on Wednesday, January 19, 2011. Any homework submitted after that time but by 11:59 PM on Wednesday, January 26, 2011 will be graded but will receive a 15% penalty. After that, submissions of Homework 1 will be ignored.

© Kenneth M. Anderson, 2011