MCPcopy Create free account
hub / github.com/ShivaBhattacharjee/KeyZen / calculateWpm

Method calculateWpm

data/java/04_exceptions.java:8–13  ·  view source on GitHub ↗
(int words, int seconds)

Source from the content-addressed store, hash-verified

6
7class ExceptionsDemo {
8 static double calculateWpm(int words, int seconds) throws InvalidDurationException {
9 if (seconds <= 0) {
10 throw new InvalidDurationException("seconds must be greater than 0");
11 }
12 return (words * 60.0) / seconds;
13 }
14
15 public static void main(String[] args) {
16 try {

Callers 1

mainMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected