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
stiv31 [10]
3 years ago
3

Java programing:

Computers and Technology
1 answer:
Oksanka [162]3 years ago
4 0

Answer:

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));

       System.out.println("3, expecting 27, got: " + cubeNum(3));

       System.out.println("-1, expecting -1, got: " + cubeNum(-1));

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

       return;

   }

}

Explanation:

Added statements are highlighted.

Since the cubeNum function calculates the cube of the given number and we are asked to write two statements to test inputs 3 and -1, pass the parameters 3 and -1 to the function called cubeNum and print the results using print statements

You might be interested in
If a employee has a grade grater than or equal to 18, then he she will get 50% bonous on the basic pay. Otherwise, the employee
siniylev [52]

Answer:

=IF(cell>=18,"50%bonus","30%bonus"))

5 0
3 years ago
Frrrrrrrrrrreeeeeeeeee brainliest for u
sukhopar [10]

Answer:

Yay I want brainliest

Explanation:

5 0
3 years ago
Read 2 more answers
The _______ contains the most commonly used commands.
expeople1 [14]
The quick access toolbar contains the most commonly used commands.
8 0
4 years ago
Read 2 more answers
"The _____ of the Open Systems Interconnection (OSI) model generates the receiver’s address and ensures the integrity of message
aleksklad [387]

Answer:

The transport layer

Explanation: Layer 4, is the transport layer of the Open System Interconnection (OSI), that handles message transfer of data between end systems or hosts and ensures complete packets transfer.

7 0
3 years ago
Read 2 more answers
In Online Data Extraction data is extracteddirectly from the ------ system itself.o Hosto Destinationo Sourceo Terminal
barxatty [35]

Answer:

system itself.

Explanation:

In Online Data Extraction data is extracted directly from the system itself.

4 0
3 years ago
Other questions:
  • Which practice represents the trait of effective communication?
    6·2 answers
  • When you are printing handouts, which of these can you do? A. Save paper by placing more than one slide per page. B. Check the f
    7·1 answer
  • An interpreter _______. converts the procedural language one statement at a time converts the source code into machine language
    12·1 answer
  • The memory unit of a computer has 2M Words of 32 bits (or 4 bytes) each. The computer has an instruction format with 4 fields: a
    14·1 answer
  • Write a code to define a structure named student, which includes name, student number and email address
    5·1 answer
  • Which question about whale sharks is nonscientific?
    11·2 answers
  • You are developing a Website that is going to be viewed extensively on smartphones and tablets. Which of the following should yo
    7·1 answer
  • A financially stable person is able to:
    8·1 answer
  • What relationship do MP3s and MP3 players have with video files?
    11·1 answer
  • Does The ps5 digital have a disc drive even Though ps4 games are not compatible
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!