**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:

- ask the user (the student who types in this information) for
the following information:
- his or her name;
- the name of the student's department;
- the number of students
*n*in this department; - the average GPA
*g*of students in the department; - the number
*H*of students who are members of honor societies; - the number
*A*of students who are active in professional organizations (like ACM); and - the number
*p*of research publications co-authored by students.

- compute:
- the percentage
*h*of students who are members of honor societies; - the percentage
*a*of students who are active in professional organizations (like ACM); - the department's rating
*r*, asr = wn * n + wg * g + wh * h + wa * a + wp * p; assume that wn = 1, wg = 50, wh = 1, wa = 2, and wp = 40;

- the percentage
- print a report that contains:
- the name of the department;
- the name of the reporting person;
- the number of students in the department;
- the average GPA of students in this department;
- the number and percentage of students who are members of honor societies;
- the number and percentage of students who are active in professional organizations;
- the number of research publications co-authored by students; and
- the resulting rating of the department.

**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

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.