(Master)IPC144 Quiz #2 Notes - Logic ● Structured Program sets of simple constructs each of which have one entry point and one exit point ● Sequence

# (Master)IPC144 Quiz #2 Notes - Logic ● Structured Program...

• 6

This preview shows page 1 - 3 out of 6 pages.

Logic Structured Program : sets of simple constructs, each of which have one entry point and one exit point. Sequence: Simplest example of a structured construct. Code Block: Set of statements enclosed in a pair of curly braces to be executed sequentially. Preliminary Design During design of a programming solution helpful to outline steps involved. 2 Well established techniques: Pseudo-coding: Set of shorthand notes in human language that itemizes key steps in the sequence of instructions that produce a programming solution. Flow charting: set of conventional symbols connected by arrows, illustrate flow of control through programming solution. Selection Constructs: C language supports 3 selection constructs: Optional path Alternative paths Conditional expression See pg 39 of book Optional Path: Ex. if (condition) sequence Simplest selection construct executes sequence only if certain condition is satisfied. Alternate Paths: 2 ways of describing alternate paths: Binary select construct Multiple selection construct Binary Selection: Executes one set of alternative sequences

Subscribe to view the full document.

if (condition) sequence else (condition) sequence Multiple Selection: For 3 or more alternative paths, append an “if else” construct to “else” keyword: Ex. if (condition) sequence else if (condition) sequence else sequence Compound Conditions: Condition in selection construct may be a compound condition Takes form of logical expression i.e. “3>=X && 5-3<=2” Case-by-Case: Case-by-Case Selection Construct: compares a condition, simple/compound,
• Fall '16

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern

Ask Expert Tutors You can ask 0 bonus questions You can ask 0 questions (0 expire soon) You can ask 0 questions (will expire )
Answers in as fast as 15 minutes