answer.
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
inn [45]
2 years ago
10

Create an if function in which the logical_test argument determines if there are 8 or more seats.

Computers and Technology
1 answer:
Nitella [24]2 years ago
5 0

Answer:

   public static boolean ifTest(int numSeats){

       if(numSeats>=8){

           return true;

       }

       else

           return false;

   }

Explanation:

Using Java programming language, A method has been created with one parameter numSeats With a boolean return type. In the method's definition, an if statement is used to check if the number of seats is greater or equal to 8, if this is so, it returns true, else it returns false

You might be interested in
Write a loop that prints each country's population in country_pop. Sample output for the given program.
Illusion [34]

Answer:

Correct code for the above question which is written after the defined list to display the output.

for x,y in country_pop.items(): #for  loop to prints the list items.

   print(str(x)+" has "+str(y)+" people") #print function to print the value.

Output:

  • The above code is in python language which display the output as the above question demands.

Explanation:

  • The above question code is written in python language to display the result, but this code is not correct.
  • The above code needs a 'for' loop, which will render the list item one by one.
  • The above-list defined in the form of key-value pair, So there is a need for the ''item" function which is the part of the python dictionary to display the list items.
  • There also needs to define the two variables in the for loop, one is for key and the other is for value.
7 0
2 years ago
A dietician wants you to write a program that will calculate the number of calories a person can lose by walking at a slow pace
gregori [183]

Answer:

The pseudocode is as follows

1. Input Steps

2. Input Day

3. Miles = Steps/2000

4. Calories = 65 * Miles

5. Print Calories

6. Stop

Explanation:

This line gets the number of steps for the day

1. Input Steps

This line gets the current day

2. Input Day

The line calculates number of miles

3. Miles = Steps/2000

This line calculates the calories lost

4. Calories = 65 * Miles

This line prints the calories lost

5. Print Calories

The pseudocode ends here

6. Stop

6 0
2 years ago
Which component of a computer is its input device and what role does it play in a document?
kogti [31]
The keyboard is used to input information. (Entering data)
5 0
2 years ago
Read 2 more answers
Select all the activities Samil could so through his banking app.
lisabon 2012 [21]

Answer:

Make a deposit

Talk to a representative

Transfer money

Check account balances

Explanation:

3 0
2 years ago
Read 2 more answers
Your assignment is to write an assembly language program which read a string and print it in uppercase. This program asks the us
-BARSIC- [3]

Answer:

Check the explanation

Explanation:

.data

prompt: .asciiz "Please enter your string :"

result_str: .asciiz "\nYour captalized string :"

error_prompt: .asciiz "\nInvalid Entry !"

buffer: .space 20

.text

.globl __start

__start:

ASKING_STR:

la $a0,prompt

li $v0,4

syscall

li $v0,8 #take in input

la $a0, buffer #load byte space into address

li $a1, 20 # allot the byte space for string

move $t0,$a0 #save string to t0

syscall

li $v0, 4

li $t0, 0

loop:

lb $t1, buffer($t0)

beq $t1, 0, exit

slti $t2,$t1,91

bne $t2,$0,UPPER_CHECK

slti $t2,$t1,123

bne $t2,$0,LOWER_TO_UPPER

UPPER_CHECK:

slti $t2,$t1,65

bne $t2,$0,INVALID_ENTRY

slti $t2,$t1,90

bne $t2,$0,NEXT

j INVALID_ENTRY

LOWER_TO_UPPER:

sub $t1, $t1, 32

sb $t1, buffer($t0)

NEXT:

addi $t0, $t0, 1

j loop

INVALID_ENTRY:

li $v0, 4

la $a0, error_prompt

syscall

j ASKING_STR

exit:

li $v0, 4

la $a0, result_str

syscall

li $v0, 4

la $a0, buffer

syscall

li $v0, 10

syscall

4 0
2 years ago
Other questions:
  • Phillip is a wellness counselor. He has created a newsletter as a service for his clients. He needs to decide upon a method to d
    7·1 answer
  • A mouse is known as a _____ device that is able to detect motion in relation to the surface and provides an onscreen pointer rep
    6·1 answer
  • Which of the following is NOT a benefit of virtual memory? speed up of process creation increases in the effective access time o
    6·1 answer
  • Considering the following algorithm, which of the following requirements are satisfied?
    9·1 answer
  • E-mail is an efficient means of disseminating information quickly and inexpensively. However, HIPAA regulations affect e-mail us
    13·1 answer
  • Fill in the missing word in this program. class TooWide(Exception): pass answer = input('How wide is it? ') width = float(answer
    7·1 answer
  • _____________ data is what is translated to digital format so it can be stored in a computer.
    10·1 answer
  • Animated graphics that are displayed on the screen after a set of time when the computer is unattended.​
    8·1 answer
  • Given positive integer n, write a for loop that outputs the even numbers from n down to 0. If n is odd, start with the next lowe
    8·1 answer
  • You are an IT manager at Gigantic Life Insurance. You have a new desktop support person starting today whose experience is limit
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!