Computer Science First Trimester Review
37 Questions
1 Views

Computer Science First Trimester Review

Created by
@DazzlingSunstone

Questions and Answers

What is the primary focus of procedural programming?

  • Encapsulating data to enhance modularity
  • Accessing objects' data directly for manipulation
  • Managing data through objects and classes
  • Performing tasks through procedures and functions (correct)
  • In the provided pseudocode, which step follows the calculation of pay?

  • Display the pay (correct)
  • Store the hourly pay rate
  • Multiply the hours by the pay rate
  • Get the number of hours worked
  • Which statement correctly describes an object in object-oriented programming?

  • Objects share variables with other objects directly.
  • Objects encapsulate their own data and methods. (correct)
  • Objects focus primarily on the tasks to be performed.
  • Objects can access the data of other objects freely.
  • Which of the following is NOT a key characteristic of procedural programming?

    <p>Uses encapsulation of data</p> Signup and view all the answers

    What is the main advantage of using object-oriented programming?

    <p>Encourages code reusability through objects</p> Signup and view all the answers

    What is the primary function of the Central Processing Unit (CPU)?

    <p>To perform arithmetic and logical operations</p> Signup and view all the answers

    Which of the following is NOT considered a major category of hardware components?

    <p>Network Protocols</p> Signup and view all the answers

    What differentiates high-level programming languages from machine language?

    <p>High-level languages are more abstract and easier for humans to read</p> Signup and view all the answers

    What function does the Central Processing Unit (CPU) serve in a computer?

    <p>Runs programs.</p> Signup and view all the answers

    Which component is primarily responsible for interacting with the user in a computer system?

    <p>Input &amp; Output Devices</p> Signup and view all the answers

    What is the purpose of an Integrated Development Environment (IDE)?

    <p>To assist in writing, testing, and debugging code</p> Signup and view all the answers

    Which of the following accurately describes Main Memory?

    <p>It temporarily holds data and instructions for running programs.</p> Signup and view all the answers

    What is the primary purpose of secondary storage in a computer system?

    <p>To store data and programs not currently in use.</p> Signup and view all the answers

    Which element is essential to the programming process and guides how a program will function?

    <p>Design</p> Signup and view all the answers

    In which programming paradigm is a program structured to contain procedures or functions?

    <p>Procedural Programming</p> Signup and view all the answers

    Which component of the CPU is responsible for executing arithmetic and logic operations?

    <p>Arithmetic and Logic Unit (ALU)</p> Signup and view all the answers

    What is typically involved in the input, processing, and output cycle of a computer system?

    <p>Receiving information, manipulating it, and displaying results</p> Signup and view all the answers

    What distinguishes volatile memory from non-volatile memory?

    <p>Volatile memory loses data when the power is turned off.</p> Signup and view all the answers

    How is the capacity of Main Memory measured?

    <p>In bytes, where one byte equals one character.</p> Signup and view all the answers

    What is a primary function of addresses in memory?

    <p>To identify unique locations for bytes of data.</p> Signup and view all the answers

    In the organizational structure of a computer system, what do secondary storage devices primarily rely on?

    <p>Long-term storage capabilities.</p> Signup and view all the answers

    What describes secondary storage?

    <p>It is persistent and retains data when the program stops.</p> Signup and view all the answers

    Which category of software is involved in managing computer hardware?

    <p>System software</p> Signup and view all the answers

    What is the first step in writing a program to calculate gross pay?

    <p>Display a message asking how many hours the user worked.</p> Signup and view all the answers

    What is an algorithm?

    <p>A set of well-defined steps for solving a problem.</p> Signup and view all the answers

    What is typically used to convert high-level programming languages into machine language?

    <p>Compiler</p> Signup and view all the answers

    What type of language do computers primarily understand?

    <p>Machine language</p> Signup and view all the answers

    Which of the following is NOT an example of application software?

    <p>Operating systems</p> Signup and view all the answers

    Which element is NOT commonly found in high-level programming languages?

    <p>Binary Patterns</p> Signup and view all the answers

    What is the primary purpose of an Integrated Development Environment (IDE)?

    <p>To combine programming tools into one application</p> Signup and view all the answers

    Which instruction detail is specific to machine language?

    <p>It uses binary patterns of 1s and 0s.</p> Signup and view all the answers

    What does a variable do in a programming context?

    <p>Stores data temporarily in memory</p> Signup and view all the answers

    Which step follows after asking the user for their hourly pay rate?

    <p>Store the hourly pay rate in memory.</p> Signup and view all the answers

    Which step is NOT part of the programming process?

    <p>Optimization</p> Signup and view all the answers

    What does pseudocode help programmers accomplish?

    <p>Create algorithm flows</p> Signup and view all the answers

    What is the first step in the typical input, processing, and output cycle of a program?

    <p>Gather input data</p> Signup and view all the answers

    Which of the following is a key component in defining syntax in programming languages?

    <p>Order of operations</p> Signup and view all the answers

    Study Notes

    Introduction to Computers and Programming

    • A computer is a programmable electronic device for storing, retrieving, and processing large amounts of data quickly and accurately.
    • Computer systems consist of hardware (physical components) and software (programs that run on computers).

    Major Hardware Component Categories

    • Central Processing Unit (CPU): Executes programs and consists of the control unit and arithmetic logic unit (ALU).
    • Main Memory (RAM): Volatile storage for running programs; data is erased when power is off.
    • Secondary Storage: Long-term, non-volatile storage that retains data when programs are not running.
    • Input Devices: Allow data entry into the computer.
    • Output Devices: Convey results from the computer to the user.

    Software Categories

    • System Software: Manages hardware and programs (e.g., operating systems).
    • Application Software: Provides services to users (e.g., word processors, spreadsheets).

    Programming and Algorithms

    • A program is a set of instructions for performing tasks.
    • An algorithm is an ordered set of steps to solve a problem, expressed in a way that can be executed by a computer.

    Machine Language and High-Level Languages

    • Machine language consists of numeric instructions in binary form, understandable by the CPU.
    • High-Level Languages use readable words and symbols; a compiler translates them into machine language.

    Integrated Development Environment (IDE)

    • Combines tools for writing, compiling, and debugging programs in one application.

    Elements of a Program

    • Common elements include keywords, programmer-defined identifiers, operators, punctuation, and syntax.
    • A variable represents a named storage location for data that can change during program execution.

    Programming Steps

    • Input: Gather data from various sources (keyboard, files).
    • Processing: Execute operations on input data.
    • Output: Display results or send them to other devices.

    Programming Process

    • Steps include analysis, design, coding, testing, and debugging.
    • Pseudocode is often used to outline algorithms in an understandable format.

    Programming Methodologies

    • Procedural Programming: Focuses on tasks and functions to perform operations, sharing variables between procedures.
    • Object-Oriented Programming: Centers on data encapsulation within objects, which contain both data and methods for manipulation.

    C++ Programming

    • A simple C++ program begins with #include, followed by definitions and functions using standard libraries and declarations.
    • The main function is where program execution starts and typically includes code elements that output messages to the screen.

    Studying That Suits You

    Use AI to generate personalized quizzes and flashcards to suit your learning preferences.

    Quiz Team

    Related Documents

    EXAM1_CS_Review.pdf

    Description

    This quiz provides a comprehensive review for the Computer Science course sections 001 and 009, focusing on key concepts and material covered during the first trimester. Designed for Dr. Brian Wescott Ricks' students, it aims to reinforce understanding and prepare for future assessments.

    Use Quizgecko on...
    Browser
    Browser