SlideShare ist ein Scribd-Unternehmen logo
1 von 5
Downloaden Sie, um offline zu lesen
please provide steps on how to get screenshot of Junit tests results
IntTree.java :
public interface IntTree {
public void buildTree(int max);
public String getPreOrder();
public String getInOrder();
public String getPostOrder();
public void printSidewaysIndented();
}
IntTreeNode.java :
class IntTreeNode {
public int data;
public IntTreeNode left;
public IntTreeNode right;
public IntTreeNode (int data, IntTreeNode left, IntTreeNode right) {
this.data = data;
this.left = left;
this.right = right;
}
}
BinaryIntTree.java :
class BinaryIntTree {
private IntTreeNode overallRoot;
// pre: overallRoot has nothing important in it because the old values will be lost
// post: overallRoot points to the root of a tree that contains max nodes
public void buildTree(int max) {
overallRoot = buildTree(1, max);
}
// pre: n is the value to be assigned to the new node
// post: a new subtree has been created with data value n
private IntTreeNode buildTree(int n, int max) {
if (n > max) {
return null;
} else {
IntTreeNode left = buildTree(2*n, max);
IntTreeNode right = buildTree(2*n +1, max);
return new IntTreeNode(n, left, right);
}
}
// pre: none
// post: returns the data values of the tree using a preorder traversal
public String getPreOrder() {
// todo
return "";
}
// pre: none
// post: returns the data values of the tree using a inorder traversal
public String getInOrder() {
String result = "";
result = getInOrder(overallRoot, result);
return result.strip();
}
// pre: none
// post: the values of the sub tree are added to the result string in inorder traverseral order
private String getInOrder(IntTreeNode root, String result) {
if (null != root) {
result = getInOrder(root.left, result);
result = result + root.data + " ";
result = getInOrder(root.right, result);
}
return result;
}
// pre: none
// post: returns the data values of the tree using a postorder traversal
public String getPostOrder() {
// todo
return "";
}
// pre: none
// post: the tree is print to console rotated 90 degree so the root is on the far left
public void printSidewaysIndented() {
printSidewaysIndented(overallRoot, 0);
}
// pre: none
// post: the subtree is printed spaced out to appropriately for the level specified
private void printSidewaysIndented(IntTreeNode root, int level) {
if (null != root) {
printSidewaysIndented(root.right, level + 1);
for (int i = 0; i < level; i ++) {
System.out.print(" ");
}
System.out.println(root.data);
printSidewaysIndented(root.left, level + 1);
}
}
}
BinaryIntTreeTest.java :
import static org.junit.Assert.assertEquals;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
public class BinaryIntTreeTest {
// buildTree(5) looks like this sideways:
// 3
//
// 1
// 5
// 2
// 4
@Test
public void testBuildTree() {
BinaryIntTree tester = new BinaryIntTree();
// add 1 elements to tree
tester.buildTree(1);
assertEquals("after adding nodes to tree the inorder print should be", "1", tester.getInOrder());
// add 5 elements to tree
tester.buildTree(5);
assertEquals("after adding nodes to tree the inorder print should be", "4 2 5 1 3",
tester.getInOrder());
tester.printSidewaysIndented();
}
@Test
public void testGetPreOrder() {
BinaryIntTree tester = new BinaryIntTree();
// add 5 elements to tree
tester.buildTree(5);
assertEquals("after adding nodes to tree the inorder print should be", "1 2 4 5 3",
tester.getPreOrder());
}
@Test
public void testGetInOrder() {
BinaryIntTree tester = new BinaryIntTree();
// add 5 elements to tree
tester.buildTree(5);
assertEquals("after adding nodes to tree the inorder print should be", "4 2 5 1 3",
tester.getInOrder());
}
@Test
public void testGetPostOrder() {
BinaryIntTree tester = new BinaryIntTree();
// add 5 elements to tree
tester.buildTree(5);
assertEquals("after adding nodes to tree the inorder print should be", "4 5 2 3 1",
tester.getPostOrder());
}
}
Binary Tree Long Homework Assignment Overview: this week you are to implement parts of a
Binary Tree class. You will be given an interface, a partially complete BinarylntTree.java class,
an IntTreeNode.java class, and a BinarylntTreeTest .java unit test file. Your assignment is to
complete the BinarylntTree.java class so that it passes all the unit tests. To Do: 1. Download the
following files: - IntTree.java - BinarylntTree.java - BinarylntTreeTest.java 2. You are to
complete the BinarylntTree.java class file so that it will implement all the methods in the IntTree
interface and passes all unit tests in BinarylntTreeTest. 3. When done you are to submit via
canvas your BinaryIntTree.java file and a screenshot image showing the pass/fail results of
running the unit tests.
please provide steps on how to get screenshot of Junit tests results I.pdf

Weitere ähnliche Inhalte

Ähnlich wie please provide steps on how to get screenshot of Junit tests results I.pdf

Running Head Discussion Board .docx
Running Head Discussion Board                                  .docxRunning Head Discussion Board                                  .docx
Running Head Discussion Board .docxjeanettehully
 
C++ BinaryTree Help Creating main function for Trees...Here are .pdf
C++ BinaryTree Help  Creating main function for Trees...Here are .pdfC++ BinaryTree Help  Creating main function for Trees...Here are .pdf
C++ BinaryTree Help Creating main function for Trees...Here are .pdfforecastfashions
 
Given the following codepackage data1;import java.util.;p.pdf
Given the following codepackage data1;import java.util.;p.pdfGiven the following codepackage data1;import java.util.;p.pdf
Given the following codepackage data1;import java.util.;p.pdfillyasraja7
 
Once you have all the structures working as intended- it is time to co.docx
Once you have all the structures working as intended- it is time to co.docxOnce you have all the structures working as intended- it is time to co.docx
Once you have all the structures working as intended- it is time to co.docxfarrahkur54
 
Please finish everything marked TODO BinaryNode-java public class Bi.docx
Please finish everything marked TODO   BinaryNode-java public class Bi.docxPlease finish everything marked TODO   BinaryNode-java public class Bi.docx
Please finish everything marked TODO BinaryNode-java public class Bi.docxJakeT2gGrayp
 
mainpublic class AssignmentThree {    public static void ma.pdf
mainpublic class AssignmentThree {    public static void ma.pdfmainpublic class AssignmentThree {    public static void ma.pdf
mainpublic class AssignmentThree {    public static void ma.pdffathimafancyjeweller
 
hi i have to write a java program involving link lists. i have a pro.pdf
hi i have to write a java program involving link lists. i have a pro.pdfhi i have to write a java program involving link lists. i have a pro.pdf
hi i have to write a java program involving link lists. i have a pro.pdfarchgeetsenterprises
 
in this assignment you are asked to write a simple driver program an.pdf
in this assignment you are asked to write a simple driver program an.pdfin this assignment you are asked to write a simple driver program an.pdf
in this assignment you are asked to write a simple driver program an.pdfmichardsonkhaicarr37
 
1 COMP 182 Fall 2016 Project 6 Binary Search Trees .docx
 1 COMP 182 Fall 2016 Project 6 Binary Search Trees .docx 1 COMP 182 Fall 2016 Project 6 Binary Search Trees .docx
1 COMP 182 Fall 2016 Project 6 Binary Search Trees .docxaryan532920
 
ANSimport java.util.Scanner; class Bina_node { Bina_node .pdf
ANSimport java.util.Scanner; class Bina_node { Bina_node .pdfANSimport java.util.Scanner; class Bina_node { Bina_node .pdf
ANSimport java.util.Scanner; class Bina_node { Bina_node .pdfanukoolelectronics
 
I need help implementing a Stack with this java programming assignme.pdf
I need help implementing a Stack with this java programming assignme.pdfI need help implementing a Stack with this java programming assignme.pdf
I need help implementing a Stack with this java programming assignme.pdfsauravmanwanicp
 
Tree Traversals A tree traversal is the process of visiting.pdf
Tree Traversals A tree traversal is the process of visiting.pdfTree Traversals A tree traversal is the process of visiting.pdf
Tree Traversals A tree traversal is the process of visiting.pdfajayadinathcomputers
 
using set identitiesSolutionimport java.util.Scanner; c.pdf
using set identitiesSolutionimport java.util.Scanner;  c.pdfusing set identitiesSolutionimport java.util.Scanner;  c.pdf
using set identitiesSolutionimport java.util.Scanner; c.pdfexcellentmobilesabc
 
Please help write BinaryTree-java Thank you! Create a class BinaryTr.pdf
Please help write BinaryTree-java Thank you!   Create a class BinaryTr.pdfPlease help write BinaryTree-java Thank you!   Create a class BinaryTr.pdf
Please help write BinaryTree-java Thank you! Create a class BinaryTr.pdfinfo750646
 
How do I fix it in LinkedList.javathis is what i didLabProgra.pdf
How do I fix it in LinkedList.javathis is what i didLabProgra.pdfHow do I fix it in LinkedList.javathis is what i didLabProgra.pdf
How do I fix it in LinkedList.javathis is what i didLabProgra.pdfmail931892
 
Using NetBeansImplement a queue named QueueLL using a Linked List .pdf
Using NetBeansImplement a queue named QueueLL using a Linked List .pdfUsing NetBeansImplement a queue named QueueLL using a Linked List .pdf
Using NetBeansImplement a queue named QueueLL using a Linked List .pdfsiennatimbok52331
 
Write a program in Java to implement the ADT Binary Tree part of who.docx
Write a program in Java to implement the ADT Binary Tree part of who.docxWrite a program in Java to implement the ADT Binary Tree part of who.docx
Write a program in Java to implement the ADT Binary Tree part of who.docxrochellwa9f
 
write recursive function that calculates and returns the length of a.pdf
write recursive function that calculates and returns the length of a.pdfwrite recursive function that calculates and returns the length of a.pdf
write recursive function that calculates and returns the length of a.pdfarpitcomputronics
 
Create a class BinarySearchTree- A class that implements the ADT binar.pdf
Create a class BinarySearchTree- A class that implements the ADT binar.pdfCreate a class BinarySearchTree- A class that implements the ADT binar.pdf
Create a class BinarySearchTree- A class that implements the ADT binar.pdfshyamsunder1211
 
Modify HuffmanTree.java and HuffmanNode.java to allow the user to se.pdf
Modify HuffmanTree.java and HuffmanNode.java to allow the user to se.pdfModify HuffmanTree.java and HuffmanNode.java to allow the user to se.pdf
Modify HuffmanTree.java and HuffmanNode.java to allow the user to se.pdfarjuncorner565
 

Ähnlich wie please provide steps on how to get screenshot of Junit tests results I.pdf (20)

Running Head Discussion Board .docx
Running Head Discussion Board                                  .docxRunning Head Discussion Board                                  .docx
Running Head Discussion Board .docx
 
C++ BinaryTree Help Creating main function for Trees...Here are .pdf
C++ BinaryTree Help  Creating main function for Trees...Here are .pdfC++ BinaryTree Help  Creating main function for Trees...Here are .pdf
C++ BinaryTree Help Creating main function for Trees...Here are .pdf
 
Given the following codepackage data1;import java.util.;p.pdf
Given the following codepackage data1;import java.util.;p.pdfGiven the following codepackage data1;import java.util.;p.pdf
Given the following codepackage data1;import java.util.;p.pdf
 
Once you have all the structures working as intended- it is time to co.docx
Once you have all the structures working as intended- it is time to co.docxOnce you have all the structures working as intended- it is time to co.docx
Once you have all the structures working as intended- it is time to co.docx
 
Please finish everything marked TODO BinaryNode-java public class Bi.docx
Please finish everything marked TODO   BinaryNode-java public class Bi.docxPlease finish everything marked TODO   BinaryNode-java public class Bi.docx
Please finish everything marked TODO BinaryNode-java public class Bi.docx
 
mainpublic class AssignmentThree {    public static void ma.pdf
mainpublic class AssignmentThree {    public static void ma.pdfmainpublic class AssignmentThree {    public static void ma.pdf
mainpublic class AssignmentThree {    public static void ma.pdf
 
hi i have to write a java program involving link lists. i have a pro.pdf
hi i have to write a java program involving link lists. i have a pro.pdfhi i have to write a java program involving link lists. i have a pro.pdf
hi i have to write a java program involving link lists. i have a pro.pdf
 
in this assignment you are asked to write a simple driver program an.pdf
in this assignment you are asked to write a simple driver program an.pdfin this assignment you are asked to write a simple driver program an.pdf
in this assignment you are asked to write a simple driver program an.pdf
 
1 COMP 182 Fall 2016 Project 6 Binary Search Trees .docx
 1 COMP 182 Fall 2016 Project 6 Binary Search Trees .docx 1 COMP 182 Fall 2016 Project 6 Binary Search Trees .docx
1 COMP 182 Fall 2016 Project 6 Binary Search Trees .docx
 
ANSimport java.util.Scanner; class Bina_node { Bina_node .pdf
ANSimport java.util.Scanner; class Bina_node { Bina_node .pdfANSimport java.util.Scanner; class Bina_node { Bina_node .pdf
ANSimport java.util.Scanner; class Bina_node { Bina_node .pdf
 
I need help implementing a Stack with this java programming assignme.pdf
I need help implementing a Stack with this java programming assignme.pdfI need help implementing a Stack with this java programming assignme.pdf
I need help implementing a Stack with this java programming assignme.pdf
 
Tree Traversals A tree traversal is the process of visiting.pdf
Tree Traversals A tree traversal is the process of visiting.pdfTree Traversals A tree traversal is the process of visiting.pdf
Tree Traversals A tree traversal is the process of visiting.pdf
 
using set identitiesSolutionimport java.util.Scanner; c.pdf
using set identitiesSolutionimport java.util.Scanner;  c.pdfusing set identitiesSolutionimport java.util.Scanner;  c.pdf
using set identitiesSolutionimport java.util.Scanner; c.pdf
 
Please help write BinaryTree-java Thank you! Create a class BinaryTr.pdf
Please help write BinaryTree-java Thank you!   Create a class BinaryTr.pdfPlease help write BinaryTree-java Thank you!   Create a class BinaryTr.pdf
Please help write BinaryTree-java Thank you! Create a class BinaryTr.pdf
 
How do I fix it in LinkedList.javathis is what i didLabProgra.pdf
How do I fix it in LinkedList.javathis is what i didLabProgra.pdfHow do I fix it in LinkedList.javathis is what i didLabProgra.pdf
How do I fix it in LinkedList.javathis is what i didLabProgra.pdf
 
Using NetBeansImplement a queue named QueueLL using a Linked List .pdf
Using NetBeansImplement a queue named QueueLL using a Linked List .pdfUsing NetBeansImplement a queue named QueueLL using a Linked List .pdf
Using NetBeansImplement a queue named QueueLL using a Linked List .pdf
 
Write a program in Java to implement the ADT Binary Tree part of who.docx
Write a program in Java to implement the ADT Binary Tree part of who.docxWrite a program in Java to implement the ADT Binary Tree part of who.docx
Write a program in Java to implement the ADT Binary Tree part of who.docx
 
write recursive function that calculates and returns the length of a.pdf
write recursive function that calculates and returns the length of a.pdfwrite recursive function that calculates and returns the length of a.pdf
write recursive function that calculates and returns the length of a.pdf
 
Create a class BinarySearchTree- A class that implements the ADT binar.pdf
Create a class BinarySearchTree- A class that implements the ADT binar.pdfCreate a class BinarySearchTree- A class that implements the ADT binar.pdf
Create a class BinarySearchTree- A class that implements the ADT binar.pdf
 
Modify HuffmanTree.java and HuffmanNode.java to allow the user to se.pdf
Modify HuffmanTree.java and HuffmanNode.java to allow the user to se.pdfModify HuffmanTree.java and HuffmanNode.java to allow the user to se.pdf
Modify HuffmanTree.java and HuffmanNode.java to allow the user to se.pdf
 

Mehr von asenterprisestyagi

please I need help- make sure its correct and I will give you ty Matc.pdf
please I need help- make sure its correct and I will give you  ty Matc.pdfplease I need help- make sure its correct and I will give you  ty Matc.pdf
please I need help- make sure its correct and I will give you ty Matc.pdfasenterprisestyagi
 
Please I am trying to get this code to output in -txt file- I need you.pdf
Please I am trying to get this code to output in -txt file- I need you.pdfPlease I am trying to get this code to output in -txt file- I need you.pdf
Please I am trying to get this code to output in -txt file- I need you.pdfasenterprisestyagi
 
please help-) Weekly Challenge- There are a lot of blood vessels- Howe (1).pdf
please help-) Weekly Challenge- There are a lot of blood vessels- Howe (1).pdfplease help-) Weekly Challenge- There are a lot of blood vessels- Howe (1).pdf
please help-) Weekly Challenge- There are a lot of blood vessels- Howe (1).pdfasenterprisestyagi
 
Please match the muscles with its correct bony origin- Responses can b.pdf
Please match the muscles with its correct bony origin- Responses can b.pdfPlease match the muscles with its correct bony origin- Responses can b.pdf
Please match the muscles with its correct bony origin- Responses can b.pdfasenterprisestyagi
 
Please match the muscle with its correct insertion site- Biceps brachi.pdf
Please match the muscle with its correct insertion site- Biceps brachi.pdfPlease match the muscle with its correct insertion site- Biceps brachi.pdf
Please match the muscle with its correct insertion site- Biceps brachi.pdfasenterprisestyagi
 
Please match the appropriate Career Readiness Competency with their de.pdf
Please match the appropriate Career Readiness Competency with their de.pdfPlease match the appropriate Career Readiness Competency with their de.pdf
Please match the appropriate Career Readiness Competency with their de.pdfasenterprisestyagi
 
Please make GUI in Eclipse Java Media Rental System Before attempting.pdf
Please make GUI in Eclipse Java Media Rental System Before attempting.pdfPlease make GUI in Eclipse Java Media Rental System Before attempting.pdf
Please make GUI in Eclipse Java Media Rental System Before attempting.pdfasenterprisestyagi
 
please keep it short and simple Review Sulfide-Indole-Motility medium.pdf
please keep it short and simple Review Sulfide-Indole-Motility medium.pdfplease keep it short and simple Review Sulfide-Indole-Motility medium.pdf
please keep it short and simple Review Sulfide-Indole-Motility medium.pdfasenterprisestyagi
 
Please help!! An igneous rock forms when melt solidifies- The rock c.pdf
Please help!!   An igneous rock forms when melt solidifies- The rock c.pdfPlease help!!   An igneous rock forms when melt solidifies- The rock c.pdf
Please help!! An igneous rock forms when melt solidifies- The rock c.pdfasenterprisestyagi
 
Please label and answer all questions please and explain what is 1-.pdf
Please label and answer all questions please and explain what is  1-.pdfPlease label and answer all questions please and explain what is  1-.pdf
Please label and answer all questions please and explain what is 1-.pdfasenterprisestyagi
 
Please use the same variables and only write the TODO part #!-usr-bi.pdf
Please use the same variables and only write the TODO part   #!-usr-bi.pdfPlease use the same variables and only write the TODO part   #!-usr-bi.pdf
Please use the same variables and only write the TODO part #!-usr-bi.pdfasenterprisestyagi
 
Please use python to write a script for below- 1- Upload the audio (Pl.pdf
Please use python to write a script for below- 1- Upload the audio (Pl.pdfPlease use python to write a script for below- 1- Upload the audio (Pl.pdf
Please use python to write a script for below- 1- Upload the audio (Pl.pdfasenterprisestyagi
 
Please Use Java 8 for this project Humans VS Gob.pdf
Please Use Java 8 for this project                       Humans VS Gob.pdfPlease Use Java 8 for this project                       Humans VS Gob.pdf
Please Use Java 8 for this project Humans VS Gob.pdfasenterprisestyagi
 
Please solving using Alloy Add assort differentTransitionsForFSM- whic.pdf
Please solving using Alloy Add assort differentTransitionsForFSM- whic.pdfPlease solving using Alloy Add assort differentTransitionsForFSM- whic.pdf
Please solving using Alloy Add assort differentTransitionsForFSM- whic.pdfasenterprisestyagi
 
please solve as soon as possible 1- In a Joint Liability Company the.pdf
please solve as soon as possible  1- In a Joint Liability Company the.pdfplease solve as soon as possible  1- In a Joint Liability Company the.pdf
please solve as soon as possible 1- In a Joint Liability Company the.pdfasenterprisestyagi
 
Please solve c) and show code using Alloy make sure code can run Add f.pdf
Please solve c) and show code using Alloy make sure code can run Add f.pdfPlease solve c) and show code using Alloy make sure code can run Add f.pdf
Please solve c) and show code using Alloy make sure code can run Add f.pdfasenterprisestyagi
 
please help- I will upvote- thank you! Q- RESPA specifies percentage r.pdf
please help- I will upvote- thank you! Q- RESPA specifies percentage r.pdfplease help- I will upvote- thank you! Q- RESPA specifies percentage r.pdf
please help- I will upvote- thank you! Q- RESPA specifies percentage r.pdfasenterprisestyagi
 
please show work (by hand) Translate the following C code to MIPS ass.pdf
please show work (by hand)  Translate the following C code to MIPS ass.pdfplease show work (by hand)  Translate the following C code to MIPS ass.pdf
please show work (by hand) Translate the following C code to MIPS ass.pdfasenterprisestyagi
 
Please show work- Correct answer is given- Thanks 8- On December 31st.pdf
Please show work- Correct answer is given- Thanks  8- On December 31st.pdfPlease show work- Correct answer is given- Thanks  8- On December 31st.pdf
Please show work- Correct answer is given- Thanks 8- On December 31st.pdfasenterprisestyagi
 
please solve all of the following What is a -metapopulation-- A group.pdf
please solve all of the following What is a -metapopulation-- A group.pdfplease solve all of the following What is a -metapopulation-- A group.pdf
please solve all of the following What is a -metapopulation-- A group.pdfasenterprisestyagi
 

Mehr von asenterprisestyagi (20)

please I need help- make sure its correct and I will give you ty Matc.pdf
please I need help- make sure its correct and I will give you  ty Matc.pdfplease I need help- make sure its correct and I will give you  ty Matc.pdf
please I need help- make sure its correct and I will give you ty Matc.pdf
 
Please I am trying to get this code to output in -txt file- I need you.pdf
Please I am trying to get this code to output in -txt file- I need you.pdfPlease I am trying to get this code to output in -txt file- I need you.pdf
Please I am trying to get this code to output in -txt file- I need you.pdf
 
please help-) Weekly Challenge- There are a lot of blood vessels- Howe (1).pdf
please help-) Weekly Challenge- There are a lot of blood vessels- Howe (1).pdfplease help-) Weekly Challenge- There are a lot of blood vessels- Howe (1).pdf
please help-) Weekly Challenge- There are a lot of blood vessels- Howe (1).pdf
 
Please match the muscles with its correct bony origin- Responses can b.pdf
Please match the muscles with its correct bony origin- Responses can b.pdfPlease match the muscles with its correct bony origin- Responses can b.pdf
Please match the muscles with its correct bony origin- Responses can b.pdf
 
Please match the muscle with its correct insertion site- Biceps brachi.pdf
Please match the muscle with its correct insertion site- Biceps brachi.pdfPlease match the muscle with its correct insertion site- Biceps brachi.pdf
Please match the muscle with its correct insertion site- Biceps brachi.pdf
 
Please match the appropriate Career Readiness Competency with their de.pdf
Please match the appropriate Career Readiness Competency with their de.pdfPlease match the appropriate Career Readiness Competency with their de.pdf
Please match the appropriate Career Readiness Competency with their de.pdf
 
Please make GUI in Eclipse Java Media Rental System Before attempting.pdf
Please make GUI in Eclipse Java Media Rental System Before attempting.pdfPlease make GUI in Eclipse Java Media Rental System Before attempting.pdf
Please make GUI in Eclipse Java Media Rental System Before attempting.pdf
 
please keep it short and simple Review Sulfide-Indole-Motility medium.pdf
please keep it short and simple Review Sulfide-Indole-Motility medium.pdfplease keep it short and simple Review Sulfide-Indole-Motility medium.pdf
please keep it short and simple Review Sulfide-Indole-Motility medium.pdf
 
Please help!! An igneous rock forms when melt solidifies- The rock c.pdf
Please help!!   An igneous rock forms when melt solidifies- The rock c.pdfPlease help!!   An igneous rock forms when melt solidifies- The rock c.pdf
Please help!! An igneous rock forms when melt solidifies- The rock c.pdf
 
Please label and answer all questions please and explain what is 1-.pdf
Please label and answer all questions please and explain what is  1-.pdfPlease label and answer all questions please and explain what is  1-.pdf
Please label and answer all questions please and explain what is 1-.pdf
 
Please use the same variables and only write the TODO part #!-usr-bi.pdf
Please use the same variables and only write the TODO part   #!-usr-bi.pdfPlease use the same variables and only write the TODO part   #!-usr-bi.pdf
Please use the same variables and only write the TODO part #!-usr-bi.pdf
 
Please use python to write a script for below- 1- Upload the audio (Pl.pdf
Please use python to write a script for below- 1- Upload the audio (Pl.pdfPlease use python to write a script for below- 1- Upload the audio (Pl.pdf
Please use python to write a script for below- 1- Upload the audio (Pl.pdf
 
Please Use Java 8 for this project Humans VS Gob.pdf
Please Use Java 8 for this project                       Humans VS Gob.pdfPlease Use Java 8 for this project                       Humans VS Gob.pdf
Please Use Java 8 for this project Humans VS Gob.pdf
 
Please solving using Alloy Add assort differentTransitionsForFSM- whic.pdf
Please solving using Alloy Add assort differentTransitionsForFSM- whic.pdfPlease solving using Alloy Add assort differentTransitionsForFSM- whic.pdf
Please solving using Alloy Add assort differentTransitionsForFSM- whic.pdf
 
please solve as soon as possible 1- In a Joint Liability Company the.pdf
please solve as soon as possible  1- In a Joint Liability Company the.pdfplease solve as soon as possible  1- In a Joint Liability Company the.pdf
please solve as soon as possible 1- In a Joint Liability Company the.pdf
 
Please solve c) and show code using Alloy make sure code can run Add f.pdf
Please solve c) and show code using Alloy make sure code can run Add f.pdfPlease solve c) and show code using Alloy make sure code can run Add f.pdf
Please solve c) and show code using Alloy make sure code can run Add f.pdf
 
please help- I will upvote- thank you! Q- RESPA specifies percentage r.pdf
please help- I will upvote- thank you! Q- RESPA specifies percentage r.pdfplease help- I will upvote- thank you! Q- RESPA specifies percentage r.pdf
please help- I will upvote- thank you! Q- RESPA specifies percentage r.pdf
 
please show work (by hand) Translate the following C code to MIPS ass.pdf
please show work (by hand)  Translate the following C code to MIPS ass.pdfplease show work (by hand)  Translate the following C code to MIPS ass.pdf
please show work (by hand) Translate the following C code to MIPS ass.pdf
 
Please show work- Correct answer is given- Thanks 8- On December 31st.pdf
Please show work- Correct answer is given- Thanks  8- On December 31st.pdfPlease show work- Correct answer is given- Thanks  8- On December 31st.pdf
Please show work- Correct answer is given- Thanks 8- On December 31st.pdf
 
please solve all of the following What is a -metapopulation-- A group.pdf
please solve all of the following What is a -metapopulation-- A group.pdfplease solve all of the following What is a -metapopulation-- A group.pdf
please solve all of the following What is a -metapopulation-- A group.pdf
 

Kürzlich hochgeladen

Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxVishalSingh1417
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxJisc
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...Nguyen Thanh Tu Collection
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfSherif Taha
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxRamakrishna Reddy Bijjam
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseAnaAcapella
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17Celine George
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...Poonam Aher Patil
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxDr. Sarita Anand
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024Elizabeth Walsh
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfPoh-Sun Goh
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfNirmal Dwivedi
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.christianmathematics
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxVishalSingh1417
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsMebane Rash
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...pradhanghanshyam7136
 

Kürzlich hochgeladen (20)

Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 

please provide steps on how to get screenshot of Junit tests results I.pdf

  • 1. please provide steps on how to get screenshot of Junit tests results IntTree.java : public interface IntTree { public void buildTree(int max); public String getPreOrder(); public String getInOrder(); public String getPostOrder(); public void printSidewaysIndented(); } IntTreeNode.java : class IntTreeNode { public int data; public IntTreeNode left; public IntTreeNode right; public IntTreeNode (int data, IntTreeNode left, IntTreeNode right) { this.data = data; this.left = left; this.right = right; } } BinaryIntTree.java : class BinaryIntTree { private IntTreeNode overallRoot; // pre: overallRoot has nothing important in it because the old values will be lost // post: overallRoot points to the root of a tree that contains max nodes public void buildTree(int max) { overallRoot = buildTree(1, max); } // pre: n is the value to be assigned to the new node // post: a new subtree has been created with data value n private IntTreeNode buildTree(int n, int max) { if (n > max) { return null; } else { IntTreeNode left = buildTree(2*n, max);
  • 2. IntTreeNode right = buildTree(2*n +1, max); return new IntTreeNode(n, left, right); } } // pre: none // post: returns the data values of the tree using a preorder traversal public String getPreOrder() { // todo return ""; } // pre: none // post: returns the data values of the tree using a inorder traversal public String getInOrder() { String result = ""; result = getInOrder(overallRoot, result); return result.strip(); } // pre: none // post: the values of the sub tree are added to the result string in inorder traverseral order private String getInOrder(IntTreeNode root, String result) { if (null != root) { result = getInOrder(root.left, result); result = result + root.data + " "; result = getInOrder(root.right, result); } return result; } // pre: none // post: returns the data values of the tree using a postorder traversal public String getPostOrder() { // todo return ""; } // pre: none // post: the tree is print to console rotated 90 degree so the root is on the far left public void printSidewaysIndented() { printSidewaysIndented(overallRoot, 0); } // pre: none // post: the subtree is printed spaced out to appropriately for the level specified
  • 3. private void printSidewaysIndented(IntTreeNode root, int level) { if (null != root) { printSidewaysIndented(root.right, level + 1); for (int i = 0; i < level; i ++) { System.out.print(" "); } System.out.println(root.data); printSidewaysIndented(root.left, level + 1); } } } BinaryIntTreeTest.java : import static org.junit.Assert.assertEquals; import org.junit.AfterClass; import org.junit.BeforeClass; import org.junit.Test; public class BinaryIntTreeTest { // buildTree(5) looks like this sideways: // 3 // // 1 // 5 // 2 // 4 @Test public void testBuildTree() { BinaryIntTree tester = new BinaryIntTree(); // add 1 elements to tree tester.buildTree(1); assertEquals("after adding nodes to tree the inorder print should be", "1", tester.getInOrder()); // add 5 elements to tree tester.buildTree(5); assertEquals("after adding nodes to tree the inorder print should be", "4 2 5 1 3", tester.getInOrder()); tester.printSidewaysIndented(); }
  • 4. @Test public void testGetPreOrder() { BinaryIntTree tester = new BinaryIntTree(); // add 5 elements to tree tester.buildTree(5); assertEquals("after adding nodes to tree the inorder print should be", "1 2 4 5 3", tester.getPreOrder()); } @Test public void testGetInOrder() { BinaryIntTree tester = new BinaryIntTree(); // add 5 elements to tree tester.buildTree(5); assertEquals("after adding nodes to tree the inorder print should be", "4 2 5 1 3", tester.getInOrder()); } @Test public void testGetPostOrder() { BinaryIntTree tester = new BinaryIntTree(); // add 5 elements to tree tester.buildTree(5); assertEquals("after adding nodes to tree the inorder print should be", "4 5 2 3 1", tester.getPostOrder()); } } Binary Tree Long Homework Assignment Overview: this week you are to implement parts of a Binary Tree class. You will be given an interface, a partially complete BinarylntTree.java class, an IntTreeNode.java class, and a BinarylntTreeTest .java unit test file. Your assignment is to complete the BinarylntTree.java class so that it passes all the unit tests. To Do: 1. Download the following files: - IntTree.java - BinarylntTree.java - BinarylntTreeTest.java 2. You are to complete the BinarylntTree.java class file so that it will implement all the methods in the IntTree interface and passes all unit tests in BinarylntTreeTest. 3. When done you are to submit via canvas your BinaryIntTree.java file and a screenshot image showing the pass/fail results of running the unit tests.