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
harina [27]
3 years ago
6

Create a class called Circle, which has (i) an attribute radius, (ii) a method that returns the current radius of a circle objec

t, (iii) a method that allows the user to reset the radius of a circle, (iv) a method that calculates the area of the circle, and (v) a constructor that takes a number as parameter input and assign the number as the initial value of radius.
Computers and Technology
1 answer:
nadya68 [22]3 years ago
8 0

Answer:

Explanation:

The following class is written in Java. I created the entire Circle class with each of the methods and constructor as requested. I also created a tester class to create a circle object and call some of the methods. The output can be seen in the attached picture below for the tester class.

class Circle {

   double radius;

   public Circle(double radius) {

       this.radius = radius;

   }

   public double getRadius() {

       return radius;

   }

   public void resetRadius() {

       radius = 0;

   }

   public double calculateArea() {

       double square = Math.pow((Math.PI * radius), 2);

       return square;

   }

}

You might be interested in
Hey system has defined specific Quetion that describe how signals are sent over connections. Which layer of the transmission con
ella [17]

Complete Question:

A system has defined specifications that describe how signals are sent over connections. Which layer of the Transmission Control Protocol/Internet Protocol (TCP/IP) model provides this function?

Group of answer choices.

A. Transport

B. Network

C. Data link

D. Physical

Answer:

A. Transport

Explanation:

Transmission Control Protocol/Internet Protocol (TCP/IP) model is a standard communication protocol used for interconnecting network devices such as routers, switches, host computers and access points over the internet.

A system has defined specifications that describe how signals are sent over connections. The layer of the Transmission Control Protocol/Internet Protocol (TCP/IP) model that provides these functions is the transport layer.

The transport layer comprises of two (2) standard protocols and these are TCP and UDP.

TCP is an acronym for Transmission Control Protocol and it is one of the essential and important protocol of the internet protocol network. This simply means that, it is an essential part of the TCP/IP network. The TCP has a wide range of applications in the following areas, file transfers, world wide web, remote administration, e-mail, etc.

The TCP connection are mainly established in the network using the three-way handshake.

UDP is an acronym for user datagram protocol and it enables the transfer or exchange of data between network devices.

3 0
3 years ago
Write the line of code to calculate the area of a circle with radius 3 and store it in a variable called
zloy xaker [14]

Answer:

area = 2.14 * 3 ** 2

Explanation:

No clue what language you use but this should be pretty universal. To find the area of a circle you use pi(r) ^ 2 or pi times radius squared

\pi r^{2}

In python it looks like this:

>>> area = 3.14 * 3 ** 2

>>> print(area)

28.26<em> <Printed text</em>

3 0
3 years ago
Which types of operating systems execute program independent of the users and generate output within a specific amount of time?
soldi70 [24.7K]
Real-Time Operating System –
These types of OSs serves the real-time systems. The time interval required to process and respond to inputs is very small. This time interval is called response time.

Real-time systems are used when there are time requirements are very strict like missile systems, air traffic control systems, robots etc.

https://www.geeksforgeeks.org/operating-system-types-operating-systems-awaiting-author/
3 0
3 years ago
A ______ connection provides fast internet service and the ability to exchange large files. ​
Degger [83]

Answer:

broadband

Explanation:

A<u> broadband</u> connection  provides fast internet service and the ability to exchange large files. ​

3 0
3 years ago
In addition to developing sketches, computer-aided design programs are used by fashion designers to perform which task?
nikdorinn [45]

Answer:

flat drawing, pattern making development, computerized marker planning and many other fashion designing related aspects.

Explanation:

6 0
2 years ago
Other questions:
  • "what are the problems with tcp over wireless network?"
    15·1 answer
  • Do you think that people have a “right” to remain anonymous online? Why or why not?
    6·1 answer
  • Media messages are communicated through which of the following:
    8·2 answers
  • The number of bits that can be transferred per second over a given transmission medium.
    6·1 answer
  • Brainliest to whoever answers this first, i need help explaining.
    8·1 answer
  • Which of the following could be a constructor for the public class MyClass? a. public MyClass() b. public void MyClass() c. publ
    7·1 answer
  • Compare and contrast two fundamental security design principles in network security. Analyze how these principles and how they i
    15·1 answer
  • Which statement correctly differentiates how to use list and table styles?
    12·2 answers
  • How would you design an adaptive environment for people who are blind?
    10·1 answer
  • Describe accessibility in Windows 7 ​
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!