## 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.

*Reminder:*

- the circumference of a wheel is equal to 2 times PI times its radius;
- the area of a circle
is PI times the radius squared; use a method from the Math package
to compute the second power of the radius.