•Truck rental rate: $75 plus $1.15
per mile
–totalCost
= 75.0 + 1.15 * milesDriven
•Trips by air take 2 hours at the
airport and 1 hour for each 400 miles flown:
–tripTime
= 2.0 + (1.0/400.0)*flightMiles
•Temperature conversion:
• degreesF = (9.0/5.0)*degreesC + 32.0
•y = m*x + b // common abstraction
•Model linear equations as Java
objects:
–write general class
LinearEquation
–many applications can use its
features