```java
```java
```java
```java
```java
```java
package question3;/**
*
* @author wang
* @version 1.0
*
*/publicclassCounter{privateint count;privateint max;//question 1 create a constructor/**
* Description: this is a constructor with no parameter and it assign 0->count
* and 10->max
*/publicCounter(){this.count =0;this.max =10;}//question 2 create getter and setter for count and max/**
* getter of count
*
* @return int
*/publicintgetCount(){return count;}/**
* getter of max
*
* @return int
*/publicintgetMax(){return max;}/**
* setter of cout
*
* @param n
*/publicvoidsetCount(int n){this.count = n;}/**
* setter of max
*
* @param n
*/publicvoidsetMax(int n){this.max = n;}//question 3 create main method to test the things discussed abovepublicstaticvoidmain(String[] args){
Counter counter =newCounter();
System.out.println(counter.getCount());
System.out.println(counter.getMax());
counter.setCount(5);
counter.setMax(15);
System.out.println(counter.getCount());
System.out.println(counter.getMax());
counter.increase();
System.out.println(counter.getCount());
System.out.println(counter.getMax());
counter.decrease();
System.out.println(counter.getCount());
System.out.println(counter.getMax());
counter.doubler();
System.out.println(counter.getCount());
System.out.println(counter.getMax());
counter.reset();
System.out.println(counter.getCount());
System.out.println(counter.getMax());//testing of method overloading~
System.out.println("testing of method overloading~");
counter.increase(50);
counter.decrease(500);
System.out.println(counter.getCount());
System.out.println(counter.getMax());
System.out.println(counter.toString());}//question4 add four methods to counter class/**
* description: increase the count value by 2
*/publicvoidincrease(){
count = count +2;if(count ==this.max){reset();}}/**
* description: decrease the count value by 1
*/publicvoiddecrease(){if(count >=1){
count--;}else{
System.out.println("error");}}/**
* description: double the count
*/publicvoiddoubler(){
count = count *2;}/**
* description: make the count to 0
*/publicvoidreset(){
count =0;
System.out.println("Counter Reset");}//question5 toString method--display the current value of count and maxpublic String toString(){return("count = "+ count +" max = "+ max);}//question7 method overloading /**
*
* @param n
*/publicvoidincrease(int n){
count = count + n;}/**
*
* @param n
*/publicvoiddecrease(int n){
count = count - n;}}
public class Counter{ private int count; private int max;//question 1 create a constructor public Counter() { this.count = 0; this.max = 10; }//question 2 create getter and setter for count and max public int getCount() { return count; .