atLeast1 0 Expected result false 150 50.5 false false 90 50.5 false true 150 50.5 true true 90 50.5 false true 180 120.0 true true 200 120.0 false…
import java.util.Scanner; public class GateKeeper {
public static boolean canBoard(boolean param1, int p2, double i_forget) { final int constant = 120; final int maX = 196; final double MASS = 200; boolean out; out = false; if (param1 && i_forget < MASS ) { if (p2 <= constant || p2 >= maX) { out = true; } } return out; }
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String again;
boolean atLeast10; int height; double weight;
System.out.println(“ROLLER COASTER GATE KEEPER”);
do { System.out.print(“Are you at least 10 years old (true/false)? “); atLeast10 = sc.nextBoolean();
System.out.print(“Height (whole cm): “); height = sc.nextInt();
System.out.print(“Weight (to nearest half kg): “); weight = sc.nextDouble();
if (canBoard(atLeast10, height, weight)) { System.out.println(“Welcome aboard”); } else { System.out.println(“Sorry you may not board”); }
System.out.print(“Process another person (y/n)? “); again = sc.next(); } while(again.equals(“y”));
} }
restructure
atLeast1 0 Expected resultfalse 150 50.5 false false 90 50.5 false true 150 50.5 true true 90 50.5 false true 180 120.0 true true 200 120.0 false true 180 201 .5 false

How it Works

1
It only takes a couple of minutes to fill in your details, select the type of paper you need (essay, term paper, etc.), give us all necessary information regarding your assignment.


2
Once we receive your request, one of our customer support representatives will contact you within 24 hours with more specific information about how much it'll cost for this particular project.


3
After receiving payment confirmation via PayPal or credit card – we begin working on your detailed outline, which is based on the requirements given by yourself upon ordering.


4
Once approved, your order is complete and will be emailed directly to the email address provided before payment was made!