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
Fill in the table below of the Interactive Word Wall. You are provided with the
kakasveta [241]

Answer:

that is so long i just want points

Explanation:

7 0
2 years ago
Which magazine can help public determine best technology to buy
Dennis_Churaev [7]
Consumer report would help determine the best technology to buy.
4 0
3 years ago
Where is NumPy used?
Svetradugi [14.3K]

Explanation:

The ndarray (NumPy Array) is a multidimensional array used to store values of same datatype. These arrays are indexed just like Sequences, starts with zero.

7 0
3 years ago
Read 2 more answers
Keith has to carry out a photo shoot to capture images of the ocean during the monsoons. What is a recommended practice when sho
Semmy [17]

Answer:

Answer is A: place absorbent chemical packets in the camera cover

Explanation:

Keith is required to carry adequate gear while going for a shoot. And in this case, he should carry anything that will protect his camera from the ocean and rainwater. By anything, I mean anything that Keith will use to stay dry. Using an air conditioner would be the worst idea. An air conditioner might blow the air towards your camera. Placing the camera in its case will ensure that it is dry and Keith will keep on shooting. Placing absorbent chemical packets in the camera cover will ensure that any water droplets that might fall on the cover of the camera will be absorbed. The point here is to keep dry.

6 0
3 years ago
When creating a storyboard, in which section do you mention how you move from one shot to the next?
tekilochka [14]

Answer: C

Explanation:

7 0
2 years ago
Other questions:
  • What is the differnces between dark and middle ages of computer?​
    9·1 answer
  • Minimalism is a major movement in postmodern art. O True O False
    14·1 answer
  • What is a directory server?
    5·1 answer
  • A struggle between opposing forces or characters is
    14·1 answer
  • A hacker scanning a web server is likely to be identified by the target's web a. Because of the FBI's Carnivore scanning program
    12·1 answer
  • What is lasso tool write the name of any modelling and animation software<br>​
    8·1 answer
  • How do you customize calendar view​
    9·2 answers
  • Even though jdoe and jrock have the same password (i.e., hacker), their password hashes in the /etc/shadow file are different. W
    15·1 answer
  • What does playstation network is currently undergoing maintenance?.
    15·1 answer
  • ABC company have lots of computer running window 7. But they are not thinking to upgrade a higher version of window. One of the
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!