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
public with sharing class WeekSevenHomework { | |
//Assignment: The following method is supposed to create the number of accounts specified in the argument that it takes. | |
//Each Account should be named 'Sample Account #sampleNumber' where sample number is the count. So if you created 2 Accounts | |
//one would be called 'Sample Account 1' and the other 'Sample Account 2' | |
//Also, when we're done inserting them, we will create a case for each one with a Status of 'New', Origin of 'New Account' and the | |
//desription and subject of your choice. | |
//This isn't working quite right. Can you use your debugging skills to fix it? I had to comment it out since it won't compile |
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
public with sharing class WeekSixHomework { | |
// Remember Sets & Maps?? We did a little practice with Lists in week 2, but we need to make sure we know how to use Sets & Maps as well!! | |
public static void setsReview(){ | |
//Your assignment: Play with Sets! | |
// 1. Create a set of Strings and add at least 5 entries | |
Set<String> stringSetLatin = new Set<String>(); | |
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
public with sharing class WeekFiveHomework { | |
//Let's practice calling different methods by writing our very own methods. You will write and save methods in the space below | |
//Note: There are existing pre-written methods at the bottom of this class that you can use to help with your own methods. Ready? Let's go! | |
//Sample: Here is a public method that calls the getCitiesForExpansion below and prints the results to our debug log | |
public static void printOutCitiesForExpansionDemo() { | |
//The code on the left of the equals sign instantiates a list of Strings, the code on the right side calls our method and returns a list of cities | |
//the equals sign assigns the returned value, to the list we created | |
List<String> cities = getCitiesForExpansion(); | |
System.debug('Here are the cities: ' + cities); |
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
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. | |
*/ | |
// The name of the method is called carValues | |
// public is a type of access modifier, which opens up access to the method or variable to all classes residing within the same package namespace. | |
// This means that any class in the same package can interact with these members. |