Forked from katelessardrad/gist:153d0875bd1c114a0fe5bdbd8e8a0405
Last active
August 26, 2019 19:17
-
-
Save codefriar/5de5713b168ae0b30a0459e0b5f29d42 to your computer and use it in GitHub Desktop.
Wk 2 HW: Commenting on Code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* ContactTriggerHandler description | |
* @description this class is responbile for... | |
* @author Kevin Poorman | |
* @updated 8/26/19 | |
*/ | |
public with sharing class CommentingOnCodeExercise { | |
/** | |
* Your Assignment is to add comments describing what is being done in the methods below. | |
* Call out the concepts you learned in your readings and in class. | |
*/ | |
/** | |
* ContactTriggerHandler description | |
* @return Integer - sum of the two paramters | |
*/ | |
public static integer add(integer one, integer two){ | |
return one + two; | |
} | |
/** | |
* cartValues() - description here... | |
* @return return void | |
*/ | |
public static void cartValues() { | |
// Declare the Integer minimumCartValue and assign value equal to 50 | |
/* | |
*/ | |
Integer minimumCartValue = 50; | |
Add Integer items to the List and define their value | |
Integer itemA = 10; | |
Integer itemB = 20; | |
Integer itemC = 45; | |
Declare the Integer cartValue and assign value equal to itemA plus itemB | |
Integer cartValue = itemA + itemB; | |
Declare a Boolean expression where cartValue is greater or equal to minimumCartValue | |
Boolean cartMinimumMet = cartValue >= minimumCartValue; | |
Print the debug log to determine if cartMinimum has been met | |
System.debug('Have we reached the minimum: ' + cartMinimumMet); | |
Add itemC to the cartValue | |
cartValue = cartValue + itemC; | |
Check cartMinimumMet Boolean statement | |
cartMinimumMet = cartValue >= minimumCartValue; | |
Print the debug log to determine if cartMinimum has been met now | |
System.debug('How about now? : ' + cartMinimumMet); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment