New Semester
Started
Get
50% OFF
Study Help!
--h --m --s
Claim Now
Question Answers
Textbooks
Find textbooks, questions and answers
Oops, something went wrong!
Change your search query and then try again
S
Books
FREE
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
Tutors
Online Tutors
Find a Tutor
Hire a Tutor
Become a Tutor
AI Tutor
AI Study Planner
NEW
Sell Books
Search
Search
Sign In
Register
study help
computer science
programming logic & design
Programming Logic & Design Comprehensive 9th edition Joyce Farrell - Solutions
Data stored in a table that can be accessed using row and column numbers is stored as a _____ array.a. Single-dimensionalb. Two-dimensionalc. Three-dimensionald. Nondimensional
The bubble sort is _____.a. The most efficient sortb. A relatively fast sort compared to othersc. A relatively easy sort to understandd. All of the above
When performing a bubble sort on a list of 10 values, you can stop making passes through the list of values as soon as _____ on a single pass through the list.a. No swaps are madeb. Exactly one swap is madec. No more than nine swaps are maded. No more than 10 swaps are made
In a bubble sort, on each pass through the list that must be sorted, you can stop making pair comparisons _____.a. One comparison soonerb. Two comparisons soonerc. One comparison laterd. Two comparisons later
When you do not know how many items need to be sorted in a program, you can create an array that has _____.a. Variable-sized elementsb. At least as many elements as the number you predict you will needc. At least one element less than the number you predict you will needd. You cannot sort items if
To completely sort a list of 10 values using a bubble sort, the greatest possible number of required pair comparisons is _____.a. 9b. 10c. 81d. 100
To sort a list of 15 values using a bubble sort, the greatest number of times you would have to pass through the list making comparisons is _____.a. 15b. 14c. 13d. 12
Which type of sort compares list items in pairs, swapping any two adjacent values that are out of order?a. Insertion sortb. Indexed sortc. Bubble sortd. Selection sort
Which of the following code segments correctly swaps the values of variables named x and y?a. x = yy = tempx = tempb. temp = xx = yy = tempc. x = ytemp = xy = tempd. temp = xy = xx = temp
When computers sort data, they always _____.a. Place items in ascending orderb. Use a bubble sortc. Use numeric values when making comparisonsd. Begin the process by locating the position of the lowest value
Student records stored in alphabetical order by last name have been sorted in _____ order.a. Descendingb. Ascendingc. Staggeredd. Recursive
Employee records stored in order from highest-paid to lowest-paid have been sorted in _____ order.a. Descendingb. Ascendingc. Staggeredd. Recursive
In the Game Zone section of Chapter 5, you designed a guessing game in which the application generates a random number and the player tries to guess it. After each guess, you displayed a message indicating whether the player’s guess was correct, too high, or too low. When the player eventually
The International Rock Paper Scissors Society holds regional and national championships. Each region holds a semifinal competition in which contestants play 500 games of Rock Paper Scissors. The top 20 competitors in each region are invited to the national finals. Assume that you are provided with
Your downloadable files for Chapter 7 include a file named DEBUG07-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 7 include DEBUG07-01.txt, DEBUG07-02.txt, and DEBUG07-03.txt. Each file starts with some comments that describe the problem. Comments are lines that begin with two slashes (//). Following the comments, each file contains pseudocode that has one or more bugs you
A file named MAINTENANCE07-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 the comments (lines that begin with two slashes) at the beginning of the file. Your job is to alter
The Timely Talent Temporary Help Agency maintains an employee master file that contains an employee ID number, last name, first name, address, and hourly rate for each temporary worker. The file has been sorted in employee ID number order. Each week, a transaction file is created with a job number,
The Curl Up and Dye Beauty Salon maintains a master file that contains a record for each of its clients. Fields in the master file include the client’s ID number, first name, last name, and total amount spent this year. Every week, a transaction file is produced. It contains a customer’s ID
Gimme Shelter Roofers maintains a file of past customers, including a customer number, name, address, date of job, and price of job. It also maintains a file of estimates given for jobs not yet performed; this file contains a customer number, name, address, proposed date of job, and proposed price.
The Apgar Medical group keeps a patient file for each doctor in the office. Each record contains the patient’s first and last name, home address, and birth year. The records are sorted in ascending birth year order. Two doctors, Dr. Best and Dr. Cushing, have formed a partnership.a. Design the
Laramie Park District has files of participants in its summer and winter programs this year. Each file is in participant ID number order and contains additional fields for first name, last name, age, and class taken (for example, Beginning Swimming).a. Design the logic for a program that merges the
Geraldine’s Landscaping Service and Gerard’s Lawn Maintenance are merging their businesses and want to merge their customer files. Each file contains a customer number, last name, address, and property area in square feet, and each file is in customer number order. Design the logic for a
Pendant Publishing edits multi-volume manuscripts for many authors. For each volume, they want a label that contains the author’s name, the title of the work, and a volume number in the form Volume 9 of 9. For example, a set of three volumes requires three labels: Volume 1 of 3, Volume 2 of
Random access files are used most frequently in all of the following except _______________.a. Interactive programsb. Batch processingc. Real-time applicationsd. Programs requiring direct access
The saved version of a file that does not contain the most recently applied transactions is known as a ____________ file.a. Masterb. Childc. Parentd. Relative
A transaction file is often used to ____________ another file.a. Augmentb. Removec. Verifyd. Update
A file that holds more permanent data than a transaction file is a _________file.a. Masterb. Primaryc. Keyd. Mega-
When you merge records from two or more sequential files, the usual case is that the records in the files _______.a. Contain the same datab. Have the same formatc. Are identical in numberd. Are sorted on different fields
Assume that you are writing a program to merge two files named FallStudents and SpringStudents. Each file contains a list of students enrolled in a programming logic course during the semester indicated, and each file is sorted in student ID number order. After the program compares two records and
Whenever a control break occurs during record processing in any control break program, you must _________.a. Declare a control break fieldb. Set the control break field to 0c. Update the value in the control break fieldd. Output the control break field
A control break field __________.a. Always is output prior to any group of records on a control break reportb. Always is output after any group of records on a control break reportc. Never is output on a reportd. Causes special processing to occur
Which of the following is an example of a control break report?a. A list of all customers of a business in zip code order, with a count of the number of customers who reside in each zip codeb. A list of all students in a school, arranged in alphabetical order, with a total count at the end of the
A control break occurs when a program _____________.a. Pauses to perform special processing based on the value of a fieldb. Ends prematurely, before all records have been processedc. Takes one of two alternate courses of action for every recordd. Passes logical control to a module contained within
When you combine two or more sorted files while maintaining their sequential order based on a field, you are __________ the files.a. Trackingb. Collatingc. Mergingd. Absorbing
A file in which records are stored one after another in order based on the contents of a field is a(n) __________ file.a. Temporalb. Alphabeticalc. Randomd. Sequential
When you close a file, it __________.a. Becomes associated with an internal identifierb. Cannot be reopenedc. Is no longer available to the programd. Ceases to exist
Unlike when you print a report or display information on a screen, when a program’s output is a data file, you do not _________.a. Include explanations or formatting such as dollar signsb. Open or close the filesc. Output all of the input fieldsd. All of the above
When you write to a file, you ______________.a. Move data from a storage device to memoryb. Copy data from a storage device to memoryc. Move data from memory to a storage deviced. Copy data from memory to a storage device
The process of _________ a file locates it on a storage device and associates a variable name within your program with the file.a. Declaringb. Closingc. Openingd. Defining
Which of the following is true regarding the data hierarchy?a. Fields contain records.b. Characters contain fields.c. Fields contain files.d. Files contain records.
Every file on a storage device has a ____________.a. Nameb. Sizec. Both of the aboved. None of the above
Which is true of text files?a. Text files contain data that can be read in a text editor.b. Text files commonly contain images and music.c. Both of the aboved. None of the above
Random access memory is ___________.a. Volatileb. Permanentc. Persistentd. Continual
Create two parallel arrays that represent a standard deck of 52 playing cards. One array is numeric and holds the values 1 through 13 (representing Ace, 2 through 10, Jack, Queen, and King). The other array is a string array that holds suits (Clubs, Diamonds, Hearts, and Spades). Create the arrays
Design the logic for the game Hangman, in which the user guesses letters in a hidden word. Store the letters of a word in an array of characters. Display a dash for each missing letter. Allow the user to continuously guess a letter until all the letters in the word are guessed correctly. As the
a. Create the logic for a dice game. The application randomly “throws” five dice for the computer and five dice for the player. As each random throw, store it in an array. The application displays all the values, which can be from 1 to 6 inclusive for each die. Decide the winner based on the
Create the logic for a Magic 8 Ball game in which the user enters a question such as What does my future hold? The computer randomly selects one of eight possible vague answers, such as It remains to be seen.
Your downloadable files for Chapter 6 include a file named DEBUG06-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 6 include DEBUG06-01.txt, DEBUG06-02.txt, and DEBUG06-03.txt. Each file starts with some comments that describe the problem. Comments are lines that begin with two slashes (//). Following the comments, each file contains pseudocode that has one or more bugs you
A file named MAINTENANCE06-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 the comments (lines that begin with two slashes) at the beginning of the file. Your job is to alter
a. Design an application in which the number of days for each month in the year is stored in an array. (For example, January has 31 days, February has 28, and so on. Assume that the year is not a leap year.) Display 12 sentences in the same format for each month; for example, the sentence displayed
Glen Ross Vacation Property Sales employs seven salespeople, as shown in the Table 6-5.ID NumberSalesperson Name103Darwin104Kratz201Shulstad319Fortune367Wickert388Miller435VickTable 6-5 Glen Ross salespeopleWhen a salesperson makes a sale, a record is created including the date, time, and dollar
a. Daily Life Magazine wants an analysis of the demographic characteristics of its readers. The Marketing department has collected reader survey records containing the age, gender, marital status, and annual income of readers. Design an application that accepts reader data and, when data entry is
Design a program that computes pay for employees. Allow a user to continuously input employees’ names until an appropriate sentinel value is entered. Also input each employee’s hourly wage and hours worked. Compute each employee’s gross pay (hours times rate), withholding tax percentage
Design the application logic for a company that wants a report containing a breakdown of payroll by department. Input includes each employee’s department number, hourly salary, and number of hours worked. The output is a list of the seven departments in the company and the total gross payroll
The Jumpin’ Jive coffee shop charges $2.00 for a cup of coffee, and offers the add-ins shown in Table 6-2.ProductPrice ($)Whipped cream0.89Cinnamon0.25Chocolate sauce0.59Amaretto1.50Irish whiskey1.75Table 6-2 Add-in list for Jumpin’ Jive coffee shopDesign the logic for an application that
Search the web to discover the ten most common user-selected passwords, and store them in an array. Design a program that prompts a user for a password, and continue to prompt the user until the user has not chosen one of the common passwords.
a. The Downdog Yoga Studio offers five types of classes, as shown in Table 6-1. Design a program that accepts a number representing a class and then displays the name of the class.Class NumberClass Name1Yoga 12Yoga 23Children’s Yoga4Prenatal Yoga5Senior Yoga
Trainers at Tom’s Athletic Club are encouraged to enroll new members. Write an application that allows Tom to enter the names of each of his 25 trainers and the number of new members the trainer has enrolled this year. Output is the number of trainers who have enrolled 0 to 5 members, 6 to 12
a. Design the logic for a program that allows a user to enter 20 numbers, then displays all of the numbers, the largest number, and the smallest.b. Modify the program in Exercise 3a so that the user can enter any amount of numbers up to 20 until a sentinel value is entered.
a. Design the logic for a program that allows a user to enter 20 numbers, then displays each number and its difference from the numeric average of the numbers entered.b. Modify the program in Exercise 2a so that the user can enter any amount of numbers up to 20 until a sentinel value is entered.
a. Design the logic for a program that allows a user to enter 20 numbers, then displays them in the reverse order of entry.b. Modify the reverse-display program so that the user can enter any amount of numbers up to 20 until a sentinel value is entered.
You can access every element of an array using a ______________.a. While loopb. For loopc. Either of the aboved. None of the above
In every array, a subscript is out of bounds when it is ______________.a. Negativeb. 0c. 1d. 999
When you use a subscript value that is negative or higher than the number of elements in an array, __________.a. Execution of the program stops and an error message is issuedb. A value in a memory location that is outside the area occupied by the array will be accessedc. A value in a memory
Suppose that an instructor assigns different letter grades based on points earned on a 10-point quiz, and that all scores have been verified to be between 0 and 10 inclusive. Also suppose that four possible letter grades can be assigned and that 9 or 10 points is an A, 7 or 8 points is a B, 6
Each element in a seven-element array can hold ________value(s).a. Oneb. Sevenc. At least sevend. An unlimited number of
Parallel arrays ____________.a. Frequently have an indirect relationshipb. Never have an indirect relationshipc. Must be the same data typed. Must not be the same data type
In most modern programming languages, the highest subscript you should use with a 12-element array is ____________.a. 10b. 11c. 12d. 13
Two arrays in which each element in one array is associated with the element in the same relative position are ____________.a. Cohesiveb. Parallelc. Hiddend. Perpendicular
A _________is a variable that can be set to indicate whether some event has occurred.a. Subscriptb. Bannerc. Counterd. Flag
Filling an array with values during a program’s execution is known as________ the array.a. Executingb. Colonizingc. Populatingd. Declaring
Suppose that you have declared an array as follows: num values[4] = 0, 0, 0, 0. Which of the following is an allowed operation?a. values[4] = 80b. values[2] = values[4] – values[0]c. output values[3]d. All of the above
Suppose that you have declared an array as follows: num values[4] = 0, 0, 0, 0. Which of the following is an allowed operation?a. values[2] = 17b. input values[0]c. values[3] = values[0] + 10d. All of the above
A program contains a seven-element array that holds the names of the days of the week. At the start of the program, you display the day names using a subscript named dayNum. You display the same array values again at the end of the program, where you ________ as a subscript to the array.a. Must use
Suppose that you want to write a program that inputs customer data including name, zipCode, balance, and regionNum. At the end of the program, a summary of the number of customers in each of 12 sales regions who owe more than $1000 each is displayed. The most likely statement during the main
Suppose that you have declared a numeric array named numbers, and two of its elements are numbers[1] and numbers[4]. You know that ________.a. numbers[4] is larger than numbers[1]b. The array has at least five elementsc. The array has been initializedd. The two elements are three bytes apart in
Suppose that you have declared a numeric array named numbers, and two of its elements are numbers[1] and numbers[4]. You know that _________.a. The two elements hold the same valueb. The array holds exactly four elementsc. There are exactly two elements between those two elementsd. The two elements
The subscripts of any array are always __________.a. Integersb. Fractionsc. Charactersd. Strings of characters
Suppose that you have declared a numeric array named values that has 13 elements. Which of the following must be true?a. values[0] is smaller than values[1]b. values[2] is stored adjacent to values[4]c. values[13] is out of boundsd. values[12] is the largest value in the array
Each element in an array must have the same _______as the others.a. Data typeb. Subscriptc. Valued. Memory location
A subscript is a(n) _________.a. Element in an arrayb. Alternate name for an arrayc. Number that represents the highest value stored within an arrayd. Number that indicates the position of an array element
Create the logic for the dice game Pig, in which a player can compete with the computer. The object of the game is to be the first to score 100 points. The user and computer take turns rolling a pair of dice following these rules:On a turn, each player rolls two dice. If no 1 appears, the dice
Create the logic for a game that simulates rolling two dice by generating two numbers between 1 and 6 inclusive. The player chooses a number between 2 and 12 (the lowest and highest totals possible for two dice). The player then “rolls” two dice up to three times. If the number chosen by the
In Chapter 2, you learned that in many programming languages you can generate a random number between 1 and a limiting value named LIMIT by using a statement similar to randomNumber = random(LIMIT). In Chapter 4, you created the logic for a guessing game in which the application generates a random
Your downloadable files for Chapter 5 include a file named DEBUG05-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 5 include DEBUG05-01.txt, DEBUG05-02.txt, and DEBUG05-03.txt. Each file starts with some comments that describe the problem. Comments are lines that begin with two slashes (//). Following the comments, each file contains pseudocode that has one or more bugs you
A file named MAINTENANCE05-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 the comments (lines that begin with two slashes) at the beginning of the file. Your job is to alter
a. Design a program for the Hollywood Movie Rating Guide, which can be installed in a kiosk in theaters. Each theater patron enters a value from 0 to 4 indicating the number of stars that the patron awards to the Guide’s featured movie of the week. If a user enters a star value that does not fall
Design a retirement planning calculator for Skulling Financial Services. Allow a user to enter a number of working years remaining in the user’s career and the annual amount of money the user can save. Assume that the user earns three percent simple interest on savings annually. Program output is
a. Design a program for Hunterville College. The current tuition is $20,000 per year, and tuition is expected to increase by 3 percent each year. Display the tuition each year for the next 10 years.b. Modify the Hunterville College program so that the user enters the rate of tuition increase
a. Design application for Bob’s E-Z Loans. The application accepts a client’s loan amount and monthly payment amount. Output the customer’s loan balance each month until the loan is paid off.b. Modify the Bob’s E-Z Loans application so that after the payment is made each month, a finance
Design the logic for a program that allows a user to enter any quantity of numbers until a negative number is entered. Then display the highest number and the lowest number.
Design the logic for a program that allows a user to continuously enter numbers until the user enters 0. Display the sum of the numbers entered.
Design the logic for a program that allows the user to enter a number. Display the sum of every number from 1 through the entered number.
Design the logic for a program that outputs numbers in reverse order from 10 down to 0.
Design the logic for a program that outputs every even number from 2 through 200.
Design the logic for a program that outputs every number from 1 through 15 along with its value times 10 and times 100.
Design the logic for a program that outputs every number from 1 through 15.
Showing 200 - 300
of 459
1
2
3
4
5
Step by Step Answers