CS 1401, Quiz #6

Date: Monday, October 10, 2005
Name (please type legibly, ideally in block letters): ______________________________________________________________________

7. Let us assume that the number of cars produced in different days are stored, line by line, in a file daily.dat. Write down a piece of code that, given this file, computes the overall number of cars produced by the company.

8. Define a class Car with three fields make, horsepower, and wheelRadius, constructor method, and methods which return the wheel's circumference and area. Use constant(s) and methods from the Math package.