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]
2 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]2 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
How to print something nad input on same line python
Serhud [2]
To get everything on one line with two inputs is not (easily) achievable, as far as I know. The closest you can get is: print 'I have', a=input() print 'apples and', p=input() print 'pears. '
7 0
2 years ago
Create a program to calculate the wage. Assume people are paid double time for hours over 60 a week. Therefore they get paid for
Rus_ich [418]

Answer:

Written in Python

name = input("Name: ")

wageHours = int(input("Hours: "))

regPay = float(input("Wages: "))

if wageHours >= 60:

->total = (wageHours - 60) * 2 * regPay + 20 * 1.5 * regPay + regPay * 40

else:

->total = wageHours * regPay

print(name)

print(wageHours)

print(regPay)

print(total)

Explanation:

The program is self-explanatory.

However,

On line 4, the program checks if wageHours is greater than 60.

If yes, the corresponding wage is calculated.

On line 6, if workHours is not up to 60, the total wages is calculated by multiplying workHours by regPay, since there's no provision for how to calculate total wages for hours less than 60

The required details is printed afterwards

Note that -> represents indentation

4 0
3 years ago
Determina la cilindrada total Vt en un motor de 4 cilindres de 83,6 mm de diàmetre per 91 mm de cursa.
insens350 [35]

Answer:

La cilindrada total del motor es de 1997,025 centímetros cúbicos.

Explanation:

Para determinar la cilindrada total Vt en un motor de 4 cilindros de 83,6 mm de diámetro por 91 mm de carrera se debe realizar el siguiente cálculo, sabiendo que para calcular la cilindrada de un motor se debe utilizar la fórmula ((Pi x Diámetro^2)/4) x Carrera x Número de cilindros = X:

((3.14 x 83.6^2)/4) x 91 x 4 = X

((3.14 x 6,988.96)/4) x 364 = X

(21,945.3344 / 4) x 364 = X

5,486.3336 x 364 = X

1,997,025.4304 = X

1 milímetro cúbico = 0.001 centímetro cúbico

1,997,025.4304 milímetros cúbicos = 1997.0254304000005 centímetros cúbicos

Por lo tanto, la cilindrada total del motor es de 1997,025 centímetros cúbicos.

3 0
3 years ago
Drag each tile to the correct box.
V125BC [204]

Answer:

Creates order and harmony → <em>color</em>

Creates an emotional impact → <em>texture</em>

Brings a feeling of depth to a design →<em> form</em>

Draws or minimizes attention → <em>space</em>

Divides space and redirects the eye → <em>shape</em>

Explanation:

The visual element that creates order and harmony is <em>color</em>

Color can be used to create visible patterns that can be recognized as being in harmony or disagreement

The visual element that creates emotional impact is <em>texture</em>

Texture can be used to convey either the emotions of the object or the artist

The visual element that brings a feeling of depth to a design is<em> form</em>

Form is used to present a 3-D appearance of an art, and therefore, it is used to show depth of a 2-D drawing

The visual element that draws or minimizes attention is <em>space</em>

The arrangement, location, and size of the space occupied by an object can be used to draw or minimize attention

The visual element that divides space and redirects the eye is <em>shape</em>

Shape is used to divide space into areas easily recognizable by the eye

5 0
2 years ago
What is the best free game designing program for windows
Nadusha1986 [10]
Python, Unity 3D, C++Notepad
8 0
3 years ago
Other questions:
  • Being tired has very similar effects on the body as what
    7·1 answer
  • If Johanna wants to label the x- and y-axes in Excel she should click Layout, then what?
    12·1 answer
  • Help me out with this .....
    10·1 answer
  • ap csp The local, remote, and upstream _______ can each have multiple ___ _____. When a participant in a collaborative group on
    5·1 answer
  • .What particular skills does a team leader need in addition to the other skills needed by any team member. (choose all that appl
    6·1 answer
  • Which graph is the solution to the system 2x – 3 and y &lt; 2x + 4?
    5·2 answers
  • Who watches Riverdale ? if you do can we be friends(pLEASE DON'T DELETE) and also who is your fav character from Riverdale
    8·2 answers
  • Write an application named Hurricane that outputs a hurricane’s category based on the user’s input of the wind speed. Category 5
    7·1 answer
  • Pls say correct guyz pls pls pls
    7·1 answer
  • Dynamics
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!