• CRM Science

Challenge 5: Magic 8 Ball

Dreamforce is next week! Who saw that coming? If you follow us on Twitter (@crmscience), you probably did. #CalendarCube.

Being next week, you might be strategizing when you're going to get your selfie in with SaaSy. With this week's challenge, we wanted to give you a way to wake up in the morning and definitely have an answer for "Will I see SaaSy today?"


You'll be creating a magic 8 ball like method that returns a string. This magic 8 ball, though, only answers one question... "Will I see SaaSy today?" You know, because a Dreamforce without a SaaSy selfie is like eating a cupcake without icing.

Within the method, determine how to randomly select return one of the valid answers.


1) Should be a static method - not strictly an Execute Anonmyous answer this time - see #3

2) The answer selected must be random

3) You should provide some sort of mechanism for ensuring that you don't get the same answer within 3 responses. Feel free to use anything. Extra credit for efficiency! When submitting, add a sentence or two that explains your choice.

Expected Results

One of the provided answers, but not one you received in the last two tries.

a) Answer 1

b) Answer 1 - NO!

a) Answer 1

b) Answer 2

c) Answer 1 - NO!

a) Answer 1

b) Answer 2

c) Answer 3

c) Answer 1 - Ok!

Starter Code

You must use the following code and can only add to the code provided below.

Link to Code: Gist

Submit Your Answers Here

Recent Posts

At CRM Science, we use our Salesforce expertise to transform your enterprise. Partnering with our clients throughout the Salesforce journey, we work with leaders to strategize and optimize business processes, and design and develop solutions across every Salesforce cloud. We help you maximize the value of the Salesforce platform. 

CRM Science is a Salesforce Gold Consulting Partner and a Salesforce.org Impact Partner. Our strategic consulting services were recognized by Salesforce in four consecutive Salesforce Partner Innovation Awards, an annual recognition for partners that deliver outstanding client success. 

Connect with us
Email Us
860 First Ave, Suite 2
King of Prussia, PA 19406
(484) 775-0333
  • Twitter
  • Facebook
  • YouTube

Copyright © 2011-2021 CRM Science, Inc. All rights reserved.