subject

Add two more statements to main() to test inputs 3 and -1. Use print statements similar to the existing one (don't use assert)

import java. util. Scanner;

public class UnitTesting {
// Function returns origNum cubed
public static int cubeNum(int origNum) {
return origNum * origNum * origNum;
}

public static void main (String [] args) {

System. out. println("Testing started");
System. out. println("2, expecting 8, got: " + cubeNum(2));

/* Your solution goes here */

System. out. println("Testing completed");

return;
}
}

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 23:30
What does 21 pilots middle aged name as a band 15 years prior to them naming their band 21 pilots?
Answers: 1
question
Computers and Technology, 23.06.2019 03:30
How can you repin an image on your pinterest pin board a. click on the "repin" button b. click on the "add pin" button c. click on the "upload a pin" button d. click on the "save pin" button.
Answers: 2
question
Computers and Technology, 23.06.2019 10:30
How would you categorize the software that runs on mobile devices? break down these apps into at least three basic categories and give an example of each.
Answers: 1
question
Computers and Technology, 24.06.2019 04:30
Fall protection, confined space entry procedures, controlled noise levels, and protection from chemical hazards are some of the things that contribute to a safe what
Answers: 1
You know the right answer?
Add two more statements to main() to test inputs 3 and -1. Use print statements similar to the exist...
Questions
question
Mathematics, 10.03.2020 00:26
question
English, 10.03.2020 00:26
Questions on the website: 13722361