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
Tanzania [10]
3 years ago
9

A circle is represented as a set of x and y coordinates of the screen pixel, where the shape of the circle is drawn, and an inte

ger represent the diameter of the circle. Please design and implement the Circle class with. A constructor that take in parameter to initialize the member data fields of the class A method to set the coordinates of the Circle to a different location Give code to create a Circle object
Computers and Technology
1 answer:
Lilit [14]3 years ago
8 0

Answer:

Answered below

Explanation:

//Program is written in Kotlin programming language

Class Circle(xCoordinate: Double, yCoordinate: Double, diameter: Int){

var coordinateX = xCoordinate

var coordinateY = yCoordinate

var circleDiameter = diameter

fun diffLocation(x1: Double, y1: Double){

coordinateX = x1

coordinateY = y1

print (coordinateX, coordinateY)

}

}

//Tester class

Class Main{

fun main( ){

val circle = Circle(2.34, 4.56, 10)

print(circle.coordinateX)

print (circle.coordinateY)

circle.diffLocation( 3.4, 2.8)

}

}

You might be interested in
What was the computer works in binary functions
Mariulka [41]
Computers use binary - the digits 0 and 1 - to store data. A binary digit, or bit , is the smallest unit of data in computing.
7 0
3 years ago
When do I use while loops
Marat540 [252]

Answer:

When you dont know how long the loop is going to run for

Explanation:

7 0
3 years ago
Software (often on firmware) designed to make physical products and devices smarter by doing things like sharing usage informati
saveliy_v [14]

Answer:

Embedded Systems.

Explanation:

Software (often on firmware) designed to make physical products and devices smarter by doing things like sharing usage information, helping diagnose problems, indicating maintenance schedules, providing alerts, or enabling devices to take orders from other systems is referred to as Embedded Systems.

6 0
3 years ago
Technology and Communications Quiz Active 1 Which of the following inventions has had the greatest impact on sound technology? A
liraira [26]

Answer:

B the tape recorder bec half century later made sonorities not only reproducible but also alterable.

6 0
3 years ago
When copper wires are bundled together, they are susceptible to ____________, a form of interference where the signals leak out
maksim [4K]

Answer:

crosstalk

Explanation:

6 0
2 years ago
Other questions:
  • Hen pointing to a tool on the ribbon, a ______ appears, displaying information about the tool.
    7·1 answer
  • Using a loop, write a program that reads in exactly five integers and outputs the sum.
    11·1 answer
  • How did the movie characterized being a genius on real genius movie
    13·2 answers
  • answer for brainliest Today, trending current events are often present on websites. Which of the following early developments in
    15·1 answer
  • Use the line of code below to choose the correct answer
    10·2 answers
  • Why is it difficult to detect a Trojan horse?
    13·2 answers
  • Internet Security: How can you work securely on the internet? What actions should be avoided and what are the pitfalls?
    9·1 answer
  • Tricia is managing tasks that have been assigned to her. She needs to enter mileage information in relation to a project. Which
    5·1 answer
  • The base position for your fingers to be placed on a keyboard is called<br> 2 point
    15·2 answers
  • 4. Each mobile device described in this chapter requires that the user have a/an ____________________ associated with services o
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!