CS 1401 Assignment #3

Date Assigned: Monday, February 6, 2006 or Tuesday, February 7, 2006.

Due Date: correspondingly, Monday, February 13, 2006, or Tuesday, February 14, 2006, before the beginning of your lab section.

Goals: The main goal of this assignment is to learn how to implement arithmetic operations in Java.

Points: This assignment is worth a total of 20 points. No late assignments will be accepted, but credit will be given for partially completed assignments turned in on time.

Assignment: To encourage the departments to work better, the university is thinking of organizing a competition between different departments so that students from a winning department will get a special celebration party.

There are many possible criteria for selecting a winning department: the number of students, their average GPA, the percentage of students who are members of honor societies, the percentage of students who are active in professional organizations (like ACM), the number of research publications co-authored by senior and graduate students, etc. To select a winning department, we need to combine these criteria, with certain weights, into a single rating. To help the university, we must design a template that would compute such a rating for different departments.

Design an application class that will do the following:

Keep all the weights as named constants, to make it easier to change them later on.

Example: suppose that your TA David Ponevac reports on computer science department. According to her report, there are 400 students in this department with an average GPA of 3.1. Out of these 400 students, 40 are members of honor societies, 240 are active in professional organizations, and overall, they co-authored 25 research papers.

First, we compute the percentages: (40/100) * 100% = 10% are members of honor societies, and 60% are active in professional organizations. Then, we compute the department's rating as

1 * 400 + 50 * 3.1 + 1 * 10 + 2 * 60 + 40 * 25 = 1,685.
Based on these computations, we produce, e.g., the following report:
Report on Department of Computer Science
(based on data supplied by David Ponevac)

The Department of Computer Science has 400 students. Out of these 400
students, 40 (10%) are members of honor societies, 240 (60%) are
active in professional organizations, and overall, they co-authored
25 research papers.

Based on this data, the rating of the Department of Computer Science is
1685.

Deliverables: as announced in the labs.

Homework part. On a separate sheet of paper, please do Exercise 4, parts a)-e) (p. 144), Ex. 6 (pp. 144-145), and Ex. 3 (pp. 146-147). Explain your answers. Return the sheet with your answers to your TA by, correspondingly, Wednesday February 8 or Thursday February 9 before the beginning of your lab session.