All Matches
Solution Library
Expert Answer
Textbooks
Search Textbook questions, tutors and Books
Oops, something went wrong!
Change your search query and then try again
Toggle navigation
FREE Trial
S
Books
FREE
Tutors
Study Help
Expert Questions
Accounting
General Management
Mathematics
Finance
Organizational Behaviour
Law
Physics
Operating System
Management Leadership
Sociology
Programming
Marketing
Database
Computer Network
Economics
Textbooks Solutions
Accounting
Managerial Accounting
Management Leadership
Cost Accounting
Statistics
Business Law
Corporate Finance
Finance
Economics
Auditing
Ask a Question
Search
Search
Sign In
Register
study help
computer science
programming logic & design
Questions and Answers of
Programming Logic & Design
What is output by each of the pseudocode segments in Figure 5-30? a. b. с. a = 1 b - 2 C - 5 while a < c a = a + 1 b = b + c endwhile output a, b, c e = 6 f - 7 while d > f d - d + 1 e = e - 1
A do-while loop _______________.a. Has a body that might never executeb. Is a type of pretest loopc. Can be replaced by a sequence and a while loopd. Is not structured, and therefore obsolete
A variable might hold an incorrect value even when it is _______________.a. The correct data typeb. Within a required rangec. A constant coded by the programmerd. All of the above
To ensure that a user’s entry is the correct data type, frequently you _______________.a. Prompt the user to verify that the type is correctb. Use a method built into the programming languagec.
Overriding a user’s entered value by setting it to a predetermined value is known as _______________.a. Forcingb. Accumulatingc. Validatingd. Pushing
When you _______________, you make sure data items are the correct type and fall within the correct range.a. Validate datab. Employ offensive programmingc. Use object orientationd. Count loop
After an accumulator or counter variable is displayed at the end of a program, it is best to _______________.a. Delete the variable from the programb. reset the variable to 0c. Subtract 1 from the
In this chapter you learned that some of the tasks assigned to new programmers frequently involve maintenance—making changes to existing programs because of new requirements. A file named
A mobile phone app allows a user to press a button that starts a timer that counts seconds. When the user presses the button again, the timer stops. Draw a flowchart or write pseudocode that accepts
Research current rates of monetary exchange. Draw a flowchart or write pseudocode to represent the logic of a program that allows the user to enter a number of dollars and convert it to Euros and
a. Draw a flowchart or write pseudocode to represent the logic of a program that allows the user to enter an hourly pay rate and hours worked. The program outputs the user’s gross pay.b. Modify the
Draw a flowchart or write pseudocode to represent the logic of a program that allows the user to enter values for the current year and the user’s birth year. The program outputs the age of the user
Draw a flowchart or write pseudocode to represent the logic of a program that allows the user to enter two values. The program outputs the sum of and the difference between the two values.
Draw a flowchart or write pseudocode to represent the logic of a program that allows the user to enter a value for hours worked in a day. The program calculates the hours worked in a five-day week
Draw a flowchart or write pseudocode to represent the logic of a program that allows the user to enter a value for one edge of a cube. The program calculates the surface area of one side of the cube,
Draw a flowchart or write pseudocode to represent the logic of a program that allows the user to enter a value. The program multiplies the value by 10 and outputs the result.
In your own words, describe the steps to writing a computer program.
Match the definition with the appropriate term.1. Computer system devicesa. compiler2.Another word for programb.syntax3.Language rulesc.logic4.Order of instructionsd.hardware5.Language
As compared to procedural programming, with object-oriented programming, ____________.a. The programmer’s focus differsb. You cannot use some languages, such as Javac. You do not accept inputd. You
When you write a program that will run in a GUI environment as opposed to a command-line environment, ____________.a. The logic is very differentb. Some syntax is differentc. You do not need to plan
When you use an IDE instead of a simple text editor to develop a program, ____________.a. The logic is more complicatedb. The logic is simplerc. The syntax is differentd. Some help is provided
The term eof represents ____________.a. A standard input deviceb. A generic sentinel valuec. A condition in which no more memory is available for storaged. The logical flow in a program
In flowcharts, the decision symbol is a ____________.a. Parallelogramb. Rectanglec. Lozenged. Diamond
In a flowchart, a rectangle represents ____________.a. Inputb. A sentinelc. A questiond. Processing
The parallelogram is the flowchart symbol representing ____________.a. Inputb. Outputc. Either a or bd. None of the above
Which of the following is an example of a logical error?a. Performing arithmetic with a value before inputting itb. Accepting two input values when a program requires only onec. Dividing by 3 when
Which of the following is an example of a syntax error?a. Producing output before accepting inputb. Subtracting when you meant to addc. Misspelling a programming language wordd. All of the above
An English-like programming language such as Java or Visual Basic is a ________ programming language.a. Machine-levelb. Low-levelc. High-leveld. Binary-level
Writing a program in a language such as C++ or Java is known as _______ the program.a. Translatingb. Codingc. Interpretingd. Compiling
The two most commonly used tools for planning a program’s logic are _____.a. ASCII and EBCDICb. Java and Visual Basicc. Flowcharts and pseudocoded. Word processors and spreadsheets
A programmer’s most important task before planning the logic of a program is to ____________.a. Decide which programming language to useb. Code the problemc. Train the users of the programd.
Which of the following pairs of steps in the programming process is in the correct order?a. Code the program, plan the logicb. Test the program, translate it into machine languagec. Put the program
Which of the following is temporary, internal storage?a. CPUb. Hard diskc. Keyboardd. Memory
The most important task of a compiler or interpreter is to ____________.a. Create the rules for a programming languageb. Translate English statements into a language such as Javac. Translate
A programming language’s rules are its ____________.a. Syntaxb. Logicc. Formatd. Options
Visual Basic, C++, and Java are all examples of computer ____________.a. Operating systemsb. Programming languagesc. Hardwared. Machine languages
The major computer operations include ____________.a. Input, processing, and outputb. Hardware and softwarec. Sequence and loopingd. Spreadsheets, word processing, and data communications
Computer programs also are known as____________.a. Datab. Hardwarec. Softwared. Information
Typically, the value added to a counter variable is _______________.a. 0b. 1c. The same for each iterationd. Different in each iteration
A report that lists only totals, with no details about individual records, is a(n) _______________ report.a. Accumulatorb. Finalc. Groupd. Summary
Most programmers use a for loop _______________.a. For every loop they writeb. When they know the exact number of times a loop will repeatc. When a loop must repeat many timesd. When a loop will not
When loops are nested, _______________.a. They typically share a loop control variableb. One must end before the other beginsc. Both must be the same type—definite or indefinited. None of the above
When two loops are nested, the loop that is contained by the other is the _______________loop.a. Captiveb. Unstructuredc. Innerd. Outer
Which of the following is an indefinite loop?a. A loop that executes exactly 10 timesb. A loop that follows a prompt that asks a user how many repetitions to make and uses the value to control the
Which of the following is a definite loop?a. A loop that executes as long as a user continues to enter valid datab. A loop that executes 1,000 timesc. Both of the aboved. None of the above
Adding 1 to a variable is also called _______________ it.a. Digestingb. Resettingc. Decrementingd. Incrementing
A counter keeps track of _______________.a. The number of times an event has occurredb. The number of machine cycles required by a segment of a programc. The number of loop structures within a
The statements executed within a loop are known collectively as the _______________.a. Loop bodyb. Loop controlsc. Sequencesd. Sentinels
Which of the following is not a step that must occur with every correctly working loop?a. Initialize a loop control variable before the loop starts.b. Compare the loop control value to a sentinel
The loop that frequently appears in a program’s mainline logic _______________.a. Always depends on whether a variable equals 0b. Is an example of an infinite loopc. Is an unstructured loopd. Works
The structure that allows you to write one set of instructions that operates on multiple, separate sets of data is the _______________.a. Sequenceb. Loopc. Selectiond. Case
Create a lottery game application. Generate three random numbers, each between 0 and 9. Allow the user to guess three numbers. Compare each of the user’s guesses to the three random numbers and
In Chapter 2, you learned that many programming languages allow you to generate a random number between 1 and a limiting value named limit by using a statement similar to randomNumber =
Your downloadable files for Chapter 4 include a file named DEBUG04-04.jpg that contains a flowchart with syntax and/or logical errors. Examine the flowchart and then find and correct all the bugs.
Your downloadable files for Chapter 4 include DEBUG04-01.txt, DEBUG04-02.txt, and DEBUG04-03.txt. Each file starts with some comments that describe the problem. Comments are lines that begin with two
A file named MAINTENANCE04-01.jpg is included with your downloadable student files. Assume that this program is a working program in your organization and that it needs modifications as described in
10. Black Dot Printing is attempting to organize carpools to save energy. Each input record contains an employee’s name and town of residence. Ten percent of the company’s employees
Mark Daniels is a carpenter who creates personalized house signs. He wants an application to compute the price of any sign a customer orders, based on the following factors:The minimum charge for all
The Barking Lot is a dog day care center. Design a flowchart or pseudocode for following:a. A program that accepts data for an ID number of a dog’s owner, and the name, breed, age, and weight of
The Drive-Rite Insurance Company provides automobile insurance policies for drivers. Design a flowchart or pseudocode for following:a. A program that accepts insurance policy data, including a policy
The Dash Cell Phone Company charges customers a basic rate of $5 per month to send text messages. Additional rates are as follows:The first 100 messages per month, regardless of message length, are
ShoppingBay is an online auction service that requires several reports. Data for each auctioned item includes an ID number, item description, length of auction in days, and minimum required bid.
Cecilia’s Boutique wants several lists of salesperson data. Design a flowchart or pseudocode for the following: a. A program that accepts one salesperson’s ID number, number of items sold in
Design a flowchart or pseudocode for a program that accepts three numbers from a user and displays a message if the sum of any two numbers equals the third.
Design a flowchart or pseudocode for a program that accepts two numbers from a user and displays one of the following messages: First is larger, Second is larger, Numbers are equal.
Assume that the following variables contain the values shown:numberBig = 100 numberMedium = 10numberSmall = 1wordBig = "Constitution"wordMedium = "Dance"wordSmall = "Toy”For each of the
If d is true, e is false, and f is false, which of the following expressions is true?a. e OR f AND db. f AND d OR ec. d OR e AND fd. two of the above
If a is true, b is true, and c is false, which of the following expressions is true?a. a OR b AND cb. a AND b AND cc. a AND b OR cd. Two of the above
If sales = 100, rate = 0.10, and expenses = 50, which of the following expressions is true?a. Sales >= expenses AND rate < 1b. Sales < 200 OR expenses < 100c. Expenses = rate OR sales =
When you use a range check, you always compare a variable to ______________ value in the range.a. The lowestb. The highestc. An end-of-range valued. The average
In the following pseudocode, what percentage raise will an employee in Department 10 receive?if department < 2 thenraise = SMALL_RAISEelseif department < 6 thenraise = MEDIUM_RAISEelseif
In the following pseudocode, what percentage raise will an employee in Department 8 receive?if department < 5 thenraise = SMALL_RAISEelseif department < 14 thenraise = MEDIUM_RAISEelseif
Which of the following must always be true?a. g < 12 AND g < 18b. g = 12 OR h = 17c. g <> 12 OR g <> 15d. g > 12 AND g < 21
Which of the following must always be false?a. e > 12 AND e < 15b. e = 10 OR e = 20c. e > 12 OR f > 12d. e > 10 AND e < 7
Which of the following is a poorly written, trivial Boolean expression?a. a > b AND b > cb. a = 100 OR b > 200c. a < b AND c < 100 AND d <> 5d. a < 10 AND a > 40
If conditionA is 30 percent likely to be true and conditionB is 10 percent likely to be true, then it is most efficient to test conditionA first ______________.a. In an OR decisionb. In an AND
Which of the lettered choices is equivalent to the following decision?if x > 10 thenif y > 10 thenoutput "X"endifendifa. if x > 10 OR y > 10 then output "X" endifb. if x > 10 AND x
If p is true and q is false, then ______________.a. p OR q is trueb. p OR q is falsec. p AND q is trued. p is greater than q
If a is true and b is false, then ______________.a. a AND b is trueb. a AND b is falsec. a OR b is falsed. If a is true, then b must be true.
In an AND condition, the most efficient technique is to first ask the question that ______________.a. Is most likely to be trueb. Is least likely to be truec. That contains the most operandsd. Uses a
If j <> k is true, then ______________.a. j = k is trueb. j > k might be truec. j < k might be trued. Both b and c are true.
If x <= y is true, then ______________.a. x = y is trueb. y <= x is truec. x > y is falsed. x >= y is false
A trivial Boolean expression is one that ______________.a. Is uses only two operandsb. Always has the same valuec. Is always trued. Is always false
The greater-than operator evaluates as true when ______________.a. The right operand is greater than the left operandb. The left operand is greater than the right operandc. The right operand is equal
In a selection, the else clause executes ______________.a. Only after the if clause executesb. When the tested condition is truec. When the tested condition is falsed. Always
A ______________expression has one of two values: true or false.a. Georgianb. Booleanc. Barbariand. Selective
Choose a sport such as baseball or football and describe the actions in one limited play period (such as an at-bat in baseball or a possession in football) using a structured flowchart or pseudocode.
Choose a television game show such as Wheel of Fortune or Jeopardy! and describe its rules using a structured flowchart or pseudocode.
Choose a simple children’s game and describe its logic, using a structured flowchart or pseudocode. For example, you might try to explain Rock, Paper, Scissors; Musical Chairs; Duck, Duck, Goose;
Your downloadable files for Chapter 3 include a file named DEBUG03-04.jpg that contains a flowchart with syntax and/or logical errors. Examine the flowchart and then find and correct all the bugs.
Your downloadable files for Chapter 3 include DEBUG03-01.txt, DEBUG03-02.txt, and DEBUG03-03.txt. Each file starts with some comments that describe the problem. Comments are lines that begin with two
A file named MAINTENANCE03-01.txt is included with your downloadable student files. Assume that this program is a working program in your organization and that it needs modifications as described in
Draw a structured flowchart or write structured pseudocode describing how to buy a new shirt. Include at least two decisions and two loops.
Draw a structured flowchart or write structured pseudocode describing how to decide what college to attend. Include at least two decisions and two loops.
Draw a structured flowchart or write structured pseudocode describing how to get from your home to your school. Include at least two decisions and two loops.
Looking up a word in a dictionary can be a complicated process. For example, assume that you want to look up logic. You might open the dictionary to a random page and see juice. You know this
Draw a structured flowchart or write pseudocode that describes the process of guessing a number between 1 and 100. After each guess, the player is told that the guess is too high or too low. The
Assume you have created a mechanical robot that can perform the following tasks:Stand up.Sit down.Turn left 90 degrees.Turn right 90 degrees.Take a step.Additionally, the robot can determine the
Assume you have created a mechanical arm that can hold a pen. The arm can perform the following tasks:Lower the pen to a piece of paper.Raise the pen from the paper.Move the pen 1 inch along a
Write pseudocode for each example (a through e) in Exercise 2, making sure your pseudocode is structured and accomplishes the same tasks as the flowchart segment.Data From Exercise 2 a. b. D Yes NO
Showing 300 - 400
of 459
1
2
3
4
5