subject

The Extremes class represents the range of Integer values. Fill in the extremes methods. In the constructor, set min and max to the minimum and maximum value of Integer. Use Integer. MIN_VALUE and Integer .MAX_VALUE. Also fill in the mindiff and maxDiff methods to return the difference between the users guess and the actual max/min values of Integer Main In main, use the comments as a guide to ask the user to guess the maximum and minimum values. Compute the difference between the guess and the values, then print it out. Be aware that if you choose a number too big or too small, it will cause an error since the number cannot be stored. The results in main should look something like this: Guess the maximum Integer value: 543214 You were off by 2146940433 Guess the minimum Integer value: 2145678321 You were off by 1805327 e Sul import java. util. Scanner; import java. lang. *; public class ExtremeMain { public static void main(String[] args) { // Create a Scanner object // Create an Extremes object I Ask the user to guess the maximum value of an Integer 1/ Compute and display the difference 11 between the max and the guess ៩ ទី ៨ ៩ ថ ន យ ន ផ 5 6 GO TO US, 1 Ask the user to guess the minimum value of an Integer Il Compute and display the difference 77 between the min and the guess } Nm 4 1 public class Extremes 2- { 3 Integer min; Integer max; 5 V/ Constructor public Extremes () 8 { 9 // Set min and max values 10 3 NO N 12 B 14 15 16 // Returns the difference 1 max number public Integer maxDiff(Integer number) { } 18 19 20 21 22 23 24 25 26 27 // Returns the difference 1 min number public Integer minDiff(Integer number) { I } Y 28 // Returns a String representation 17 in the form 1/ [min, max] public String toString() { return "[" + min + + max + "]"; } 19 29 30- 31 32 33 34 8

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 10:00
How do i delete my account on this because i didn't read this agreements and also i put age at xd
Answers: 1
question
Computers and Technology, 23.06.2019 23:00
Computer programming is one type of what career
Answers: 1
question
Computers and Technology, 24.06.2019 14:30
Ahousehold consists of a married couple and their twin five-year old daughters. the couples children had no income and lived with their parents all of last year. how many exemptions can the couple claim on last years tax return or they file with the “ married filing jointly “ status? a. 4 b. 5 c. 3 d. 2
Answers: 1
question
Computers and Technology, 24.06.2019 18:30
Jacking is a crime that takes place when a hacker misdirects url to a different site. the link itself looks safe, but the user is directed to an unsafe page
Answers: 1
You know the right answer?
The Extremes class represents the range of Integer values. Fill in the extremes methods. In the cons...
Questions
question
Mathematics, 24.06.2021 07:10
question
Mathematics, 24.06.2021 07:10
question
Mathematics, 24.06.2021 07:10
question
World Languages, 24.06.2021 07:10
Questions on the website: 13722360