Well I'm confused exactly what with set theory you need help with. It's a very broad topic. Is this for a discrete math course?

Basically, a set consists of elements that can represent anything. You could have the set of letters in the alphabet, a set of 10 random numbers, etc. Sets are the foundation of probability.

For example, a classic question is, what is the probability of rolling a 2 on a fair die? The sample set is the set of all numbers that possibly could be rolled ... S = {1, 2, 3, 4, 5, 6}. The number 2 only appears once in the sample set, meaning that the probability of rolling a 2 is 1 out of 6 (1/6th). Now what is the probability of rolling a number greater than 4 on a fair die? Out of the sample set, this can be either a 5 or a 6. Therefore, the answer is 2 out of 6 (1/3rd).

The most intuitively apparent place set theory is exposed though is in Databases (pretty much all of Database theory is set theory).Digital logic is another more specific subject where you will notice set theory the most.

But if you examine things a bit more closely you can see set theory in other aspects of computer science (as well as in the real world). In general programming, it can be argued that set theory is applied anytime you perform an if-then statement, or similar inclusion/exclusion operator. For example, "If 9 is in {2,4,5,7,9,13} then do this".

i am creating an app with android studio and i'm using mySQL.and i want to implement friends feature in my app to enable users send and recieve friend requests, i ...

public class Gradesv2
{
public static void main(String[ ] args)
{
//local variables
int numTests = 0; //counts number of tests
int testgGrades = 0; //individual test grade
int totalPoints ...