Programming Essentials

Card Set Information

Author:
Anonymous
ID:
209427
Filename:
Programming Essentials
Updated:
2013-03-25 15:24:15
Tags:
Programming
Folders:

Description:
Test Study Questions
Show Answers:

Home > Flashcards > Print Preview

The flashcards below were created by user Anonymous on FreezingBlue Flashcards. What would you like to do?


  1. 1.     The two major components of any computer system are its __________.   

    A. input and output   
    B. hardware and software
    C. memory and disk drives
    D. data and programs   
    B. hardware and software
    (this multiple choice question has been scrambled)
  2. The major computer operations include __________.   
    A.     hardware and software
    B.     input, processing, and output
    C.     sequence and looping
    D.     spreadsheets, word processing, and data communications
    B. input, processing, and output
    (this multiple choice question has been scrambled)
  3. Another term meaning “computer instructions” is __________.   
    A.     data
    B.     queries
    C.     hardware
    D.     software
    D. software
    (this multiple choice question has been scrambled)
  4. Visual Basic, C++, and Java are all examples of computer __________.   
    A.     operating systems
    B.     hardware
    C.     machine languages
    D.     programming languages
    D. programming languages
    (this multiple choice question has been scrambled)
  5. A programming language’s rules are its __________.   
    A.     format
    B.     syntax
    C.     logic
    D.     options
    B. syntax
    (this multiple choice question has been scrambled)
  6. The most important task of a compiler or interpreter is to __________.   
    A.     translate English statements into a language such as Java
    B.     execute machine language programs to perform useful tasks
    C.     create the rules for a programming language
    D.     translate programming language statements into machine language
    D. translate programming language statements into machine language
    (this multiple choice question has been scrambled)
  7. Which of the following terms is most closely related to machine language?   
    A.     binary language
    B.     high-level
    C.     source code
    d.     all of the above
    A. binary language
    (this multiple choice question has been scrambled)
  8. Which of the following is true about newer programming languages as opposed to older ones?   
    A.     They do not require as much logic as older languages.
    B.     They do not have specific syntax rules.
    C.     Their programs tend to be written as one set of steps instead of being broken into modules.
    D.     They allow you to use reasonable names for memory locations.
    D. They allow you to use reasonable names for memory locations. 
    (this multiple choice question has been scrambled)
  9. Object-oriented programming focuses most on __________.   
    A.     data
    B.     objects
    C.     arithmetic
    D.     procedures
    B. objects
    (this multiple choice question has been scrambled)
  10. The attributes of an object are the things that it __________.   
    A.     influences
    B.     has
    C.     does
    D.     understands
    B. has
    (this multiple choice question has been scrambled)
  11. In object-oriented programming, each object __________.   
    A.     maintains its own data
    B.     carries out tasks when another object requests them
    C.     none of these
    D.     both of these
    D. both of these
    (this multiple choice question has been scrambled)
  12. Originally, object-oriented programming was used most frequently for two major types of applications. These were __________.    a.     payroll and inventory
    b.     input and storage
    c.     computer simulations and graphical user interfaces
    d.     public and private applications
    c. computer simulations and graphical user interfaces
  13. Identifying all the objects you want to manipulate and how they relate to each other is known as __________.   
    A.     relating
    B.     method manipulation
    C.     object orienting
    D.     data modeling
    D. data modeling
    (this multiple choice question has been scrambled)
  14. Writing a program in a language such as C++ or Java is known as __________ the program.   
    A.     compiling
    B.     interpreting
    C.     coding
    D.     translating
    C. coding
    (this multiple choice question has been scrambled)
  15. A compiler would find all of the following programming errors except __________.    a.     the misspelled word “prrint” in a language that includes the word “print”
    b.     the use of an “X” for multiplication in a language that instead requires an asterisk
    c.     a newBalanceDue calculated by adding a customerPayment to an oldBalanceDue instead of subtracting it
    d.     an arithmetic statement written as regularSales + discountedSales = totalSales
    c. a newBalanceDue calculated by adding a customerPayment to an oldBalanceDue instead of subtracting it
  16. The two most commonly used tools for planning a program’s logic are __________.   
    A.     flowcharts and pseudocode
    B.     Java and Visual Basic
    C.     word processors and spreadsheets
    D.     ASCII and EBCDIC
    A. flowcharts and pseudocode
    (this multiple choice question has been scrambled)
  17. In a flowchart, input is represented by a(n) _____.   
    A.     diamond
    B.     arrow
    C.     rectangle
    D.     parallelogram
    D. parallelogram
    (this multiple choice question has been scrambled)
  18. In a flowchart, processing is represented by a(n) _____.   
    A.     parallelogram
    B.     rectangle
    C.     arrow
    D.     diamond
    B. rectangle
    (this multiple choice question has been scrambled)
  19. When you use an IDE instead of a simple text editor to develop a program, _____.   
    A.     the logic is simpler
    B.     the logic is more complicated
    C.     some help is provided
    D.     the syntax is different
    C. some help is provided
    (this multiple choice question has been scrambled)
  20. When you write a program that will run in a GUI environment as opposed to a command-line environment, _____.   
    A.     the logic is very different
    B.     you do not need to plan the logic
    C.     some syntax is different
    D.     users are more confused
    C. some syntax is different
    (this multiple choice question has been scrambled)
  21. The selection statement if quantity > 100 then discountRate = RATE is an example of a __________.   
    A.     all of these
    B.     single-alternative selection
    C.     binary selection
    D.     dual-alternative selection
    B. single-alternative selection
    (this multiple choice question has been scrambled)
  22. The selection statement if dayOfWeek = “Sunday” then price = LOWER_PRICE else price = HIGHER_PRICE is an example of a __________.   
    A.     single-alternative selection
    B.     unary selection
    C.     dual-alternative  selection
    d.     all of the above
    C. dual-alternative  selection
    (this multiple choice question has been scrambled)
  23. All selection statements must have __________.   
    A.     both of these
    B.     an if clause
    C.     none of these
    D.     an else clause
    B. an if clause
    (this multiple choice question has been scrambled)
  24. An expression like amount < 10 is a(n) __________ expression.   
    A.     Gregorian
    B.     Boolean
    C.     Machiavellian
    D.     Edwardian
    B. Boolean
    (this multiple choice question has been scrambled)
  25. Usually, you compare only variables that have the same __________.   
    A.     size
    B.     value
    C.     type
    D.     name
    C. type
    (this multiple choice question has been scrambled)
  26. Symbols like > and < are known as __________ operators.   
    A.     arithmetic
    B.     sequential
    C.     scripting accuracy
    D.     relational comparison
    D. relational comparison
    (this multiple choice question has been scrambled)
  27. If you could use only three relational comparison operators, you could get by with __________.   
    A.     less than, less than or equal to, and not equal to
    B.     equal to, not equal to, and less than
    C.     greater than, less than, and greater than or equal to
    D.     equal to, less than, and greater than
    D. equal to, less than, and greater than
    (this multiple choice question has been scrambled)
  28. If a > b is false, then which of the following is always true?   
    A.     a < b
    B.     a <= b
    C.     a = b
    D.     a >= b
    B. a <= b
    (this multiple choice question has been scrambled)
  29. Usually, the most difficult comparison operator to work with is __________.   
    A.     greater than
    B.     equal to
    C.     less than
    D.     not equal to
    D. not equal to
    (this multiple choice question has been scrambled)
  30. Which of the lettered choices is equivalent to the following decision?   

    if x > 10 then       
       if y > 10 then          
          output "X"       
       endif    
    endif

    A.     if x > 10 AND x > y then output "X"
    B.     if y > x then output "X"
    C.     if x > 10 OR y > 10 then output "X"
    D.     if x > 10 AND y > 10 then output "X"
    D. if x > 10 AND y > 10 then output "X"
    (this multiple choice question has been scrambled)
  31. The Acme Computer Company operates in all 50 of the United States. The Midwest Sales region consists of five states—Illinois, Indiana, Iowa, Missouri, and Wisconsin. Suppose you have input records containing Acme customer data, including state of residence. To most efficiently select and display all customers who live in the Midwest Sales region, you would use __________.    a.     five completely separate unnested if statements
    b.     nested if statements using AND logic
    c.     nested if statements using OR logic
    d.     Not enough information is given
    c. nested if statements using AND logic
  32. The Midwest Sales region of Acme Computer Company consists of five states—Illinois, Indiana, Iowa, Missouri, and Wisconsin. About 50 percent of the regional customers reside in Illinois, 20 percent in Indiana, and 10 percent in each of the other three states. Suppose you have input records containing Acme customer data, including state of residence. To most efficiently select and display all customers who live in the Midwest Sales region, you would ask first about residency in __________.   
    A.     Indiana
    B.     any of the five states; it does not matter which one is first
    C.     either Iowa, Missouri, or Wisconsin—it does not matter which one of these three is first
    D.     Illinois
    D. Illinois
    (this multiple choice question has been scrambled)
  33. The Boffo Balloon Company makes helium balloons. Large balloons cost $13.00 a dozen, medium-sized balloons cost $11.00 a dozen, and small balloons cost $8.60 a dozen. About 60 percent of the company’s sales are the smallest balloons, 30 percent are the medium, and large balloons constitute only 10 percent of sales. Customer order records include customer information, quantity ordered, and size. For the most efficient decision when you write a program to determine price based on size, you should ask first whether the size is __________.   
    A.     medium
    B.     small
    C.     large
    D.     It does not matter
    B. small
    (this multiple choice question has been scrambled)
  34. The Boffo Balloon Company makes helium balloons in three sizes, 12 colors, and with a choice of 40 imprinted sayings. As a promotion, the company is offering a 25-percent discount on orders of large, red “Happy Valentine’s Day” balloons. To most efficiently select the orders to which a discount applies, you would use __________.   
    A.     nested if statements using OR logic
    B.     Not enough information is given.
    C.     nested if statements using AND logic
    D.     three completely separate unnested if statements
    C. nested if statements using AND logic
    (this multiple choice question has been scrambled)
  35. Radio station FM 99 keeps a record of every song played on the air in a week. Each record contains the day, hour, and minute the song started, and the title and artist of the song. The station manager wants a list of every title played during the important 8 a.m. commute hour on the two busiest traffic days, Monday and Friday. Which logic would select the correct titles?   
    A. if day = "Monday" then if hour = 8 then output title else if day = "Friday" then output title endif endif endif
    B. if hour = 8 then if day = "Monday" OR day = "Friday" then output title endif endif
    C. if hour = 8 AND day = "Monday" OR day = "Friday" then output title endif
    D. if day = "Monday" OR day = "Friday" OR hour = 8 then output title endif
    B. if hour = 8 then if day = "Monday" OR day = "Friday" then               output title            endif endif
    (this multiple choice question has been scrambled)
  36. In the following pseudocode, what percentage raise will an employee in Department 5 receive?

    if department < 3 then raise = SMALL_RAISE else if department < 5 then raise = MEDIUM_RAISE else raise = BIG_RAISE endif endif
    A.     SMALL_RAISE
    B.     impossible to tell
    C.     MEDIUM_RAISE
    D.     BIG_RAISE
    D. BIG_RAISE
    (this multiple choice question has been scrambled)
  37. In the following pseudocode, what percentage raise will an employee in Department 8 receive?

    if department < 5 then raise = SMALL_RAISE else if department < 14 then  raise = MEDIUM_RAISE else if department < 9 raise = BIG_RAISE endif endif endif

    A.     MEDIUM_RAISE
    B.     BIG_RAISE
    C.     SMALL_RAISE
    D.     impossible to tell
    A. MEDIUM_RAISE
    (this multiple choice question has been scrambled)
  38. In the following pseudocode, what percentage raise will an employee in Department 10 receive?

    if department < 2 then raise = SMALL_RAISE else if department < 6 then raise = MEDIUM_RAISE else if department < 10 raise = BIG_RAISE endif endif endif

    A.     SMALL_RAISE
    B.     Impossible to tell
    C.     MEDIUM_RAISE
    D.     BIG_RAISE
    B. Impossible to tell
    (this multiple choice question has been scrambled)
  39. In the following pseudocode, what percentage raise will an employee in Department 3 receive?

    if department < 2 then raise = SMALL_RAISE endif = BIG_RAISE if department < 6 then raise = MEDIUM_RAISE endif if department < 10 raise endif

    A.     Impossible to tell
    B.     SMALL_RAISE
    C.     BIG_RAISE
    D.     MEDIUM_RAISE
    C. BIG_RAISE
    (this multiple choice question has been scrambled)
  40. Which of the following is true?   
    A.     The AND operator has higher precedence than the OR operator.
    B.     The precedence of AND and OR operators depends on the programming language
    C.     The AND and OR operators have the same precedence.
    D.     The OR operator has higher precedence than the AND operator.
    A. The AND operator has higher precedence than the OR operator.
    (this multiple choice question has been scrambled)

What would you like to do?

Home > Flashcards > Print Preview