Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

2. Use thedocumentation to complete the application program that tests eachof th

ID: 3608751 • Letter: 2

Question

2.        Use thedocumentation to complete the application program that tests eachof the methods by calling them.

import java.util.Scanner;

public class ApplicationProgram

{

public static void main(String[ ] args )

{

           intstart;           

           Scanner keyboard = newScanner(System.in);     

//declare and instantiate an object of type Counter

_____________________________________________

//declare and instantiate another Counter object,

// initialize the variable to –1 using theparameter

______________________________________________

//display the data value of the first object using the writemethod

______________________________________________

//display the data value of the second object using thegetNum method

______________________________________________

System.out.println( “Enter the starting point for yourcounter”);

start = keyboard.nextInt;

//change the first object’s data using start and thesetNum method

_______________________________________________

//increment the first object’s data value

_______________________________________________

//decrement the second object’s data value

_______________________________________________

//display the contents of the first object’s datausing the getNum method.

________________________________________________

//display the contents of the second object’s datausing the write method

________________________________________________

           }

}

Explanation / Answer

import java.util.Scanner;

public class ApplicationProgram

{

public static void main(String[ ] args )

{

           intstart;           

           Scanner keyboard = newScanner(System.in);     

____________________________________________

______________________________________________

______________________________________________

______________________________________________

System.out.println( “Enter the starting point for yourcounter”);

start = keyboard.nextInt;

______________________________________________

_______________________________________________

_______________________________________________

________________________________________________

________________________________________________

           }

}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote