1 / 3

ITK 168 Write an application or applet

FOR MORE CLASSES VISIT<br>tutorialoutletdotcom <br><br>Write an application or applet that implements a trip-time calculator. Define and use a<br>class TripComputer to compute the time of a trip. TripComputer should have the private<br>attributes<br>• totalTime—the total time for the trip<br>• restStopTaken—a boolean flag that indicates whether a rest stop has been taken at<br>the end of the current leg<br>

Haysz
Download Presentation

ITK 168 Write an application or applet

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. EDUCATIONAL COURSESTUTORIALOUTLET

  2. ITK 168 Write an application or applet • FOR MORE CLASSES VISIT • tutorialoutletdotcom • Write an application or applet that implements a trip-time calculator. Define and use aclass TripComputer to compute the time of a trip. TripComputer should have the privateattributes• totalTime—the total time for the trip• restStopTaken—a boolean flag that indicates whether a rest stop has been taken atthe end of the current legand the following methods:• computeLegTime(distance, speed)—computes the time for a leg of the triphaving a given distance in miles and speed in miles per hour.

  3. EDUCATIONAL COURSES TUTORIALOUTLET

More Related