Question: CS 110 Assignment 5I Instructions: Complete each problem by creating a Java program that performs the specified actions. For any questions that require a user
CS 110 Assignment 5I Instructions: Complete each problem by creating a Java program that performs the specified actions. For any questions that require a user input, be sure to check the data type 1. Create a program RandomQuarter.java that generates a random value between 1 and 100 using Math.random), then returns a different string depending on if the value is between 1-25, 26-50, 51-75, or 76-100 using if statements. HINT: You can generate a random number between 1 and 100 using by setting an integer using (int)((Math.random() 99)+ 1). 2. Create a program Divisible,java that includes a method IsDivisible(int dividend, int divisor) that returns a boolean value- true if the dividend is divisible by the divisor, and false if it is not. In the main method, ask the user for two integers, then return the result of the method IsDivisible. What to turn in: Page 1 of 1 202 words English (United States) Focus
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
