This preview shows page 1. Sign up to view the full content.
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 24hour 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.
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, 8089 is B, 70—79 is C, 6069 is D and <60 is E.
ulcca etrrd(n uGae
i nmrd =9)
/Ln i nmrd =8)
/Ln i nmrd =7...
View Full Document