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:
Please see the attached file for the complete answer.
Explanation:
Answer:
hello your question is incomplete attached below is the complete question
A) overall mean = 5.535, standard deviation ≈ 0.3239
B ) upper limit = 5.85, lower limit = 5.0
C) Not all the samples meet the contract specifications
D) fluctuation ( unstable Asphalt content )
Explanation:
B) The daily average asphalt content has to obtained in order to determine the upper and lower control limits using an average asphalt content of 5.5% +/- 0.5% everyday
The upper limit : 14 may = ( 5.8 + 5.1 ) / 2 = 5.85
The lower limit : 16 may = ( 5.2 + 4.8 ) / 2 = 5.0
attached below is the required plot
C ) Not all the samples meet the contract specifications and the samples that do not meet up are samples from :
15 may and 16 may . this is because their Asphalt contents are 6.2 and 4.8 respectively and sample number 18 and 20
D ) what can be observed is that the ASPHALT content fluctuates between the dates while the contract specification is fixed