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
Snezhnost [94]
4 years ago
11

Which of the following code displays the area of a circle if the radius is positive. a. if (radius != 0) System.out.println(radi

us * radius * 3.14159); b. if (radius >= 0) System.out.println(radius * radius * 3.14159); c. if (radius <= 0) System.out.println(radius * radius * 3.14159); d. if (radius > 0) System.out.println(radius * radius * 3.14159);
Computers and Technology
1 answer:
maw [93]4 years ago
8 0

Answer:

d. if (radius > 0) System.out.println(radius * radius * 3.14159);

Explanation:

The positive values are those values that are greater than 0(zero).0 is considered to be nonnegative number it is neither positive nor negative and for a zero radius the area will be 0.As we know the are of the circle is π*radius*radius, and π is 3.14159.So the correct answer matching to this condition is option d.

Which checks if the radius is greater than 0 then find the radius and print it.

You might be interested in
Can we declare top level classes as private or protected?
uysha [10]

Answer and Explanation:

top level class can not be declare as private or protected. It is always public. If we declare a top level class as private then the compiler always complain that the  private is not allowed  and if we declare top level class as protected then compiler complain that modifier protection is not allowed here. so we can not declare top level class as private or protected

5 0
3 years ago
Answer quick plzzz I only have 2 hours
Nana76 [90]

Answer:

option 2

Explanation:

8 0
3 years ago
Read 2 more answers
What protocol suite below is the most commonly used protocol for local area network (lan) communication?
grandymaker [24]
Answer TCP/IP is the most common protocol in Local Area Networks.
3 0
4 years ago
A university wants to schedule the classrooms for final exams. The attributes are given below:
iVinArrow [24]

Answer:

See explaination

Explanation:

Clearly the entities are as follows:-

Course

Section

Room

Test

The relationship among entities are as follows:-

Course has Section

Test is conducted for Course

Test is conducted in Section

Test is conducted in Room

Attributes of each entities are as follows:-

Course (CourseID, Name, Department)

Section (SectionID, Enrollment)

Room (RoomNumber, Capacity, Building)

Test (Time)

Section is a week entity as, there may be same sections for different courses, therefore section uses the primary key of course entity as foreign key.

Also entity Test is dependent upon the entities Room,Section and Course, therefore primary keys of these entities will be used as foreign key in the Test entity.

Check attachment for the ER diagram

5 0
3 years ago
The ideal body position for your legs after you've adjusted your seat is with your knee ___.
Kipish [7]

Answer:

is slightly crooked when pressing the pedals. This answer has been confirmed as correct and helpful

Explanation:

Hope it helps

7 0
3 years ago
Other questions:
  • Which of the following are you likely to find between multiple school buildings in a city wide school district?
    9·1 answer
  • Which of the acronyms listed below refers to a series of basic hardware diagnostic tests performed by the startup BIOS after the
    13·1 answer
  • The network of satellites monitoring continental movement is referred to as
    7·1 answer
  • Header and Footer options are located in the _____ tab.
    7·1 answer
  • Which is most harmful computer virus define​
    15·1 answer
  • Your license can be canceled if you __________
    9·2 answers
  • Suppose that the tuition for a university is $10,000 this year and increases 4% every year. In one year, the tuition will be $10
    10·1 answer
  • What is the web of trust
    7·2 answers
  • Blender is used by which video game team member?
    15·1 answer
  • What common variation of the Server Message Block (SMB) sharing protocol is considered to be a dialect of SMB?
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!