results whatdoyougetbackafterdoingthis thing

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: been asked to design a program that accepts a start time and end time of an event and computes the total number of seconds of elapsed time. The start and the end times are supplied in a 24­hour format as (hours, minutes, seconds). For example, if start time is (14, 30, 0) and end time is (16, 10, 30) then the elapsed time is 1 hour, 40 minutes and 30 seconds; i.e. 1*60*60 + 40 * 60 + 30 = 6030 seconds. (a) Write a Use Case document for this problem using the template below. Use Case Name: Description: Preconditions: (* What data are you given? *) Workflow: (* What do you do with the data you are given? *) Results: (* What do you get back after doing this thing? *) Alternates: (* What could go wrong? How do you handle it?) (b) Write a CRC card for a possible Java class that will solve this problem. Class Name: Description: Attribute: Ty pe : Method: Collaborating Classes: Tracing Code for Testing: Here is a method that determines the letter grade using the rule >= 90 is A, 80­89 is B, 70—79 is C, 60­69 is D and <60 is E. pbi hrlteGaeitnmrd) ulcca etrrd(n uGae { i nmrd =9) f(uGae> 0 /­­ie1 /­Ln lteGae='' etrrd A; /­­ie2 /­Ln i nmrd =8) f(uGae> 0 /­­ie3 /­Ln lteGae='' etrrd B; /­­ie4 /­Ln i nmrd =7...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online