A circle is the most perfect shape in the world. At least that's what the roly polies on the 2D planet 2piR think. The roly polies needed a registration program to identify fellow roly polies in the plane. The challenge is that different data is known about various roly polies. Let's help them: create a Circle class with three initializers.
Create a Circle class
- 2
Locked
Comments (13)
- Popular
- New
- Old
You must be signed in to leave a comment
ImDevin
6 April 2021, 01:29
Odd, but technically, colors can be represented with integers, RGB(int, int, int), but it would have to be 3 integers. Guess they're testing to see if we're paying attention and following orders.
+1
Usman Full Stack Developer at QA
30 June 2021, 12:41
That was the first thiing i realised and was about to comment the same haha
0
Guadalupe Gagnon
12 October 2021, 17:50
RGB colors in most programs are described as a number for each of the 3 values or red, blue, and green between 0-255 (or a bits per color). You can have a possible ~17 million unique combinations for those 3 values, which only needs 24 bits in the computers memory to store. An int is 32 bits, which is the logical choice to use for this purpose as it can fully hold any combination of those numbers without running out of space.
0
Eelke 't Hooft
6 March 2020, 10:48
Color being an int should really be specified beforehand.
+3
Brandon Leirer
4 June 2020, 19:04
It does, or at least it does now. I thought it was odd, so I figured I would check here to see if it was an error. Glad I checked.
+1
Sean Nigito
25 August 2020, 16:21
same
+1
kar-fai chow
18 November 2020, 05:30
great minds think alike
0
David Grenier
20 December 2019, 03:14
Why is color an int ahahah
0
Kent Hervey Software Engineer/Consult at Zeal IT ConsultantsExpert
20 October 2019, 02:34
I assume color is a String?
0
Kent Hervey Software Engineer/Consult at Zeal IT ConsultantsExpert
20 October 2019, 02:37
Nope...it is a integer...I guess I can go with that, colors can be numbers
0
Brandon Leirer
4 June 2020, 19:05
Everything is an integer on this blessed day!
+3
Roland Carignan
29 March 2019, 12:15
Should in the specs mention it wants them all to be int's.
+1
Fadi AlSaidi
18 November 2018, 17:45
I am ok with color being int type variable, but shouldn't be String to match the previous quizzes?
+5