Created
August 25, 2020 19:11
-
-
Save SarahNicewander/d57f8cc7b3dc7317fa9570e022c80b60 to your computer and use it in GitHub Desktop.
CommentingOnCodeExercise
This file contains hidden or 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
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. | |
*/ | |
public static void cartValues() { | |
//Assign Values to Variables MinimumCartValue, itemA, itemB, and itemC all of which are type Integers. | |
Integer minimumCartValue = 50; | |
Integer itemA = 10; | |
Integer itemB = 20; | |
Integer itemC = 45; | |
//Assign Value to Variable CartValue which will be the value of itemA + itemB. | |
Integer cartValue = itemA + itemB; | |
//Assign Value to Variable cartMinimumMet. The value will be cartValue >= minimumCartValue | |
Boolean cartMinimumMet = cartValue >= minimumCartValue; | |
//Print Message 'Have we reached the minimum: '+ the value of Variable cartMinimumMet). | |
System.debug('Have we reached the minimum: ' + cartMinimumMet); | |
//CartValue Variable will equal the sum of CartValue and itemC. | |
cartValue = cartValue + itemC; | |
//CartminimumMet Variable Value will be CartValue >= minimumCartValue | |
cartMinimumMet = cartValue >= minimumCartValue; | |
//Print Message 'How about now? : '+ the value of variable cartMinimumMet. | |
System.debug('How about now? : ' + cartMinimumMet); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment