Question: USE JAVE PLEASE! DO NOT COPY FROM OTHER WEBSITE! Create a class called HW1Problem2. Create the following (public) methods in the class: 1. Write a
USE JAVE PLEASE! DO NOT COPY FROM OTHER WEBSITE!
Create a class called HW1Problem2.
Create the following (public) methods in the class:
1. Write a method called multiple that takes two integers as its arguments and returns true if the first integer is divisible evenly by the second one (i.e., there is no remainder after division); otherwise, the method should return false.
2. Write a method called reminder that takes an integer as an argument and returns the remainder of that value divided by 7.
3. Write method distance to calculate the distance between two points (x1, y1) and (x2, y2). All numbers and return values should be of type double.
4. Write a method that uses random numbers to simulate 10 flips of a coin. Incorporate all of the above methods in a driver class Problem2Driver. Allow user to provide inputs for the arguments of the methods and also display results from the methods.
Create the UML diagrams of all the classes in all of your projects. The UML diagrams should follow the exact formatting shown in class slides.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
