Computer Science Flashcards
30 Questions
100 Views

Computer Science Flashcards

Created by
@MesmerizingBongos

Questions and Answers

What is Assembly Language?

  • A high-level programming language
  • A programming language using simple keywords (correct)
  • A scripting language
  • A markup language
  • What is Machine Language?

    Programming languages which relied on manually flipping electrical currents on and off

    What is scope in programming?

    A variable can only be accessed in certain areas of your code, based on how and where you declare it.

    What are Wrapper Classes?

    <p>Classes that are versions of primitives that allow them to be used in Array Lists.</p> Signup and view all the answers

    What are Instance Variables?

    <p>Variables that are declared in a class that an object knows about itself.</p> Signup and view all the answers

    What are Primitive Variables?

    <p>Variables such as Boolean, byte, and int.</p> Signup and view all the answers

    A reference variable has a value of ___ when not referring to an object.

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

    What is a mutator?

    <p>A method that changes data but doesn't return it.</p> Signup and view all the answers

    A ______ checks for errors when you run your code.

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

    A _____ is a blueprint for an object.

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

    All objects live on the ____.

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

    A(n) ______ KNOWS things and DOES things.

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

    What are methods?

    <p>Things an object does.</p> Signup and view all the answers

    What is prepcode?

    <p>The first thing you'll write when you create a new class.</p> Signup and view all the answers

    Use this loop when it will run an indefinite amount of times: ____.

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

    Examples of && and || are ____ _______ operators.

    <p>short circuit</p> Signup and view all the answers

    Classes in the Java API are grouped into _____.

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

    A subclass _______ a superclass.

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

    What is a parameter?

    <p>A piece of data passed to a method.</p> Signup and view all the answers

    What does the keyword 'abstract' do?

    <p>Prevents a class from being instantiated or a method from being overridden.</p> Signup and view all the answers

    What does the term 'concrete' refer to?

    <p>A class that CAN be instantiated.</p> Signup and view all the answers

    Where do method calls live?

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

    A piece of code that creates the object is called a _____ .

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

    What does the method charAt() do?

    <p>Returns the character at a certain index.</p> Signup and view all the answers

    What does the keyword 'static' allow?

    <p>Allows something to be run or called without an instance of a class.</p> Signup and view all the answers

    In which class are methods such as abs and pow located?

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

    What type of loop is used when you know how many times it will run?

    <p>for loop</p> Signup and view all the answers

    What are escape characters?

    <p>Characters such as /n and /t.</p> Signup and view all the answers

    What does the keyword 'final' do?

    <p>Prevents a constant from being changed.</p> Signup and view all the answers

    Who is David Kelsey?

    <p>This person has lots of swag.</p> Signup and view all the answers

    Study Notes

    Programming Languages

    • Assembly Language: Uses simple keywords (e.g., ADD) to interact directly with memory addresses.
    • Machine Language: Relies on physical manipulation of electrical currents to execute instructions.

    Variable Concepts

    • Scope: Refers to the accessibility of a variable based on its declaration location within the code.
    • Instance Variables: Specific to a class, these variables inform an object about its own state.
    • Primitive Variables: Basic data types including Boolean, byte, and int; foundational building blocks of data storage.

    Object Orientation

    • Wrapper Classes: Enable primitive types (e.g., Integer, Character) to be utilized in data structures like Array Lists.
    • Object: Represents an entity that holds data (state) and can perform actions (behavior).
    • Methods: Define the actions an object can perform, serving as the object's functionality.

    Control Structures

    • While Loop: Designed for scenarios where the number of iterations is uncertain.
    • For Loop: Best suited for situations where the number of iterations is predetermined.

    Object Creation and Management

    • Prepcode: The initial code written when designing a new class, setting up its structure.
    • Stack: The memory region that keeps track of method calls and their state.
    • Heap: The area in memory where all object instances are stored.

    Keywords and Programming Terminology

    • Null: Indicates that a reference variable does not currently point to any object.
    • Static: Allows methods or variables to be accessed without creating an instance of the class.
    • Final: A keyword that locks a variable or method, preventing any modification after its initial setup.
    • Abstract: Prevents instantiation of a class or overriding of methods, establishing a template without a concrete implementation.
    • Concrete: Describes a class that can be instantiated and utilized in a program.

    Methodology and Operators

    • Mutator: A method responsible for modifying the data of an object without returning any value.
    • Short Circuit Operators: Examples include && (AND) and || (OR), which evaluate conditions in a way that can skip unnecessary evaluations.

    Data Passing and API Organization

    • Parameter: Data elements sent to a method when called for execution.
    • Packages: Collections of related classes, facilitating organization within the Java API.

    Miscellaneous Concepts

    • Escape Characters: Special characters such as /n (new line) and /t (tab), used within strings to format output.
    • Math Class: Houses methods like .abs and .pow, employed for mathematical operations.
    • David Kelsey: Noted for his distinct style and presence (swag).

    Studying That Suits You

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

    Quiz Team

    Description

    Test your knowledge of programming languages and key concepts with these flashcards. This quiz covers important terms such as Assembly Language, Machine Language, and the concept of scope in coding. Perfect for students preparing for exams in computer science.

    More Quizzes Like This

    Use Quizgecko on...
    Browser
    Browser