Answer:
see explaination
Explanation:
import java.util.InputMismatchException;
import java.util.Scanner;
public class calculate {
static float a=0,b=0;
double cal()
{
if(a==0||b==0)
{
System.out.println("no values found in a or b");
start();
}
double x=(a*a)+(b*b);
double h=Math.sqrt(x);
a=0;
b=0;
return h;
}
float enter()
{
float val=0;
try
{
System.out.println("Enter side");
Scanner sc1 = new Scanner(System.in);
val = sc1.nextFloat();
return val;
}
catch(InputMismatchException e)
{
System.out.println("Enter correct value");
}
return val;
}
void start()
{
calculate c=new calculate();
while(true)
{
System.out.println("Enter Command");
Scanner sc = new Scanner(System.in);
String input = sc.nextLine();
switch(input)
{
case "A":
a=c.enter();
break;
case "B":
b=c.enter();
break;
case "C":
double res=c.cal();
System.out.println("Hypotenuse is : "+res);
break;
case "Q":
System.exit(0);
default:System.out.println("wrong command");
}
}
}
public static void main(String[] args) {
calculate c=new calculate();
c.start();
}
}
Answer:
<u>construction workers</u>
Explanation:
A construction worker is usually someone with the technical skills and abilities needed to manually construct physical infrastructures.
Since a walkway is an infrastructure, hiring skilled construction workers should perform the project of building the series of walkways within the large garden apartment.
Answer:
the police officer cruise each streets precisely once and he enters and exit with the same gate.
Explanation:
NB: kindly check below for the attached picture.
The term ''Euler circuit'' can simply be defined as the graph that shows the edge of K once in a finite way by starting and putting a stop to it at the same vertex.
The term "Hamiltonian Circuit" is also known as the Hamiltonian cycle which is all about a one time visit to the vertex.
Here in this question, the door is the vertex and the road is the edge.
The information needed to detemine a Euler circuit and a Hamilton circuit is;
"the police officer cruise each streets precisely once and he enters and exit with the same gate."
Check attachment for each type of circuit and the differences.