Logic and Design Principles Exam Answer Key - 350 Verified Questions

Page 1


Logic and Design Principles

Exam Answer Key

Course Introduction

Logic and Design Principles introduces students to the foundational elements of logical reasoning and systematic decision-making essential for effective problem-solving in various fields, especially computer science and engineering. The course covers concepts such as propositional and predicate logic, truth tables, logical inference, and proof strategies, alongside the study of structural design principles including modularity, abstraction, and hierarchy. Students will learn to apply logical frameworks to analyze problems, design algorithms, and validate solutions, as well as understand how robust design principles guide the creation of efficient, maintainable, and reliable systems. Through a mix of theoretical exploration and practical exercises, students will develop critical skills to approach complex challenges in a structured and logical manner.

Recommended Textbook

Just Enough Programming Logic and Design 2nd Edition by Joyce Farrell

Available Study Resources on Quizplus

7 Chapters

350 Verified Questions

350 Flashcards

Source URL: https://quizplus.com/study-set/2426 Page 2

Chapter 1: An Overview of Computers and Logic

Available Study Resources on Quizplus for this Chatper

50 Verified Questions

50 Flashcards

Source URL: https://quizplus.com/quiz/48218

Sample Questions

Q1) A program that is free of syntax errors will produce the correct results.

A)True

B)False

Answer: False

Q2) ____ a program is when a programmer can execute the program with some sample data to see whether the results are logically correct.

A) Planning

B) Coding

C) Maintaining

D) Testing

Answer: D

Q3) A(n)____ is the sequence of steps necessary to solve any problem.

A) algorithm

B) pseudocode list

C) rhythm

D) problem statement

Answer: A

To view all questions and flashcards with answers, click on the resource link above. Page 3

Chapter 2: Understanding Structure

Available Study Resources on Quizplus for this Chatper

50 Verified Questions

50 Flashcards

Source URL: https://quizplus.com/quiz/48219

Sample Questions

Q1) In a structured program,structures can be stacked or connected to one another only at their start or exit points.

A)True

B)False

Answer: True

Q2) Write structured pseudocode to show the following: when you are on time for work you have time to buy coffee.

Answer: if on time for work then buy coffee endif

Q3) Years ago,programmers could avoid using structure by inserting a ____ statement into their pseudocode.

A) go to B) go sub C) branch

D) jump

Answer: A

To view all questions and flashcards with answers, click on the resource link above.

Page 4

Chapter 3: Making Decisions

Available Study Resources on Quizplus for this Chatper

50 Verified Questions

50 Flashcards

Source URL: https://quizplus.com/quiz/48220

Sample Questions

Q1) ____ are diagrams used in mathematics and logic to help describe the truth of an entire expression based on the truth of its parts.

A) Truth diagrams

B) Truth matrix

C) Truth tables

D) Logic diagrams

Answer: C

Q2) Many programming languages allow you to use ____ to correct your logic when using ANDs and ORs and force the OR expression to be evaluated first.

A) parentheses

B) braces

C) underscores

D) brackets

Answer: A

Q3) Write structured pseudocode to fix this statement: if hourlyWage > 8.50 and < 15.80 then

Answer: if hourlyWage > 8.50 and hourlyWage < 15.80 then

To view all questions and flashcards with answers, click on the resource link above. Page 5

Chapter 4: Looping

Available Study Resources on Quizplus for this Chatper

50 Verified Questions

50 Flashcards

Source URL: https://quizplus.com/quiz/48221

Sample Questions

Q1) Reports that include some output for every input record are ____ reports.

A) summary

B) detail

C) executive

D) running total

Q2) The following pseudocode is not working properly.The message should display five times.This is not working because the programmer made which common loop mistake? Declarations

Num count

String message = "OK"

While count < 5

Output message

Count = count + 1

Endwhile

A) Neglecting to initialize the loop control variable

B) Neglecting to alter the loop control variable

C) Using the wrong comparison with the loop control variable

D) Including statements inside the loop that belong outside the loop

Q3) Name three common mistakes that programmers make when programming with loops.

Q4) Write the logic for a program that outputs every even number from 2 through 16.

To view all questions and flashcards with answers, click on the resource link above. Page 6

Chapter 5: Arrays

Available Study Resources on Quizplus for this Chatper

50 Verified Questions

50 Flashcards

Source URL: https://quizplus.com/quiz/48222

Sample Questions

Q1) When working with arrays,you can use ____ in two ways: to hold an array's size and as the array values.

A) structures

B) literals

C) constants

D) strings

Q2) If you assume an array's first subscript is 0,you will always be "off by one" in your array manipulation.

A)True

B)False

Q3) You cannot initialize array elements when you declare the array.

A)True

B)False

Q4) A ____ search starts looking in the middle of a sorted list,and then determines whether it should continue higher or lower.

A) linear

B) quick

C) graphic

D) binary

To view all questions and flashcards with answers, click on the resource link above. Page 7

Chapter 6: Using Methods

Available Study Resources on Quizplus for this Chatper

50 Verified Questions

50 Flashcards

Source URL: https://quizplus.com/quiz/48223

Sample Questions

Q1) ____ variables and constants are those that are known to the entire program.

A) Global

B) Local

C) Universal

D) Portable

Q2) Programmers use the term ____ to describe any extra time and resources required by an operation.

A) overage

B) overhead

C) overburden

D) excess

Q3) Methods are considered ____,that is,they can more easily be transported to and reused by multiple programs when variables and constants are declared within the methods that use them.

A) efficient

B) moveable

C) reliable

D) portable

Q4) List two occasions when you might consider declaring variables and constants globally.

To view all questions and flashcards with answers, click on the resource link above. Page 8

Chapter 7: Object-Oriented Programming

Available Study Resources on Quizplus for this Chatper

50 Verified Questions

50 Flashcards

Source URL: https://quizplus.com/quiz/48224

Sample Questions

Q1) Each object's features are separate or ____ from all others.

A) refined

B) abstracted

C) encapsulated

D) insulated

Q2) Rewrite the following pseudocode making the appropriate corrections. start Declarations

Employee myAssistant myAssistant.setName("Reynolds") myAssistant.setPayRate = 16.75 output "My assistant ",Employee.getName(), " makes ",Employee.getPayRate(), " per hour" stop

Q3) Identify an object that might belong to the Automobile class:

A) string name

B) num price

C) Toyota

D) jet

To view all questions and flashcards with answers, click on the resource link above. Page 9

Turn static files into dynamic content formats.

Create a flipbook