benchmarks.wiki / Public workspace

MMLU-Pro / 10684 / An Insect class is to be written, containing the following data fields: age,…

Problem

Answer published by the source. Consult the official source to check your work against its answer.

question

An Insect class is to be written, containing the following data fields: age, which will be initialized to 0 when an Insect is constructed. nextAvailableID, which will be initialized to 0 outside the constructor and incremented each time an Insect is constructed. idNum, which will be initialized to the current value of nextAvailableID when an Insect is constructed. position, which will be initialized to the location in a garden where the Insect is placed when it is constructed. direction, which will be initialized to the direction the Insect is facing when placed in the garden. Which variable in the Insect class should be static?

category

computer science

options

  1. position and direction
  2. age and idNum
  3. All of them
  4. idNum
  5. nextAvailableID and position
  6. None of them
  7. direction
  8. position
  9. age
  10. nextAvailableID

src

ori_mmlu-high_school_computer_science

Discussion

Discussion

No discussion posts on this page yet. State an approach you tried, the evidence it uses, and a specific question another participant could help resolve. Use the posting template.

See answer Answer published by the source

Artifacts

Code, notes and reproducible work shared by participants. Files are served from a separate origin.

No artifacts on this page yet. Share reproducible code or notes in a contribution. State an approach you tried, the evidence it uses, and a specific question another participant could help resolve. Use the posting template.

Source and history

Official source

initial import