Kim+Montgomery


 * Week 7 Study Questions**

Due **Saturday, November 21**

44. Why are classes described as the “blueprint” for program objects? Because each class is physically a separate part of the program 45. What is the difference between a class and an instance? The instance is the actual object created within the class 46. What programming structures do classes contain? A separate code block and a separate file 47. Why do programmers create classes? It is easy to change, test, and expand upon 48. Describe the purpose of a constructor function. It is a reference to a class object


 * Week 6 Study Questions**

Due **Saturday, November 14**

37. What is a function? Performs a task in flash 38. What are the benefits of using functions? method or property has a definition that is shared among all instances of the same class. 39. Define the term parameter / argument. An arguments object is used to store and access a function's arguments. 40. What is meant by event-driven programming? 41. What is an event handler? A function that tells events how to respond. 42. How are event handlers used? 43. What is an event listener? Event listeners start after certain events have taken place

Due **Saturday, November 7**
 * Week 5 Study Questions**

28. Describe and use nested loops. I nested loop is used when you need to get a piece of data from a number of pieces and carry out some processing on each piece REPEAT REPEAT ... UNTIL Inside_Loop_Done UNTIL Outside_Loop_Done

29. Describe and use compound statements. Several statements put together but separated by indentations

30. Use indentation to show program structure. st_count = 0 total_fee = 0 REPEAT INPUT student_name Subject_count = 0 REPEAT

31. List and describe the different kinds of errors that can occur in programs. Syntax errors - this class of error means that a mistake is made in the language used to state the algorithm. Logic errors - the algorithm is syntactically correct but doesn't do what is intended. Data range and data type errors - the algorithm is syntactically correct and logically correct but can be threatened by the wrong kind of data or by values which are out of range.

32. Apply techniques which minimize the impact of errors.
 * 1) Use a trace table to test program flow and the states of variables. This is quite a practical way to test small programs but can become impractical with large and complex programs.
 * 2) Try to test all data values. Again this is practical for small programs but not for programs which process large and diverse amounts of data. The best approach here is to test the data boundaries and we look at that next.

33. Describe what is meant by a sentinel variable. A sentinel or guard value is a value which is used to terminate a loop.


 * Week 4 Study Questions**

Due **Saturday, October 31**

21. Describe what is meant by a program flow chart. Flow charts are a graphical method of designing programs and once the rules are learned are very easy to draw. Uses just two symbols, two decision contructs and two iteration constructs. 22. Sketch and label the symbols and constructs used in flow charts.

23. State the guidelines for drawing flow charts.
 * 1) Every flow chart has a START symbol and a STOP symbol
 * 2) The flow of sequence is generally from the top of the page to the bottom of the page. This can vary with loops which need to flow back to an entry point.
 * 3) Use arrow-heads on connectors where flow direction may not be obvious.
 * 4) There is only one flow chart per page
 * 5) A page should have a page number and a title
 * 6) A flow chart on one page should not break and jump to another page
 * 7) A flow chart should have no more than around 15 symbols


 * Week 3 Study Questions**

Due Saturday, October 24

17. What is pseudocode?

-written way of stating algorithms that uses a much more restricted vocabulary

18. List the pseudocode statements for input, output, iterate, decision, and processing.

-INPUT, READ -DISPLAY new_value -REPEAT statement UNTIL -IF THEN statement ENDIF -ADD, SUBTRACT, COMPUTE, SET

19. Use math, relational, and logical operators in pseudo-code.

-count = count + 22 -count = 51 IF count <= 50 THEN DISPLAY 'Count is less than 51' ENDIF IF count > 50 THEN DISPLAY 'Count is greater than 50' ENDIF -IF (x = = 32) AND (y = = 7) THEN sumxy = x + y


 * Week 2 Study Questions**

Due Saturday, October 17

1. Define the term algorithm.

-a set of rules for solving a problem in a finite number of steps, as for finding the greatest common divisor

2. List the key features of an algorithm.

-sequence -decision -repetition -variables -data types

3. Describe what is meant by a sequence.

-each step or process in the algorithm is executed in the specified order

4. Describe the if...then, and if...then...else constructs.

-the outcome of a decision is based on something that can only result in a true or false value

5. Describe the repeat and while loop constructs.

-repeat loop is used to repeat a process or sequence of processes until a condition becomes true -while loop the decision is made before action begins

6. List three different ways of stating algorithms.

-Step-Form -Pseudocode -Flowchart

7. Explain what is meant by a variable.

-a container for a value which may vary during the execution of the program

8. Give some examples of variables in your everyday life.

-gas tank empty or full

9. What is a datatype?

-data used in algorithms

10. List three datatypes that can be used in algorithms.

11. Explain what is meant by variable naming conventions.

-choose meaningful names for variables to improve the readability of the program

12. Describe a strategy for designing algorithms.

-Step 1: Investigation step

1. Identify the processes 2. Identify the major decisions 3. Identify the loops 4. Identify the variables

-Step 2: Preliminary algorithm step

1. Devise a "high level" algorithm 2. Step through the algorithm. Does this "walk-through" reveal any major problems? If it does correct the problems.

-Step 3: Refining the algorithm step

1. Incorporate any refinements indicated in step 2. 2. Group together processes where appropriate 3. Group together variables where appropriate 4. Test the algorithm again by stepping through it

13. Sketch and briefly explain the software dev. life cycle

-Problem Definition -Problem Analysis -Algorithm Development -Coding and Documentation -Test and Debug -Maintenance

14. Where in the Software Design Life Cycle (SDLC) is the program design activity?

-Phase 3

15. Explain what is meant by the terms variable and process.

-variable is something whose value will change over time -process is an activity which transforms data