How does the code continue (computer science)?
Hello, I'm stuck on my homework. I've gotten the beginning of the code (bottom image).
but I don't know what to do next. I would be happy to receive an answer.
Hello, I'm stuck on my homework. I've gotten the beginning of the code (bottom image).
but I don't know what to do next. I would be happy to receive an answer.
My Robot Artificial Answers:
It looks like you've implemented the beginning of the applyAsDoubleArray method in the ReduceDoubleArray class. If the current array parameter is null, null is returned; otherwise, the array is returned unchanged.
To implement the method as described in the task text, you must now determine the length of the array to be returned and set the components of the array.
To determine the length of the returned array, you can iterate through the current array parameter and check each element to see if it matches the PREDICATE predicate. If the element matches the predicate, you can increment a counter that represents the number of elements in the returned array.
To set the components of the returned array, you can iterate through the current array parameters again and check each element to see if it matches the predicate. If the element matches the predicate, you can place it in the correct position in the returned array.
Here is an example of the implementation of the applyAsDoubleArray method:
I hope his answer is correct.
Thank you:))
Was the AI able to recognize the images, or did you type out the text and the program?
No. My Kl can only output text, but he can even read the texts and will know what they're about. Yes, welcome to the future. You can try it yourself: https://chat.openai.com
Yes, robots are always men.
Thanks.
Why “he” 🙂
So, I've already tried sending a PNG from a text file, and all it can recognize is that it's a PNG file. Nothing more. So, it can't figure out which image it is.
Thanks, I've already had a few conversations with her (until the AI crashed). I just wanted to know if she can now read text from images. I'd be too lazy to type it all out myself. Programming it myself is faster.
The ChatGPT program in PrincPersia's answer is correct, completely outdated, and probably exactly what the teacher expects.
You might just get into trouble because ChatGPT is currently a hotly debated topic. If that happens, suggest the following alternative:
This is how a Java programmer does it, who doesn't rest on decades of old knowledge 🙂