Computer Science Flashcards
30 Questions
101 Views

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to Lesson

Podcast

Play an AI-generated podcast conversation about this lesson

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

Flashcards

Assembly Language

A low-level programming language using simple keywords to interact with hardware.

Machine Language

The most basic programming language, executing instructions as electrical signals.

Scope

Refers to where in code a variable can be accessed based on its declaration.

Instance Variables

Variables that store state specific to an object within a class.

Signup and view all the flashcards

Primitive Variables

Basic data types like boolean, byte, and int, essential for storage.

Signup and view all the flashcards

Wrapper Classes

Classes that allow primitive types to be used in objects and data structures.

Signup and view all the flashcards

Object

An entity that encapsulates data and can perform actions in programming.

Signup and view all the flashcards

Methods

Functions defined within a class that describe its actions.

Signup and view all the flashcards

While Loop

A loop used when the number of iterations is unknown beforehand.

Signup and view all the flashcards

For Loop

A loop designed for a specific number of iterations.

Signup and view all the flashcards

Prepcode

Initial code written to establish the structure of a new class.

Signup and view all the flashcards

Stack

Memory region that tracks method calls and their local variables.

Signup and view all the flashcards

Heap

Memory area where all object instances are stored and managed.

Signup and view all the flashcards

Null

A reference indicating no object is currently assigned.

Signup and view all the flashcards

Static

Modifier allowing class members to be accessed without instantiating the class.

Signup and view all the flashcards

Final

A keyword that makes a variable or method immutable after initial assignment.

Signup and view all the flashcards

Abstract

Class design preventing instantiation, used to define templates.

Signup and view all the flashcards

Concrete

A class that can be instantiated, allowing object creation.

Signup and view all the flashcards

Mutator

Method used to modify an object's data without returning a value.

Signup and view all the flashcards

Short Circuit Operators

Operators like && and || that skip evaluations if not necessary.

Signup and view all the flashcards

Parameter

Data elements passed to methods during their execution.

Signup and view all the flashcards

Packages

Collections of related classes for organizational purposes in Java.

Signup and view all the flashcards

Escape Characters

Special characters used in strings for formatting output.

Signup and view all the flashcards

Math Class

A class containing methods for mathematical operations.

Signup and view all the flashcards

David Kelsey

Noted for his distinct style and presence in programming.

Signup and view all the flashcards

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 Like This

Use Quizgecko on...
Browser
Browser