Fill in the missing code for the Range class below.  Upload your Range.java.   public class Range {         private int minimum, maximum;                 // Set this.minimum and this.maximum to parameters         // minimum and maximum, respectively, assuming minimum <= maximum.         // Otherwise set both this.minimum and this.maximum to 0.         public Range(int minimum, int maximum) {           }                 // Call the two-parameter constructor with parameters 0 and maximum.         public Range(int maximum) {           }                         // Call the one-parameter constructor with parameter 100.         public Range() {           }                         // getter for maximum         public int getMaximum() {           }                 // getter for minimum         public int getMinimum() {           }                 // return the number of values in this range.         public int getSize() {         }                 // Set this.minimum to minimum, assuming minimum <= this.maximum.         // Otherwise set this.mimimum to this.maximum.         public void setMinimum(int minimum) {           }                         // Set this.maximum to maximum, assuming maximum >= this.minimum.         // Otherwise set this.maximum to this.minimum.         public void setMaximum(int maximum) {           }                 // return true iff n is at least minimum and n is at most maximum         public boolean inRange(int n) {         }                 // Return true iff this.minimum is at least r.minimum and         // this. maximum is at most r.maximum.         public boolean isSubrangeOf(Range r) {           }                 // Return a new Range object representing         // the intersection of this and r, or return null if that intersection is empty.         public Range intersection(Range r) {                        }                         // Implement the equals methods, following the ClickCounter example from lecture         public boolean equals(Object o) {                    }                 // Return a string representation of this, e.g. if this.minimum is 5         // and this.maximum is 7, you would return the String "(5,7)".         public String toString() {                       } }

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

/ Fill in the missing code for the Range class below.  Upload your Range.java.

 

public class Range {

        private int minimum, maximum;

       

        // Set this.minimum and this.maximum to parameters

        // minimum and maximum, respectively, assuming minimum <= maximum.

        // Otherwise set both this.minimum and this.maximum to 0.

        public Range(int minimum, int maximum) {

 

        }

       

        // Call the two-parameter constructor with parameters 0 and maximum.

        public Range(int maximum) {

 

        }

       

       

        // Call the one-parameter constructor with parameter 100.

        public Range() {

 

        }

       

       

        // getter for maximum

        public int getMaximum() {

 

        }

       

        // getter for minimum

        public int getMinimum() {

 

        }

       

        // return the number of values in this range.

        public int getSize() {

        }

       

        // Set this.minimum to minimum, assuming minimum <= this.maximum.

        // Otherwise set this.mimimum to this.maximum.

        public void setMinimum(int minimum) {

 

        }

               

        // Set this.maximum to maximum, assuming maximum >= this.minimum.

        // Otherwise set this.maximum to this.minimum.

        public void setMaximum(int maximum) {

 

        }

       

        // return true iff n is at least minimum and n is at most maximum

        public boolean inRange(int n) {

        }

       

        // Return true iff this.minimum is at least r.minimum and

        // this. maximum is at most r.maximum.

        public boolean isSubrangeOf(Range r) {

 

        }

       

        // Return a new Range object representing

        // the intersection of this and r, or return null if that intersection is empty.

        public Range intersection(Range r) {

              

        }

       

       

        // Implement the equals methods, following the ClickCounter example from lecture

        public boolean equals(Object o) {

          

        }

       

        // Return a string representation of this, e.g. if this.minimum is 5

        // and this.maximum is 7, you would return the String "(5,7)".

        public String toString() {

             

        }

}

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Reference Types in Function
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education