/*********************** * * Service - This class contains methods, or services which will be called * and tested by code in the main method in Driver.java. * * Author: Shawn Brenneman and * Date: 2018-Sept * ***********************/ public class Service { /******** * * mult - takes two ints and returns an in that is the product of the given ints. * * mult(5,3) --> 15 * mult(-3,2) --> -6 * mult(0,4) --> 0 * mult(0,0) --> 0 * ********/ public int mult(int num1, int num2) { return num1*num2; } /******** * * mult - takes an int and a String and returns a String which is the given * String repeated the given int number of times. * * mult("Hey",3) --> "HeyHeyHey" * mult("RU",1) --> "RU" * mult("",5) --> "" * mult("anything",0) --> "" * ********/ // This is a stub method, meaning it compiles and runs, but does not yet // work correctly. It just returns the empty String, so the driver runs // but this method doesn't yet return the right answer. The body of the // method must be written (by you). public String mult(String word, int times) { return ""; } /******** * * mult - takes a String and an int and returns a String which is the given * String repeated the given int number of times. * * mult(3,"Hey") --> "HeyHeyHey" * mult(1,"RU") --> "RU" * mult(5,"") --> "" * mult(0,"anything") --> "" * ********/ /******** * * mult - takes two ints and returns a double that is the product of the given ints. * * mult(5,3) --> 15.0 * mult(-3,2) --> -6.0 * mult(0,4) --> 0.0 * mult(0,0) --> 0.0 * ********/ /******** * * containsLower - takes a String and returns true if the given String * contains a lowercase letter. * * containsLower("Yippee!") --> true * containsLower("WOW!") --> false * containsLower("$4.56") --> false * containsLower("") --> false * ********/ }