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
andriy [413]
4 years ago
8

Assume that a variable variable, number Of Sides has been initialized. Write a statement that assigns the value True to the vari

able is Quadrilateral if number Of Sides is exactly 4 and False otherwise.
Computers and Technology
1 answer:
inna [77]4 years ago
7 0

Answer:

public class ANot {

   public static void main(String[] args) {

   

       int numberOfSides = 20;

       boolean isQuadrilateral;

       if(numberOfSides==4){

           isQuadrilateral = true;

           System.out.println("The triangle is quadrilateral");

       }

       else{

           isQuadrilateral=false;

           System.out.println("The triangle is not quadrilateral");

       }          

}

}

Explanation:

  1. Create and Initilize the int  variable numberOfSides (You can also receive this from a user using the scanner class for example).
  2. create a boolean variable isQuadrilateral
  3. Use if and else statement to check if numberOfSides ==4 and assign true to isQuadrilateral else assign false
You might be interested in
What would be the result of running the program below?list ← [ 1, 2, 3 ]APPEND ( list, 5 )INSERT ( list, 4, 4 )REMOVE ( list, 5
Korvikt [17]

Answer:

.b. The program would display the list [1, 2, 3, 4]

Explanation:

list ← [ 1, 2, 3 ]: this would create a list of [1, 2, 3]

APPEND ( list, 5 ): this would append 5 to the existing list and the output would be [1, 2, 3, 4, 5]

INSERT ( list, 4, 4 ): this would insert 4 at index 4 of the list and we would have the list to be [1, 2, 3, 5, 4]. The list index counting is from zero.

REMOVE ( list, 5 ): this would remove the occurrence of 5 from the list and the resulting list is [1, 2, 3, 4]

DISPLAY ( list ): this would display the list which is [1, 2, 3, 4]

7 0
3 years ago
Filtering is a function of _____.
Levart [38]
The answer is: switches.

Explanation:

Filtering is a function of switches.
3 0
2 years ago
A ________ allows users to add, remove, or edit its content. Select one: A. blog B. podcast C. wiki D. chat
riadik2000 [5.3K]

Answer: C) wiki

Explanation:

Wiki is defined as website that is used for updating, adding, eliminating and other editing activities with the help of web browser.This mechanism is a quick technique for modifying content by visitors of the website.Example-Wikipedia etc.

  • Other options are incorrect because blog, chat and podcast are not used for manipulation of content present on site through features of adding ,editing etc.
  • Thus, the correct option is option(C).
7 0
4 years ago
What are the six things you will learn this week on Scratch?
notka56 [123]

Answer:

1 You can learn to draw

2 You can learn to code

3 You can learn to make a thumbnail

4 You can learn how to follow yourself

5 You can learn  to remix your own projects

6 You can learn how to make a featured project you've never shared

Explanation:

8 0
3 years ago
Create an application named TestClassifiedAd that instantiates and displays at least two ClassifiedAd objects. A ClassifiedAd ha
arlik [135]

Answer:

Following is given the code with all necessary descriptions as comments in it. The output is also attached under the code. I hope it will help you!

Explanation:

5 0
3 years ago
Other questions:
  • What is basic function of an operating system?
    10·2 answers
  • Explain the purpose of the frame check sequence (fcs) field in a data link frame trailer.
    7·1 answer
  • The availability of the appropriate compiler guarantees that a program developed on one type of machine can be compiled on a dif
    9·1 answer
  • A(n) ___________________ process is initiated by individuals who are subjected to forensic techniques with the intention of hidi
    6·1 answer
  • Suppose Alice and Bob are sending packets to each other over a computer network. Suppose Trudy positions herself in the network
    8·1 answer
  • What is the function of ctrl+f​
    15·2 answers
  • What does the revolver do?
    10·1 answer
  • A capacitor of capacitance 102/π µF is connected across a 220 V, 50 Hz A.C. mains. Calculate the capacitive reactance, RMS value
    8·1 answer
  • Who like anime becus i dooooo ( wrote this becuse i forgot what i was writing abot)
    13·1 answer
  • How have these advances in-home technology changed the role of technicians in our society?
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!