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]
3 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]3 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
True or false? The following deterministic finite-state automaton recognizes the set of all bit strings such that the first bit
aleksklad [387]

Answer:gjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj

Explanation:

7 0
2 years ago
You are an interior decorator, confronted with a dark living room. To lighten the room up, you have n candles and want to build
user100 [1]

Answer:

a)

Algorithm to find a solution of min. cost

Function:cost(Graph G,Graph G1);

GC --> empty graph

for i in edges E:

if E(i,j) in G:

c(i,j)=c(i,j)

else if E(i,j) in G1:

c(i,j)=-c(i,j)

Function:Mincost(Graph G):

GC=Cost(G,G1)

while(negativecycle(GC)):

Update residal graph(G1)

GC=Cost(G,G1)

mincost=sum of Cij*F(i,j)

return mincost;

Explanation:

a)

1) Start the program

2) Read the no. of edges and vertices and also read the cost of the two nodes.

3) Find the min cost by travelling to the destination i.e.. finding all possible min. cost values.

4) Compare the all possible min.cost values

5) And display the least min. cost

6) Stop the program

b)

<u>Correctness of algorithm</u>

1)Here in these algorithm we are calculating all the possible cases.

2)These algorithm also supports the negative cost.

3)These algorithm occupies more space.

4)Takes less time

5)so,these algorithm provides the cost efficient solution very effectively.

c)

<u>Run Time Analysis</u>

1) While reading the values during the run time the program execution will stop until user provides the values.

2) Based on the User input Output vary.

3) Time consumption and space consumption is depends on the no. of inputs the user is given.

6 0
3 years ago
What would be the total width of the div in the code below?
Artyom0805 [142]

Answer:

The answer to this question is given below in the explanation section.

Explanation:

The correct answer to this question is d- 346px.

The complete code of this example is given below:

<div>

style="margin:20px; border:solid 3px #888888;">

</div>

while the image width is 300px.

It is noted that the image width is 300px and the margin is 20 px.

Margin:20px means that image margin from four side is 20 px each.

So the width of dive from both side increase to 40 px and the image has 300 px, then total width becomes 340px. Now the border also has 3px of four sides of the image, then the width of the border becomes 6px.

so the total width of the div tag is 346 px.

In short, we can calculate the width of tag as below:

total width of div= width of image+ width of margin+ width of border

total width of dive= 300px+40px+6px

total width of div=346px.

4 0
2 years ago
Read 2 more answers
Wireshark capture files, like the DemoCapturepcap file found in this lab, have a __________ extension, which stands for packet c
VashaNatasha [74]

Answer:

Option (d) is correct

Explanation:

Previously saved capture files can be read using Wireshark. For this, select the File then open the menu. Then Wireshark will pop up the “File Open” dialog box.

Wireshark capture files, like the DemoCapturepcap file found in this lab, have a .pcapng extension, which stands for packet capture, next generation.

5 0
2 years ago
How can you troubleshoot Internet access problems?
joja [24]

Answer:

Check the network icon (or wireless connection settings) to see if you have Internet access. ...

Check for changes to proxy settings.

Check the network cables if your computer is wired to the router.

Reset your router.

Check your firewall or security software.

Hopefully this helps.

8 0
3 years ago
Other questions:
  • Which software application should be used to create a sales pitch to a group of people? Database Email Presentation Word process
    9·1 answer
  • What is the order of adding 10.0 to each element in a one-dimensional array of N real numbers?
    13·1 answer
  • How is a correction made to an Electronic health record?
    14·1 answer
  • CAD workstations
    11·1 answer
  • Find a 95% confidence interval for the mean failure pressure for this type of roof panel.The article "Wind-Uplift Capacity of Re
    7·1 answer
  • "background" software that helps the computer manage its own internal resources is called ________.
    5·1 answer
  • Diverting an attacker from accessing critical systems, collecting information about the attacker's activity and encouraging the
    8·1 answer
  • Produce definition in computer
    9·2 answers
  • Why was the Internet first developed? Use details and information to explain your answer.
    6·1 answer
  • Write l for law of enrtia,ll for law of Acceleration and lll for law of enteraction.
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!