Quiz 13 (based on Test 4), MW 9-10:20 am version
Date: Wednesday, December 4, 2013
Name (please type legibly, ideally in block letters):
1. Suppose that a class Scientist has already been defined,
whose objects are different scientists. The description of each
As usual, this class contains:
- his/her name,
- his/her number of
- number of citations to his/her papers.
- a constructor method,
get- and set-methods, and
- a method for computing the
scientist's impact -- which is defined as number of citations
divided by the number of publications.
1a. Write a method that, given an array of scientists, returns the
name of the scientist who has the largest impact.
1b. In the main program, create an array s consisting of two
new objects of type Scientist:
- an object describing
John von Neumann who published 100 papers and got 2,000 citations,
- an object describing Isaac Newton who published 50 papers
and was cited 10,000 times.
1c. In the main program, apply your method to the array s,
and trace the resulting code step-by-step.