Essay on Computer Programming and Ctu Female Students

Submitted By GiovannaMiranda1
Words: 573
Pages: 3

PART I When we are given two sets, for example X and Y, there are many set operations that involve X and Y which can produce a new set. When we retrieve records from databases, we would typically start with the search. For example, if we are looking at the Student database for CTU because we want to provide all the females in California with a scholarship opportunity. Once again I remind you this is just an example. First I would conduct a search in my database of the set of students that have their resident address in California; this would be my X set. Then I would search the students who are females. This would be my Y set. “The union consists of all elements belonging to either X or Y (or both).” (Johnsonbaugh, 2009) So in this example, X ∪ Y ={x | x ∈ X or x ∈ Y}, from the records that I have retrieved from the student files the union would include all the CTU female students and all the students that live in California. “The intersection consists of all elements belonging to both X and Y.” (Johnsonbaugh, 2009) This represents the intersection of all the elements belonging to X and Y, X ∩ Y ={x | x ∈ X and x ∈ Y}, in the records that I have retrieved the intersection of all elements that belong to both X and Y would be all the female students that live in California.
PART II When using programing we are able to use logical “OR” in a statement, we are also able to use logical “AND”. When using truth tables we set up all the problems and then write down all the possibilities. When using Logic “OR” either or of the objects must be true on that line in the truth table for that line of code to be true. If both objects are true then the line of code would be the opposite which would be false. Using Logic “AND” in programming when both objects are true , this will make the line of code true as well. If one of the objects is false then this makes the line of code false as well. When programmers are designing a new program they use flowcharts and program coding. When creating a flowchart,