William's+page

__IMD230 William's study questions__ 1. )The algorithm is part of the blueprint or plan for the computer program. An effective procedure for solving a problem in a finite number of steps. 2. Algorithms show these three features:

1. Sequence (also known as Process) 2. Decision (also known as Selection) 3. Repetition (also known as Iteration or Looping)

3.)Sequence means that each step or process in the algorithm is executed in the specified order. In the example algorithm above each process must be in the correct place otherwise the algorithm will most probably fail. 4.)In algorithms the outcome of a decision is either true or false, there is no in between. The outcome of the decision is based on some condition that can only result in a true or false value, for example: 5.)The repeat loop is used to iterate or repeat a process or sequence of processes until some condition becomes true. It has the general form:The repeat loop does some processing before testing the state of the proposition, what happens though if in the example above the kettle is already full? If the kettle was already full at the start of the repeat loop then putting more water in will lead to an overflow. 6.) 1. Step-Form 2. Pseudocode 3. Flowchart 4. Nassi-Schneiderman 7.)Just about every algorithm contains data and usually the data is "contained" in a thing called a variable. The variable is a container for a value which may vary during the execution of the program. For example, in our tea-making algorithm the level of water in the kettle is variable, the temperature of the water is variable, the quantity of tea leaves is also variable. 8.)If the kettle does not contain water then fill the kettle. If Water_Level is 0 then fill the kettle 9.)The data used in algorithms can be of different types. The simplest types of data that an algorithm might use are: 10.)* numeric data like 12, 11.45, 901. 11.)It is a good idea to adopt a conventional way of naming variables.don't hide the meaning of the original phrase.words belong together and represent a variable 12.)Step 1: Investigation step,Step 2: Preliminary algorithm step,Step 3: Refining the algorithm step 13.)computer programs, aka software, and software systems, collections of softwares, have quite well-defined life cycles,The need for a program is recognised, the requirements are analysed, a possible solution is designed, the prototype is built and tested, and finally the program is put into use. Figure 1 shows the typical life-cycle for a computer program. 14.)There is a strong connection between phases 2 and 3 since the process of designing a solution to a problem is an iterative process and often involves a great deal of discovery. 15.)A variable is something whose value will change over time. For example daily temperature is a variable. If you measure the room temperature now and measure it one hour from now there is every chance that the two measurements will give different values. In this example the word temperature represents a variable.process is an activity which, in computing terms, transforms data. In general terms a process is an activity which involves some steps designed to achieve a particular outcome. Processes take data, the contents or values of variables, and transform it. 16.)The process of making a sandwich
 * alphabetic or character data like 'A', 'Z' or 'This is alphabetic'.
 * logical data, that is propositions with true/false values.

17. What is pseudocode? //-Pseudocode// is a written statement of an algorithm using a restricted and well-defined vocabulary. 18. List the pseudocode statements for input, output, iterate, decision, and processing. -input = output = 19. Use math, relational, and logical operators in pseudo-code.

20. Use subprocess/subroutines/functions in pseudo-code.

21. Describe what is meant by a program flow chart.

22. Sketch and label the symbols and constructs used in flow charts.

23. State the guidelines for drawing flow charts.

24. Design a program using a flow chart.

25. Use subprocesses in flow charts.

26. Use nested conditionals in flow charts. - 27. Use nested loops in flow charts.

28. Describe and use nested loops.

29. Describe and use compound statements.

30. Use indentation to show program structure.

31. List and describe the different kinds of errors that can occur in programs. -Mis-spelling, undefined variables. Uncreated object. Properties are not defined, Parameter is not passed.

32. Apply techniques which minimize the impact of errors. -Declare our variables, initialize variables and comment code 33. Describe what is meant by a sentinel variable.

34. Use sentinel variables in repeat loops.

35. Describe and use priming in while loops.

36. Use multi-way selection (nested decisions). -Four else loops 37. What is a function?

38. What are the benefits of using functions? -Define once, use many places 39. Define the term parameter / argument. -Function needs something of value to reference, parameter. / ... 40. What is meant by event-driven programming? -Mouse events, objectives and listening events. 41. What is an event handler? -Function that contains the instructions to do, when the event happens. 42. How are event handlers used? Stop and GoToandPlay 43. What is an event listener? -Loader, waiting for action. example (click button) 44. Why are classes described as the “blueprint” for program objects? -Movie clips, button and building blocks creating objects. 45. What is the difference between a class and an instance? -Class used to create multiple objects. Instance is just one version of the class 46. What programming structures do classes contain? -Properties and methods. Properties is a variable, and method is the function. 47. Why do programmers create classes? -To use a object multiple times and have objects working together. 48. Describe the purpose of a constructor function. -Run when a object is created, contains everything you want to happen when the instance is created. 49. Once you create a custom class, how do you use it? -Attach to movie clip, import to time line or document class and also attach it to FLA file itself. 50. What is the classPath? -Path to define that actually class that is being used. Telling flash where to find your documents. 51. Define the terms instantiation, polymorphism, and encapsulation. - instantiation is creating the instance, polymorphism inherits from model or slide show passes as a model and encapsulation is hidden, classes that cant change each other. Keeps certain variables and methods protected.

William Eddy __**Algorithm**__ to making a sandwich 1. identify what a sandwich is 2. identify the Peanut Butter 3. identify the Jelly 4. identify the bread 5. direct attention to opening both Peanut butter and Jelly 6. receive knife from drawer 7. spread peanut butter on one slice of bread 8. spread Jelly on other slice of bread 9. put knife in the sink, to be cleaned 10. close peanut butter jar and put back in cabinet 11. close Jelly jar and put back in cabinet 12. put both slices of bread together making a PB-n-J