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
Hire a Tutor
AI Tutor
New
Search
Search
Sign In
Register
study help
computer science
programming logic & design
Questions and Answers of
Programming Logic & Design
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
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
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
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
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
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
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
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 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
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
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
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
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,
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Glen Ross Vacation Property Sales employs seven salespeople, as shown in the Table 6-5.ID NumberSalesperson Name103Darwin104Kratz201Shulstad319Fortune367Wickert388Miller435VickTable 6-5 Glen Ross
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,
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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).
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
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
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
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
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
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.
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