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
kvv77 [185]
3 years ago
13

DR JAVA

Computers and Technology
1 answer:
Reptile [31]3 years ago
8 0

Answer:

Explanation:

The following code is all written in Java. It is a very long program that contains methods for all of the requested while loops in the question. Each one is called inside the main method itself. A part of the output is shown in the attached picture below due to the output being so long. Due to technical difficulties, I have attached the code as a txt file below.

You might be interested in
Why the car floated before it started to sink? Explain.​
zhenek [66]

Answer:

it still had air in it

Explanation:

its simple

8 0
3 years ago
Computer viruses often spread by means of what?
lozanna [386]
Email attachments hope this helps
8 0
3 years ago
Read 2 more answers
. <br> It matters if you capitalize your search words in a search engine<br> True<br> False
Natasha2012 [34]

Answer:

false

Explanation:

search engines really don't care. they'll find the answer almost always whether or not you capitalize things

5 0
3 years ago
A perfect binary tree is a complete binary tree with all levels fully filled. Add a method in the BST class to return true if th
algol [13]

Answer:

class BST {

static class Node

{

int val;

Node left, right;

}

static boolean checkPerfectBT(Node node, int h, int d)

{

if (node == null)

return true;

 

if (node.left == null && node.right == null)

{

if(h==d+1)

return true;

else

return false;

}

 

if (node.left == null || node.right== null)

return false;

 

return checkPerfectBT(node.left, h, d+1) && checkPerfectBT(node.right, h, d+1);

}

static int height(Node node)

{

int dep = 0;

while (node != null)

{

node = node.right;

dep=dep+1;

}

return dep;

}

static boolean isPerfectBT(Node node)

{

int h = height(node);

return checkPerfectBT(node, h, 0);

}

 

static Node addNode(int x)

{

Node node = new Node();

node.val= x;

node.right = null;

node.left = null;

return node;

}

public static void main(String args[])

{

int i,j,k;

Node node= null;

node = addNode(34);

node.left = addNode(2);

node.right = addNode(322);

 

node.left.left = addNode(21);

node.left.right = addNode(23);

node.right.left = addNode(37);

node.right.right = addNode(54);

 

if (isPerfectBT(node) == true)

System.out.println("This is a Perfect Binary tree");

else

System.out.println("This is Not a perfect Binary Tree");

}

}

Explanation:

  • Calculate the depth of BST by using a while loop until it reaches a null value.
  • In the addNode method, make an object of Node class.
  • In the main method, pass the values to addNode method.
  • Finally display the relevant message to show if it's Perfect or not.
6 0
4 years ago
Match the item to the type.
I am Lyosha [343]

Answer:

a. hardware - 3. motherboard

b. software - 2. Microsoft Word

c. input device - 4. mouse

d. operating system - 1. windows

7 0
3 years ago
Read 2 more answers
Other questions:
  • Are mechanical keyboards more expensive than membrane keyboards?
    9·2 answers
  • If you're able to understand directions more easily when you hear them instead of reading them you are most likely
    12·1 answer
  • If an online shopping site is experiencing a DDoS attack, what could be a possible impact of the attack?
    8·1 answer
  • State two ways a local area network can be used to monitor the work of employees
    11·1 answer
  • Which step is done first to replace existing text in a text box?
    10·2 answers
  • web pages within the same website often have different blank because they have different blank A) home pages, urls B) goals, sou
    12·1 answer
  • What happens when you apply a theme to a form?
    14·1 answer
  • 10<br> Which of the following is not one of the most popular Spreadsheet software applications?
    6·1 answer
  • Type of cable installed on a patch panel?
    15·1 answer
  • A co-worker is called away for a short errand and leave the clinical PC logged onto the Confidential Information System. You nee
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!