Course Solutions Uncategorized (Solved) : Please Make Uml Diagram Pseudocode Flowchart Import Javautilinputmismatchexception Import Q32942381 . . . .

(Solved) : Please Make Uml Diagram Pseudocode Flowchart Import Javautilinputmismatchexception Import Q32942381 . . . .

 

please make uml diagram , pseudocode and flowchart

import java.util.InputMismatchException;
import java.util.Scanner;

public class InputMismatch {

public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int firstNum, secondNum=0;
while(true){
try{
System.out.println(“Enter·an·integer: “);
firstNum = scan.nextInt();
break;
}
catch(InputMismatchException e){
System.out.println(“Please·enter·an·integer”);
scan.next();
}
}
while(true){
try{
System.out.println(“Enter·an·integer: “);
secondNum = scan.nextInt();
break;

}
catch(InputMismatchException e){
System.out.println(“Please·enter·an·integer”);
scan.next();
}

}
int sum = firstNum + secondNum;
System.out.println(“The sum of two numbers is : “+sum);

}

}

Expert Answer


An answer will be send to you shortly. . . . .

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post

(Solved) : Option Best Describes Purpose Following Lines Python Code Set Possible Initial Integer Val Q35631862 . . . .(Solved) : Option Best Describes Purpose Following Lines Python Code Set Possible Initial Integer Val Q35631862 . . . .

<p><img alt="Which option below best describes the purpose of the following lines of Python code, for any set of possible initial integer" src="https://media.cheggcdn.com/media%2F742%2F742985c3-5991-4ddf-b02d-99b88d2c3dc4%2FphpR66Lxh.png" style="height:353px;width:1024px;" aria-describedby="d3f"/><img alt="This is a MULTIPLE ANSWER