nerdexam
Salesforce

CRT-450 · Question #239

A developer wrote the following two classes: The StatusFetcher class successfully compiled and saved. However, the Calculator class has a compile time error. How should the developer fix this code?

The correct answer is B. Make the isActive method in the StatusFetcher class public. See the full explanation below for the reasoning.

Question

A developer wrote the following two classes:

The StatusFetcher class successfully compiled and saved. However, the Calculator class has a compile time error. How should the developer fix this code?

Exhibit

CRT-450 question #239 exhibit

Options

  • AChange the class declaration for the statusFetcher class to public with inherited sharing.
  • BMake the isActive method in the StatusFetcher class public.
  • CMake the doCalculations method in the Calculation class private.
  • DChange the class declaration for the Calculator class to public with inherited sharing.

How the community answered

(43 responses)
  • A
    14% (6)
  • B
    77% (33)
  • C
    7% (3)
  • D
    2% (1)

Community Discussion

No community discussion yet for this question.

Full CRT-450 Practice