PLF – Program Design Assignment

PLF – Program Design Assignment Words: 676

In CLIO, if you enter search terms without an operator, AND will automatically be inserted between them (but make sure that Javascript is enabled on your computer, or the search will fail). OR The operator OR broadens the search to include records containing either keyword, or both. The OR search is particularly useful when there are several common synonyms for a concept, or variant spellings of a word. Examples: adolescent or teen? Divided or “middle ages” Virgil or Virgil NOT Combining search terms with the NOT operator narrows the search by excluding unwanted terms. These Venn diagrams help to visualize the meaning of AND, OR and NOT; the colored area indicates the items that will be retrieved in each case. AND moths AND butterflies You want to find books that are about both moths AND butterflies OR moths OR butterflies You want to find books that are about moths, books that are about butterflies, and books that discuss both: OR means MORE. Tots NOT butterflies You want to find books that are about moths, but EXCLUDE those that discuss butterflies Variable Types Following table gives you details about standard integer types with its storage sizes ND value ranges: Type Storage size Value range String 1 byte Letters and other special characters 2 or 4 bytes -32,768 to 32,767 or to short 2 bytes -32,768 to 32,767 long 4 bytes to Floating-Point Types Following table gives you details about standard floating-point types with storage sizes and value ranges and their precision: Type Precision float 4 byte 1. E-38 to 3. E+38 6 decimal places double 8 byte 2. 3+308 to 1. E+308 15 decimal places long double 10 byte 3. 4+4932 to 1. 1 E+4932 19 decimal places Variables A variable is a symbolic name for (or reference to) information. The variable’s impressments what information the variable contains. They are called variables because the represented information can change but the operations on the variable remain the same. In general, a program should be written with “Symbolic” notation, such that a statement slipways true symbolically.

For example if I want to know the average of two grades, We can write “average = (grade_l + grade_2) / 2. 0;” and the variable average will then contain the average grade regardless of the scores stored in the variables, grade_l and grade_2. There are only a few things you can do with a variable: . Create one (with a nice name). A variable should be named to represent all possible values that it might contain. Some examples are: midterm_score, midterm_scores, data_points, course_name, etc. 2.

Don’t waste your time!
Order your assignment!


order now

Put some information into it (destroying whatever was there before). We “put” information into a variable using the assignment operator, e. G. , midterm_score = 93; 3. Get a copy of the information out of it (leaving a copy inside) We “get” the information out by simply writing the name of the variable, the computer does the rest for us, e. G. , average = (grade_l + grade_2) / 2. Variable Properties There are 6 properties associated with a variable. The first three are very important as you start to program.

The last three are important as you advance and improve your skills (and the complexity of the programs you are creating). 1. Name 2. Type 3. Value Clarification of Properties 1. Name The name is Symbolic. It represents the “title” of the information that is being stored with the variable. The name is perhaps the most important property to the programmer, because this is how we “access” the variable. Every variable must have a unique name 2. Type The type represents what “kind” of data is stored with the variable. . Value A variable, by its very name, changes over time. Thus if the variable is Jims_age and is assigned the value 21 . At another point, Jims_age may be assigned the value 27. Most of the time, when you “create a variable” you are primarily defining the variables name and type. Often (and the best programming practice) you will want to provide an initial value to be associated with that variable name. If you forget to assign an initial value, then various rules “kick in” depending on the language. Legal Variable

How to cite this assignment

Choose cite format:
PLF - Program Design Assignment. (2019, Apr 10). Retrieved December 23, 2024, from https://anyassignment.com/samples/plf-program-design-2759/