1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Reika [66]
3 years ago
13

You're a ticket agent for a commercial airline and responsible for checking the identification for each passenger before issuing

their boarding pass. Due to federal regulations, there is a total of three different forms of ID that can potentially be used. You must determine whether the passenger has the sufficient identification to board the plane or not. Facts: ⢠A passport is enough for a boarding pass ⢠Without a passport, passengers must have two other forms of ID: driver's license birth certificate ⢠If the above two conditions are not met, then they are denied. Input Your solution must take in three boolean inputs. The first input represents whether they have a passport or not. The second input represents whether they have a driver's license or not. The third input represents whether they have a birth certificate or not Output The output should display as a boolean result whether they can board the plane or not. Sample Input Sample output true false false true false true true true false false false false
Computers and Technology
1 answer:
algol133 years ago
3 0

Answer:

Follows are the code to this question:

import java.util.*;//import package for user input  

public class Main //defining class  

{

  public static void main(String[] as)//main method

  {

      boolean x,y,z;//defining boolean variable

      Scanner ox= new Scanner(System.in);//create Scanner class object for user input

      System.out.println("input value: "); //print message  

      x=ox.nextBoolean();//input value

      y=ox.nextBoolean();//input value

      z=ox.nextBoolean();//input value

      System.out.println("Output: ");//print message

      System.out.println(x || (y &&z));//use print method to check value and print its value  

  }

}

Output:

1)

input value:  

true

false

false

Output:  

true

2)

input value:  

false

true

true

Output:  

true

3)

input value:  

false

false

false

Output:  

false

Explanation:

In the given code, inside the class three boolean variable "x,y, and z" is declared, that uses the scanner class for input the value from the user end, and in the next print, the method is declared, that uses " OR and AND" gate for calculating the input value and print its value.

In the AND gate, when both conditions are true. it will print the value true, and in the OR gate, when one of the conditions is true, it will print the value true.  

You might be interested in
An important goal of biosecurity training is to: Prevent laboratory accidents that could expose personnel to hazardous agents. P
Anestetic [448]

Answer:

Educate laboratory directors on their role in providing a safe working environment.

Explanation:

A lab is an abbreviation for laboratory and it can be defined as a building that is equipped with scientific equipments and apparatus, which are used for performing scientific experiments, manufacturing of chemicals and drugs, research, testing and analysis of hypothesis in order to establish a theory.

Generally, laboratory scientists, technicians, students and anyone going into a laboratory are expected to obey the rules and regulations guiding the laboratory.

Hence, an important goal of biosecurity training is to educate laboratory directors on their role in providing a safe working environment.

6 0
3 years ago
Recall that through either photographic or computer technology, researchers can make a composite (or "averaged") face out of any
kow [346]

Answer:

People prefer composite faces.

Explanation:

If we take some face's picture, and we make it digital, we could make a composite or averaged face, and when we compare composite faces with originals pictures, people prefer the composite faces because there was symmetry in those faces.

For example:

There was a research where a digitalized student faces men and women, researchers make a composite face for every original, people prefer composite face against the original face.

4 0
3 years ago
Name two ways you can identify the pid number of the login shell.
Katyanochek1 [597]
Two approaches are:
Echo $$
Ps
3 0
3 years ago
What do you think of my profile picture
Gnom [1K]

ayo it's pretty sweet lma.o.

8 0
3 years ago
Read 2 more answers
I don't understand how to write code for this in Java using nested for loops only. The official question is: write a program tha
Bingel [31]

Answer:

public class Triangle

{

public static void main( String[] args )

{

show( 5 );

}

public static void show( int n )

{

int i,j,k;

for (i = 0; i < n - 1; i++ )

{

for (j = 0; j < i; j++ )

{

System.out.print( " " );

}

for (k = n - i; k > 0; k-- )

{

System.out.print( "* " );

}

System.out.println();

}

for (i = 0; i < n; i++ )

{

for (j = n - i; j > 1; j-- )

{

System.out.print( " " );

}

for (k = 0; k < i + 1; k++ )

{

System.out.print( "* " );

}

System.out.println();

}

4 0
3 years ago
Other questions:
  • The analog signals that carry analog or digital data comprise composites built from combinations of simple sine waves.
    12·1 answer
  • What is this line of code doing? scanf("%f", &amp;height);
    6·1 answer
  • Frank develops a questionnaire for his study on Internet dating. One of his questions asks, "How do you feel about Internet dati
    14·2 answers
  • Write c++ program bmi.cpp that asks the user bmi.cpp the weight (in kilograms) and height (in meters).
    12·1 answer
  • A network systems administrator would most likely help with
    13·2 answers
  • How can a user access the Mailbox Cleanup tools?
    11·2 answers
  • Picking up sound over a great distance while making it seem to come from close up.
    11·1 answer
  • If you had tickets for the concert and saw these alerts, what should you do?
    12·1 answer
  • True or False <br> Hebrew Bible and the Koran were first written in English.
    15·1 answer
  • What should a pie chart represent?
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!