subject

/* Write an application that prompts the user for the radius of a circle and uses a method called circleArea to calculate the area of the circle */import java. util.*;class AreaCircle{double circleArea(double radius){ return(Math. PI*radius*radius);}public static void main(String args[]){ AreaCircle ob=new AreaCircle(); Scanner Sc=new Scanner(System. in); System. out. println("Enter the Radius of the Circle: "); double r=Sc. nextDouble(); double area=ob. circleArea(r); System. out. println("The area of the circle is: "+area);}}

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 18:00
Which of the following is a true statement about milestones
Answers: 1
question
Computers and Technology, 22.06.2019 16:30
You have inserted new slides based on a word outline. how do you format these new slides to match the powerpoint presentation formatting? a. select all slides in the presentation and click format on the home tab. b. select the new slides and click reset on the home tab. c. select all slides in the presentation and click reset on the home tab. d. select the new slides and click format on the home tab.
Answers: 2
question
Computers and Technology, 23.06.2019 00:40
Consider the following statements: struct nametype{string first; string last; }; struct coursetype{string name; int callnum; int credits; char grade; }; struct studenttype{nametype name; double gpa; coursetype course; }; studenttype student; studenttype classlist[100]; coursetype course; nametype name; mark the following statements as valid or invalid. if a statement is invalid, explain why.a.) student.course.callnum = "csc230"; b.) cin > > student.name; c.) classlist[0] = name; d.) classlist[1].gpa = 3.45; e.) name = classlist[15].name; f.) student.name = name; g.) cout < < classlist[10] < < endl; h.) for (int j = 0; j < 100; j++)classlist[j].name = name; i.) classlist.course.credits = 3; j.) course = studenttype.course;
Answers: 1
question
Computers and Technology, 23.06.2019 09:00
Design a class tictactoe that: holds the following information about the game: two-dimensional array (3 by 3), and winner. add additional variables as needed. includes the functions to perform the various operations on objects. for example, function to print the board, getting the move, checking if move is valid, determining if there is a winner after each move. add additional operations as needed. includes constructor(s). write the functions of the class, and write a program that uses the class. the program should declare an object of type tictactoe. the program will create the board and store it in the array. the program will allow two players to play the tic-tac-toe game. after every valid move update the array, check if there is a winner. if there is no winner and no tie, then print the board again to continue.
Answers: 2
You know the right answer?
/* Write an application that prompts the user for the radius of a circle and uses a method called ci...
Questions
question
English, 23.04.2020 03:11
question
Mathematics, 23.04.2020 03:11
question
Biology, 23.04.2020 03:11
question
English, 23.04.2020 03:11
question
Mathematics, 23.04.2020 03:11
Questions on the website: 13722360