Skip to content

Instantly share code, notes, and snippets.

View danicacodes's full-sized avatar

Danica Jade Rios danicacodes

View GitHub Profile
@danicacodes
danicacodes / Danica Weber HW Week Seven
Created May 1, 2024 00:00
Danica Weber HW Week Seven
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
@danicacodes
danicacodes / Danica Weber HW6
Created April 26, 2024 02:11
Danica Weber HW6
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>();
@danicacodes
danicacodes / Danica Rios HW Week 5
Created April 19, 2024 21:03
Danica Rios HW Week 5
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);
@danicacodes
danicacodes / Danica Rios Weber Week Two Homework
Created March 26, 2024 18:27
Danica Rios Weber Week Two Homework
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.