Logo/

Introduction to Procedural Programming in C++

Log in

Made with ScholarlyMake flashcards like these from your own notes

Introduction to Procedural Programming in C++

Questions and answers

418 cards
  1. Question:What is the primary goal of this programming course in the Philippines syllabus?

    Answer:Explain and implement procedural programs using standard documentation.

  2. Question:Which fundamental programming components are listed in the course outline?

    Answer:Primitive data types, basic computation, simple I/O, conditional/iterative structures, functions/parameters.

  3. Question:What are the five stages of the Program Development Process as per 1.2.1?

    Answer:Analyze the problem; Design algorithm; Implement the algorithm; Test and verify; Maintain and update.

  4. Question:What should students be able to do at the end of the course?

    Answer:Understand programming concepts, define terminology, learn paradigms, apply development steps, design flowcharts/algorithms, predict expression results.

  5. Question:What is the definition of computer programming according to Bebbington in this module?

    Answer:Designing and building an executable program to accomplish a specific computing result.

  6. Question:List tasks involved in programming as described in the module.

    Answer:Analysis, generating algorithms, profiling accuracy/resource use, implementing algorithms.

  7. Question:What language is used in this module for programming?

    Answer:C++.

  8. Question:What is a computer program according to the module?

    Answer:A collection of instructions that performs a specific task when executed.

  9. Question:Who writes computer instructions?

    Answer:Programmers.

  10. Question:What does the term ‘method’ refer to in a typical program?

    Answer:A unit containing commands and statements to perform operations.

  11. Question:Name the historical progression of programming languages discussed.

    Answer:Machine language → assembly language → high-level languages.

  12. Question:What are the two symbols used for machine language in the example?

    Answer:0 and 1.

  13. Question:Why is machine language considered tedious and error-prone?

    Answer:Direct binary coding is complex and requires precision.

  14. Question:What is an assembly language in contrast to machine language?

    Answer:Uses mnemonics instead of binary for instructions.

  15. Question:What is required to convert assembly language to machine code?

    Answer:An assembler.

  16. Question:What does the mnemonic ADD represent in assembly language?

    Answer:Add operation.

  17. Question:What does the mnemonic MUL represent in assembly language?

    Answer:Multiply operation.

  18. Question:What is the role of an assembler?

    Answer:Converts assembly instructions into machine code.

  19. Question:Why is assembly language easier than machine language, yet still tedious?

    Answer:Mnemonics simplify writing, but translation to binary remains complex.

  20. Question:What is the focus of Module 1.2.1.5 in the development process?

    Answer:Maintain and update the program.

  21. Question:What is the meaning of I/O in programming context?

    Answer:Input and Output.

  22. Question:Which basic programming paradigms might students learn according to the objectives?

    Answer:Procedural programming (as implied by the course).

  23. Question:What should be included in designing flowcharts and algorithms?

    Answer:Steps to solve problems and data flow in programs.

  24. Question:How is a test and verify phase described in the development process?

    Answer:Test the program to ensure it meets the specification.

  25. Question:What is the significance of documenting standards and guidelines in programming?

    Answer:Ensures readability, maintainability, and collaboration.

  26. Question:What is meant by ‘defining functions and parameters’ in programming?

    Answer:Creating reusable code blocks with input arguments.

  27. Question:What core educational objective relates to predicting expression results?

    Answer:Understand evaluation order and operator effects.

  28. Question:What is one practical example of programming you might apply as described?

    Answer:Notify an appointment at a specific date/time.

  29. Question:What is meant by the term ‘procedural programming’ in this course?

    Answer:Programming based on procedure calls and sequence of steps.

  30. Question:Which computer programming languages are cited as popular in the module?

    Answer:C++, Visual Basic, C#, Java.

  31. Question:What does “flowchart” help you design in programming?

    Answer:Visual representation of algorithm steps.

  32. Question:What is the general purpose of an algorithm in programming?

    Answer:Provide a step-by-step procedure to solve a problem.

  33. Question:What are the five program development stages listed in the module?

    Answer:Analyze, Design, Implement, Test/Verify, Maintain/Update.

  34. Question:What is the main function of debugging in the development cycle?

    Answer:Identify and fix defects to ensure correct behavior.

  35. Question:What is the relationship between a program and a computer?

    Answer:Program provides instructions that the computer follows.

  36. Question:What is meant by ‘resources consumption’ in algorithm profiling?

    Answer:Time and space (memory) usage.

  37. Question:What does the module suggest about knowledge of programming paradigms?

    Answer:Understand their uses and contexts.

  38. Question:Which phase comes after implementing the algorithm?

    Answer:Test and verify the program.

  39. Question:What is meant by the term ‘simple I/O’?

    Answer:Basic input and output operations.

  40. Question:What types of data are considered primitive in programming?

    Answer:Basic data types like int, float, char.

  41. Question:What is the role of ‘tests and verification’ in ensuring program quality?

    Answer:Ensure the program meets the given specification.

  42. Question:How does the module define ‘analysis’ in problem solving?

    Answer:Understanding the problem requirements and constraints.

  43. Question:What is the significance of understanding programming terminology?

    Answer:Facilitates communication and learning across topics.

  44. Question:What is the scope of Module 1 in the course?

    Answer:Programming concepts and fundamentals.

  45. Question:Which part of the course discusses I/O statements, loops, and branching?

    Answer:Module under Programming Concepts; described in overview.

  46. Question:What is meant by ‘definition of functions and parameters’?

    Answer:Declaring functions and their inputs/arguments.

  47. Question:What does the module imply about testing a program?

    Answer:Verifying correctness against specification.

  48. Question:What is the overall aim of the module’s programming introduction?

    Answer:Equip students to design, implement, test, debug programs.

  49. Question:What historical language development step comes first in the module?

    Answer:Machine languages.

  50. Question:What does the term ‘mnemonics’ refer to in assembly language?

    Answer:Alphabetic abbreviations for instructions.

  51. Question:What is the difference between machine code and assembly language in terms of readability?

    Answer:Machine code is binary; assembly uses mnemonics.

  52. Question:Why do beginners still use assembly despite its complexity?

    Answer:Provides closer control over hardware; stepping-stone to machine code.

  53. Question:Which course code corresponds to Programming 1?

    Answer:COMP 20023.

  54. Question:What does the module suggest about ‘profile[d] algorithms’?

    Answer:Assess accuracy and resource use.

  55. Question:What is meant by high-level languages in the historical progression?

    Answer:Languages closer to human language (e.g., C++, Java).

  56. Question:What is a key skill in the problem-solving process according to the module?

    Answer:Decompose problems into methods or steps.

  57. Question:What is the expected outcome of the module’s learning objectives?

    Answer:Ability to apply development steps and design solutions.

  58. Question:Which section outlines a brief history of programming languages?

    Answer:1.1.1 A brief history of programming languages.

  59. Question:What is the term for the on/off switches in machine language?

    Answer:Bits (0s and 1s).

  60. Question:What is the essential function of a program in everyday devices?

    Answer:Provide instructions to perform tasks.

  61. Question:Which type of content is not included in this module’s focus?

    Answer:Non-educational administrative or policy details.

  62. Question:What is the expected impact of this course on debugging skills?

    Answer:Improve abilities to locate and fix defects.

  63. Question:What is the role of ‘profile algorithms’ accuracy?

    Answer:Evaluate how closely the algorithm achieves its goal.

  64. Question:What is the role of the sequence structure in a computer program?

    Answer:Directs execution of instructions in listed order.

  65. Question:What does a selection structure do in programming?

    Answer:Makes a decision based on a condition and chooses an action.

  66. Question:What is another name for the repetition structure?

    Answer:Loop or iteration.

  67. Question:What is the main focus of object-oriented programming (OOP) compared to procedure-oriented programming?

    Answer:Objects and their use to accomplish goals.

  68. Question:What is code reuse in OOP and why is it advantageous?

    Answer:Using an object in multiple programs with little modification; saves time and money.

  69. Question:Name high-level languages that can support both procedure-oriented and object-oriented programming mentioned in the text.

    Answer:C++, Visual Basic, Java, C#.

  70. Question:What are the six steps in the Program Development Life Cycle (PDLC) as listed?

    Answer:Analyze problem; Design algorithm; Implement algorithm; Test and verify; Maintain and update.

  71. Question:What is the first PDLC step and its core activity?

    Answer:Analyze the problem; understand and identify input/output.

  72. Question:What tool is important during the PDLC’s design/algorithm step?

    Answer:A flow chart.

  73. Question:In PDLC, what does implementation involve?

    Answer:Writing the program source code in a programming language.

  74. Question:During the PDLC, what is meant by the 'object code' mentioned in the text?

    Answer:Executable machine code produced from source code.

  75. Question:What does testing and verification aim to identify in a program?

    Answer:Syntax and logic errors (bugs).

  76. Question:What is the difference between a syntax error and a logic error?

    Answer:Syntax: grammatical mistakes; logic: incorrect results.

  77. Question:What does the maintenance step of PDLC typically involve?

    Answer:Updating the program and documenting changes.

  78. Question:According to the text, what two components are most important when analyzing a problem?

    Answer:The problem’s output and input.

  79. Question:What question should you ask to identify the problem’s output during analysis?

    Answer:What does the user want to see/display on screen or in a file?

  80. Question:In the context provided, what is the user’s tip calculation program required to do first with the bill?

    Answer:Subtract liquor charge from the total bill.

  81. Question:After adjusting for liquor charges, what calculation is performed next for the waiter tip?

    Answer:Calculate the tip on the remainder using a percentage.

  82. Question:What is Treyson Mobley’s requested program supposed to display?

    Answer:The amount to tip a waiter.

  83. Question:What is the overall objective of the program described for Treyson Mobley?

    Answer:Compute and display tip amount after liquor deduction.

  84. Question:What is a common name for the listing of program instructions?

    Answer:Source code.

  85. Question:What is meant by an “object” in object-oriented programming?

    Answer:An independent unit usable in multiple programs.

  86. Question:Why does the PDLC emphasize breaking down the problem?

    Answer:To facilitate designing an effective algorithm.

  87. Question:What does “flow chart” provide in the PDLC?

    Answer:A visual diagram of the program flow.

  88. Question:Which PDLC step involves running and debugging the program?

    Answer:Test and Verify Program.

  89. Question:What does debugging address in software development?

    Answer:Bugs or errors in the program.

  90. Question:What is meant by ‘algorithm’ in this context?

    Answer:A step-by-step procedure to solve the problem.

  91. Question:Which language-related term refers to the machine-understandable form after compilation?

    Answer:Object code.

  92. Question:What is the key outcome of the analysis phase in Treyson’s scenario?

    Answer:Identify input, output, and how they relate to the tip calculation.

  93. Question:In the sequence structure, how are instructions processed?

    Answer:One after another in the listed order.

  94. Question:What must a program user determine during problem analysis besides input and output?

    Answer:How to resolve the problem (the program requirements).

  95. Question:What advantage does object reuse provide in programming as described?

    Answer:Saves time and money by using objects across programs.

  96. Question:What is the definition of a loop in programming terms from the text?

    Answer:Repetition of instructions until a condition is met.

  97. Question:What are the three high-level language examples given for procedure-oriented programs?

    Answer:COBOL, BASIC, C.

  98. Question:Why is the flow chart considered helpful in the PDLC?

    Answer:It helps break down and visualize the problem.

  99. Question:In Treyson’s tip problem, what is subtracted from the total bill before tipping?

    Answer:Liquor charge.

  100. Question:What does the term “listing” refer to in programming?

    Answer:The program's source code.

  101. Question:Which step in PDLC comes after implementing the algorithm?

    Answer:Test and Verify Program.

  102. Question:What happens if the program has syntax errors?

    Answer:Errors prevent the program from running correctly.

  103. Question:What is meant by the term ‘program development life cycle’?

    Answer:A six-step process for designing and maintaining software.

  104. Question:What is the primary focus of object-oriented languages according to the text?

    Answer:Objects and their use to accomplish goals.

  105. Question:What is the final step of the PDLC as listed?

    Answer:Maintain and update the program.

  106. Question:What is the difference between the output and input in problem analysis?

    Answer:Output is what is produced; input is what is used to produce it.

  107. Question:What is the correct sequence directive in a program?

    Answer:Instructions are executed in the order listed.

  108. Question:What is the purpose of step 1 in problem solving as described in the text?

    Answer:Identify output and input from the problem specification.

  109. Question:According to the example, what should Treyson Mobley’s program display?

    Answer:The tip amount.

  110. Question:In the Treyson Mobley problem, what items are needed as input?

    Answer:Total bill, liquor charge, tip percentage.

  111. Question:What is an algorithm, as defined in the text?

    Answer:A step-by-step instruction to accomplish a task.

  112. Question:What does the flowchart primarily depict in programming planning?

    Answer:The logical sequence of instructions.

  113. Question:What are the two main components to identify when analyzing a problem?

    Answer:Output and input.

  114. Question:What is pseudocode?

    Answer:A language-like, English-based representation of an algorithm that machines cannot execute.

  115. Question:Why is pseudocode called 'false code'?

    Answer:Because it resembles programming language instructions but cannot be executed by a computer.

  116. Question:What is the difference between a flowchart and pseudocode?

    Answer:Flowchart uses symbols and flowlines; pseudocode uses written steps.

  117. Question:What do flowchart symbols connect with to show sequence?

    Answer:Flowlines.

  118. Question:What is the output specified for Treyson Mobley’s program?

    Answer:The tip amount.

  119. Question:What is the recommended origin of the algorithm in problem solving?

    Answer:A blueprint-like English description guiding programming tasks.

  120. Question:Which organization is associated with the programming course in the example?

    Answer:Republic of the Philippines.

  121. Question:What is the first step of the IPO (Input-Process-Output) model shown?

    Answer:Input.

  122. Question:What is the second step in the IPO model for Treyson Mobley’s problem?

    Answer:Algorithm (processing).

  123. Question:What is the third step in the IPO model?

    Answer:Output.

  124. Question:What does the term ‘liquor change’ refer to in the problem context?

    Answer:Liquor charge to be subtracted from the total bill.

  125. Question:How is the tip calculated according to the given algorithm?

    Answer:Tip equals (Total bill - Liquor charge) × Tip percentage.

  126. Question:What is meant by ‘item’ or ‘items’ when identifying input?

    Answer:Information needed to compute the output.

  127. Question:In what form can an algorithm be expressed besides English-like steps?

    Answer:Pseudocode and flowchart.

  128. Question:What is one major use of flowcharts in programming?

    Answer:Program documentation and presentation.

  129. Question:What is the main goal of Step 2 – Design the algorithm?

    Answer:Plan the steps to transform input into output.

  130. Question:What is the meaning of ‘liquor charge’ in the problem statement?

    Answer:The charge for liquor on the bill.

  131. Question:What does the term ‘output’ refer to in problem analysis?

    Answer:The result that the user wants to see/display.

  132. Question:In the context given, what does the program primarily compute for Treyson Mobley?

    Answer:The waiter’s tip amount.

  133. Question:What is the significance of a problem’s input according to the text?

    Answer:Information needed to compute the output.

  134. Question:Which part of the document discusses creating a visual diagram of the flow?

    Answer:Step 2 and related sections describing flowcharts.

  135. Question:What is a key benefit of flowcharts as per the text?

    Answer:Visually depict the algorithm’s logical sequence.

  136. Question:What is the typical content of an IPO diagram?

    Answer:Input, processing (algorithm), and output.

  137. Question:What is the role of debugging mentioned in the testing step?

    Answer:Identify and fix syntax and logic errors.

  138. Question:What does the term ‘syntax’ refer to in programming?

    Answer:Grammatical errors in code.

  139. Question:What does the term ‘logic error’ refer to?

    Answer:Incorrect results due to faulty logic.

  140. Question:What is the relationship between problem analysis and algorithm design?

    Answer:Analysis identifies input/output; design creates steps to transform them.

  141. Question:What is the main function of the graphics flowchart symbols?

    Answer:Graphically represent the program’s flow.

  142. Question:What is the meaning of ‘control flow’ in a flowchart?

    Answer:The order in which instructions are executed.

  143. Question:Why is it important to break down a problem into steps?

    Answer:To create a clear, executable algorithm.

  144. Question:What is the expected output in the Treyson Mobley example after processing input?

    Answer:The tip amount displayed.

  145. Question:What type of changes are discussed in the maintenance phase?

    Answer:Updating the program and internal documentation.

  146. Question:What is the characteristic of an effective algorithm in terms of language?

    Answer:English-like and easy to translate into code.

  147. Question:What does the term ‘input’ represent in the problem specification?

    Answer:Information required to achieve the goal.

  148. Question:What is the primary goal of step 4 in the problem-solving process?

    Answer:Test and verify the program by debugging.

  149. Question:What is meant by ‘flowlines’ in flowcharting?

    Answer:Connections that show the sequence of steps.

  150. Question:In the example, what does the tip percentage influence?

    Answer:The final tip amount after subtraction.

  151. Question:What is the relationship between total bill and tip in the algorithm?

    Answer:Tip is computed from the remainder after liquor charge is subtracted.

  152. Question:What is the main topic of the document excerpt?

    Answer:Problem solving process in programming including IPO, pseudocode, and flowcharts.

  153. Question:Which step involves displaying the tip to the user?

    Answer:Step 3: Output (display the tip).

  154. Question:What kind of errors must be eliminated during testing?

    Answer:Syntax and logic errors.

  155. Question:What is the term for a diagram using standardized symbols to depict a process?

    Answer:Flowchart.

  156. Question:What is the final step described in the problem-solving process?

    Answer:Maintain and update the program.

  157. Question:What does the text identify as important for problem-solving components?

    Answer:The output and the input.

  158. Question:What is the benefit of using pseudocode alongside flowcharts?

    Answer:Helps plan algorithms clearly before coding.

  159. Question:What is the initial step in Treyson Mobley's tip calculation algorithm?

    Answer:Enter total bill, liquor charge, tip percentage.

  160. Question:How is totalNoLiquor calculated in the algorithm?

    Answer:totalNoLiquor = totalBill – liquor.

  161. Question:What is the next computation after obtaining totalNoLiquor?

    Answer:tip = totalNoLiquor * tipPercent.

  162. Question:What value does the program display at the end?

    Answer:Tip amount.

  163. Question:Which input variable represents the liquor charge?

    Answer:liquor.

  164. Question:What input does tipPercent represent?

    Answer:Tip percentage.

  165. Question:In pseudocode, what is the operation to get the bill without liquor charge?

    Answer:Subtract liquor charge from total bill.

  166. Question:What type is used for totalBill in the C++ snippet?

    Answer:double.

  167. Question:What type is used for liquor in the C++ snippet?

    Answer:double.

  168. Question:What type is used for tipPercent in the C++ snippet?

    Answer:double.

  169. Question:Which statement prints the final tip value to the user?

    Answer:cout << “Tips: $” << tip << endl;.

  170. Question:What is the purpose of desk-checking the algorithm?

    Answer:Verify correctness and order before coding.

  171. Question:What does the flowchart primarily depict in this context?

    Answer:Procedural steps to compute tip after liquor deduction.

  172. Question:What does totalNoLiquor represent?

    Answer:Total bill excluding liquor charge.

  173. Question:What does the program subtract from the total bill?

    Answer:Liquor charge.

  174. Question:Where is the tip percentage applied?

    Answer:To totalNoLiquor.

  175. Question:Which language is shown for implementing the algorithm besides pseudocode?

    Answer:C++.

  176. Question:What is the overall goal of Treyson Mobley's program?

    Answer:Calculate and display waiter tip after liquor deduction.

  177. Question:What does the term “pseudocode” mean in this document?

    Answer:False code; resembles programming but not executable.

  178. Question:Which figure shows the solution using a flowchart?

    Answer:Figure 11.

  179. Question:Which figure shows the algorithm in pseudocode and its flowchart?

    Answer:Figure 11.

  180. Question:What is the data type used for totalNoLiqour in the Processing section?

    Answer:double.

  181. Question:What is the spelling error present in the variable name totalNoLiqour?

    Answer:Liqour (should be Liquor).

  182. Question:What error appears in output section labeled ‘Outout’?

    Answer:Typo; should be Output.

  183. Question:What is the main educational purpose of Figure 10 in the document?

    Answer:Symbols and functions used in flowcharting.

  184. Question:What does the algorithm do after calculating the tip?

    Answer:Display tip.

  185. Question:What is the relationship between total bill and liquor in the algorithm?

    Answer:Total bill minus liquor equals amount before tip.

  186. Question:What does the phrase ‘desk-check’ refer to?

    Answer:Reviewing algorithm before coding.

  187. Question:What does the instruction Enter total bill, Liquor charge, and Tip percentage precede?

    Answer:The processing steps to compute tip.

  188. Question:Which statement shows user input prompts for the C++ implementation?

    Answer:cout << “Enter the total bill: ”; cin >> totalBill;

  189. Question:What is desk-reading a program’s algorithm called?

    Answer:Desk-check the algorithm

  190. Question:What is the purpose of desk-checking before coding?

    Answer:Verify correctness and order of instructions

  191. Question:What is the term for running a program to find bugs after coding?

    Answer:Debugging

  192. Question:What do you call the process of converting pseudocode into a chosen programming language?

    Answer:Code implementation

  193. Question:In the Treyson Mobley problem, what must be subtracted from the total bill before calculating the tip?

    Answer:Liquor charge

  194. Question:What is calculated after subtracting liquor from total bill?

    Answer:Tip based on the remainder

  195. Question:What data type is used for monetary values in the example inputs?

    Answer:double

  196. Question:What variable stores the total bill before liquor is subtracted?

    Answer:totalBill

  197. Question:Which variable holds the liquor charge amount?

    Answer:liquor

  198. Question:Which variable stores the tip percentage input?

    Answer:tipPercent

  199. Question:What is the local variable for total bill without liquor charge?

    Answer:totalNoLiqour

  200. Question:How is the tip calculated in the example?

    Answer:tip = totalNoLiqour * tipPercent

Showing the first 200 of 418 cards. Open All cards to see the rest.