Answer:
PART ONE
- import java.util.Scanner;
- public class CountToLimit {
- public static void main(String[] args) {
- Scanner scnr = new Scanner(System.in);
- int countLimit = 0;
- int printVal = 0;
- // Get user input
- System.out.println("Enter Count Limit");
- countLimit = scnr.nextInt();
- do {
- System.out.print(printVal + " ");
- printVal = printVal + 1;
- } while ( printVal<=countLimit );
- System.out.println("");
- return;
- }
- }
PART TWO
- import java.util.Scanner;
- public class NumberPrompt {
- public static void main (String [] args) {
- Scanner scnr = new Scanner(System.in);
- System.out.print("Your number < 100: ");
- int userInput = scnr.nextInt();
- do {
- System.out.print("Your number < 100: ");
- userInput = scnr.nextInt();
- }while (userInput>=100);
- System.out.println("Your number < 100 is: " + userInput);
- return;
- }
- }
Explanation:
In Part one of the question, The condition for the do...while loop had to be stated this is stated on line 14
In part 2, A do....while loop that will repeatedly prompt user to enter a number less than 100 is created. from line 7 to line 10
Answer:
By having very good luck and winning it in a giveaway!!!
Answer:
<em>The specific type of software useful in this situation would be a ship manager software. </em>
Explanation:
<em>It is a stand alone, user installable, windows-based software package designed to allow the quickly ship, track, and report the daily activities.</em>
<em>In addition to managing shipment information, the software keeps the details of the operation, so that the user can easily retrieve necessary information about his shipments.</em>
First you must pick what application you want to do your document on and chose how you want to map out your document.
Answer:
public static int maxMagnitude(int a, int b){
int max;
if (a>b){
max = a;
}
else{
max = b;
}
return max;
}
The complete program calling the method is given in the explanation section
Explanation:
import java.util.Scanner;
public class ANot {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
System.out.println("Please Enter two numbers");
int num1= in.nextInt();
int num2 = in.nextInt();
System.out.println("The largest magnitude number is: "+maxMagnitude(num1,num2));
}
public static int maxMagnitude(int a, int b){
int max;
if (a>b){
max = a;
}
else{
max = b;
}
return max;
}
}
The maxMagnitude() method uses if/else statement to compare two ints and return the larger one