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 14 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 5 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. For your answer, first describe the functional decomposition approach, discuss what assumptions you have made concerning this particular 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 23-32 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 Thursday, September 1, 2011. Any homework submitted after that time but by 11:59 PM on Thursday, September 8, 2011 will be graded but will receive a 15% penalty. After that, submissions of Homework 1 will be ignored.

Group Work: I strongly encourage you to start forming groups to work on homework assignments. When working in a group, it is “ok” to assign each problem to a different member of the group to work on individually but you should make sure that you come together as a group at least once to discuss all of the answers and to ensure that a high level of quality is achieved in each answer. You also want to ensure that you understand the answer to each question because similar questions may arise on the midterm and you will ultimately be expected to demonstrate that you personally understand the concept or technique involved.

Having said that, in-class students can work as an individual on this assignment if you want, though you will eventually need to join a team for work on the semester project later in the semester.

With respect to CAETE students, I expect that you will be working individually on all assingments. If you are a CAETE student but desire to work on a team, let me know and I'll do what I can to facilitate connecting you to a group of in-class students.

Any questions? Send them to me via e-mail.


© Kenneth M. Anderson, 2011