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]
4 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:
algol134 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
Give the value of the zero flag, the carry flag, the signflag, and the overflow flag after each of the following instructions if
Vanyuwa [196]
The correct answer is A for this question
6 0
2 years ago
PLEASE HELP!!!
anygoal [31]

Answer:

you need to properly indent it

Explanation:

align your codes

5 0
3 years ago
A web page that allows interaction from the user​
kirill115 [55]

Answer:

Its A Dynamic Web Page

Explanation:

5 0
3 years ago
Regardless of if you use social media or not, would you rather be conservative rather than outgoing on social media? Why or Why
Alla [95]

Answer: I imagine conservative is the correct answer.

Explanation: However it's not the answer I agree with. As long as you stay anonymous online, there's no punishment to being outgoing.

4 0
3 years ago
Write a program that asks length and breadth of a rectangle a calculate its area qbasic​
Natasha_Volkova [10]

Answer:

INPUT "Enter the length";l

INPUT "Enter the width";w

PRINT "The area is ";l*w

5 0
3 years ago
Other questions:
  • On Sarah’s first day at work she is provided with a range of information technology that she can use to write , edit or create d
    5·2 answers
  • In these ones all your finding is the mean(average).
    14·1 answer
  • ASAP
    12·2 answers
  • The ____ is the point in the past to which the recovered applications and data at the alternate infrastructure will be restored.
    15·1 answer
  • Describe how you would switch between the virtual consoles provided by Fedora.
    10·1 answer
  • HELP!!!<br> THIS HAPPENS EVERY TIME
    6·2 answers
  • 2. Which of the following statements describes a need or problem that can be solved using the technology design process.
    14·1 answer
  • Do a comment if u hate me.or think im d.U.m b. add a answer if u dont care. thank all the asnwers or report for saying i dont ex
    9·1 answer
  • Moving your Sprite from right to left is considered the X coordinate?
    5·1 answer
  • After reading through the code, what will happen when you click run?​
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!