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
Basile [38]
3 years ago
12

Write a method named circleArea that accepts the radius of a circle as a parameter (as a real number) and returns the area of a

circle with that radius. For example, the call of area(2.0) should return 12.566370614359172. You may assume that the radius passed is a non-negative number.
Computers and Technology
1 answer:
lions [1.4K]3 years ago
6 0

Answer:

  public static double circleArea(double radius){

       double area = 3.142*Math.pow(radius,2);

       return area;

   }

Explanation:

Find the complete program in java that prompts the user to enter a value for radius, stores it in a variable, calls the method circleArea() and passes the value for the radius, then displays the area.

import java.util.Scanner;

public class CocaColaVendingTest {

   public static void main(String[] args) {

       Scanner in = new Scanner(System.in);

       System.out.println("Please enter the value for radius");

       double r = in.nextDouble();

       //Calling the method circleArea()

       double calcArea = circleArea(r);

       System.out.println("The Area is: "+calcArea);

   }

   public static double circleArea(double radius){

       double area = 3.142*Math.pow(radius,2);

       return area;

   }

}

You might be interested in
What is the difference between file and directory​
Olin [163]

The basic difference between the two is that files store data, while folders store files and other folders. The folders, often referred to as directories, are used to organize files on your computer

8 0
3 years ago
Kai is a software engineer who started his own IT consulting firm. His friend, Catalina, is the owner of a store that sells offi
vaieri [72.5K]

Answer:

Bartering is the correct answer.

Explanation:

Kai is the engineer that setup his company of IT and his friend who sells the goods for his company. Then he decided to develop a software of the stock management for his friend's store for this his friend gives the required office goods and equipment for his company. So, the bartering is best suited for the following statement.

8 0
4 years ago
Read 2 more answers
A production house needs an operating system that captures, saves, and generates information within specific time. Which type of
Natali [406]

Answer:

A real-time operating system

Explanation:

An operating system is a system software pre-installed on a computing device to manage or control software application, computer hardware and user processes.

This ultimately implies that, an operating system acts as an interface or intermediary between the computer end user and the hardware portion of the computer system (computer hardware) in the processing and execution of instructions. Some examples of an operating system on computers are QNX, Linux, OpenVMS, MacOS, Microsoft windows, IBM, Solaris, VM etc.

There are different types of operating systems (OS) based on their functions and these includes;

I. Simple Batch System.

II. Multiprocessor System.

III. Desktop System.

IV. Multiprogramming Batch System.

V. Distributed Operating System.

VI. Network System.

VII. Realtime Operating System.

In this scenario, a production house needs an operating system that captures, saves, and generates information within specific time. Therefore, the type of operating system that the production house should choose is a real-time operating system.

A real-time operating system can be defined as an operating system (OS) that provides services to a system as they are required, without any form of delay or buffering of data.

4 0
3 years ago
What is the term for a problem in your code
Anna71 [15]

Answer:

bug

Explanation:

Bug

a problem in your code

7 0
3 years ago
Read 2 more answers
Use a colon before a list and put one space after a colon. TRUE OR FALSE
Novosadov [1.4K]

Its TRUE . you use a colon before a series or list only if the words make up a complete sentence.

4 0
3 years ago
Read 2 more answers
Other questions:
  • Write a program that reads in 10 numbers from the user and stores them in a 1D array of size 10. Then, write BubbleSort to sort
    13·1 answer
  • How much cell phone data does the average person use a month
    9·1 answer
  • The information that’s displayed in a datalist control is defined by _____.
    10·1 answer
  • What is better apple or andriod
    11·2 answers
  • Can someone please help me on these short short questions marking Brainly computer modeling people please help
    14·1 answer
  • Why do we say that IP provides ""best-effort"" service?
    11·1 answer
  • If you were writing a story set in our time, what would you include to give readers a sense of our world? Check any that apply.
    5·1 answer
  • Hardware refers to programs and protocols used on a computer system.<br><br> True<br> False
    8·2 answers
  • Any correct answers will be helpful.
    13·1 answer
  • of the choices listed, which is the correct protocol to access a remote computer and execute commands?
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!