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
hjlf
3 years ago
10

You have been hired by Beta Airlines to help them with their flight prices. You are to create a 10 x 10 2D array (also called a

matrix) that holds the prices of their domestic flights between Atlanta and Hawaii. Your program should fill the matrix with random values between $99 and $1999 and allow a user to enter a price that matches their preferred cost for the flight. You should then process the 2D array and return whether or not a price in the array matches their requested price (exactly matches).
Computers and Technology
1 answer:
AveGali [126]3 years ago
4 0

Answer:

See explaination

Explanation:

//Array to store prices

INT PRICE[10][10]

//Loop through 2d array

FOR I FROM 0 TO 10

FOR J FROM 0 TO 10

//Populate a random int

PRICE[I][J] = RANDOM_INT(99,1999)

PRINT(PRICE[I][J]+" ")

PRINT()

//Prompt user for desired price

COST = READ_INPUT('Please enter your desired flight price: ')

//Variable to store if a match is found

MATCH = FALSE

//Loop through all ints in price

FOR I FROM 0 TO 10

FOR J FROM 0 TO 10

//Compare price with Cost

IF PRICE[I][J]==COST

MATCH = TRUE

BREAK

//Check if match is true

IF MATCH = TRUE

PRINT('A flight was found for that price, have a safe trip!')

ELSE

PRINT('No flight was found for that price, please try a new price.')

You might be interested in
Application software
Crazy boy [7]

Answer:

it would be B hope this helps

Explanation:

8 0
3 years ago
Consider the recursive method whose definition appear below. Why? public static String mysteryString (String s){ if(s.length()==
Marizza181 [45]

Answer:

retupmoc

Explanation:

1.) Anwser will be retupmoc

because

public static String mysteryString(String s){

if(s.length() == 1){

return s;

}

else{

return s.substring(s.length() -1) + mysteryString(s.substring(0, s.length()-1));

}

}

In this program input is "computer" . So the function mysteryString(String s) it does

return s.substring(s.length() -1) + mysteryString(s.substring(0, s.length()-1));

so when it enters the first time ??s.substring(s.length() -1) and it will be give you 'r' then it calls the function recursively by reducing the string length by one . So next time it calls the mysteryString function with string "compute" and next time it calls return s.substring(s.length()-1)? + mysteryString(s.substring(0,s.length-1)) so this time it gives "e" and calls the function again recursively . It keeps on doing till it matched the base case.

so it returns "retupmoc".

6 0
3 years ago
You suspect that the Web Server, which is located on your network and hosts multiple Internet facing Websites. The Web Server ru
makkiz [27]

Answer:

Block all incoming ICMP requests.

Explanation:

Since  the  web  server  is  hosts  a  lot  of  internet  facing  websites .On investigation it was find out that the web server  is getting  flooded  with  a  lot of  ping  requests  hence  it  becomes unavailable  occasionally. So  to  tackle  this  problem  we  should  block  all  of  the  incoming  ICMP  requests.

5 0
3 years ago
Distinguish among packet filtering firewalls, stateful inspection firewalls, and proxy firewalls. A thorough answer will require
4vir4ik [10]

Answer:

packet filtering

Explanation:

We can use a packet filtering firewall, for something like this, reasons because when visiting a site these types of firewalls should block all incoming traffic and analyze each packet, before sending it to the user. So if the packet is coming from a malicious origin, we can then drop that packet and be on our day ;D

7 0
3 years ago
The goal of quality assurance is toprovide management with the data needed to determine whichsoftware engineers are producingthe
Ymorist [56]
The answer to your question is true
8 0
3 years ago
Other questions:
  • All computers can support multiple internal hard drives. <br><br> a. True <br><br> b. False
    13·1 answer
  • What are computer virus ? Explain in detail.In your answer include symptoms and prevention (3each)
    10·1 answer
  • You want to create Web pages that can easily adapt to and serve multimedia content to smartphones, tablets, gaming devices and s
    13·1 answer
  • A network administrator notices that some newly installed Ethernet cabling is carrying corrupt and distorted data signals. The n
    10·1 answer
  • During Iteration planning, the PO introduces multiple new stories to the team. After a lot of discussion, the team decides to in
    8·1 answer
  • The memory unit of a computer has 2M Words of 32 bits (or 4 bytes) each. The computer has an instruction format with 4 fields: a
    14·1 answer
  • Which of the following could be a constructor for the public class MyClass? a. public MyClass() b. public void MyClass() c. publ
    7·1 answer
  • Write a program with 2 separate functions which compute the GCD (Greatest Common Denominator) and the LCM (Lowest Common Multipl
    9·1 answer
  • Question is on the picture thank you
    10·1 answer
  • How to make a message appear in more than one slack channel
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!