What this deck covers
This deck focuses on Program Design And Development, giving you a quick way to review the definitions, rules, and examples that matter most for AP Computer Science Principles.
Study Program Design And Development in AP Computer Science Principles with focused flashcards that help you recognize the idea, recall the key rule, and apply it in practice-style prompts.
0% Complete
What is the difference between 'public' and 'private' access modifiers?
Tap card or press Space to flip
'public' is accessible everywhere; 'private' is within the same class. Controls visibility and access levels for class members.
How well did you know it?
Card 1 / 74
Space to flip · ← / → to move · once flipped, → Got it · ← Still learning
This deck focuses on Program Design And Development, giving you a quick way to review the definitions, rules, and examples that matter most for AP Computer Science Principles.
Work through these flashcards in short sessions. Try to answer each prompt before flipping the card, then revisit any cards you miss until the explanation feels automatic.
Answer: 'public' is accessible everywhere; 'private' is within the same class. Controls visibility and access levels for class members.
Answer: To initialize new objects. Special method that sets up object state when created.
Answer: Model-View-Controller. Architectural pattern separating presentation, logic, and data concerns.
Answer: Remove ';' after the condition. Semicolon creates empty loop body, preventing intended execution.
Answer: Correct: 'if (x == 10)'. Single '=' assigns value; '==' compares for equality in conditions.
Answer: Class is a blueprint; object is an instance. Template defines structure; instance contains actual data values.
Answer: Don't Repeat Yourself. Principle promoting code reusability by avoiding duplication.
Answer: extends. Establishes parent-child relationship between classes for code reuse.
Answer: An error in the code's grammar or structure. Violates language rules preventing code from compiling or running.
Answer: Conditional statements. if-else and switch statements control program flow based on conditions.
Answer: Correct: 'int[] arr = new int[5];'. Square brackets for arrays, not parentheses like method calls.
Answer: Problem analysis. Understanding requirements before designing solutions is essential first step.
Answer: Hiding complex implementation details behind simple interfaces. Simplifies complexity by exposing only essential features to users.
Answer: The data type of the value returned by the function. Specifies what kind of value the function sends back.
Answer: Division by zero error. Mathematical impossibility that causes runtime exception or undefined behavior.
Answer: To repeat a block of code multiple times. Automates repetitive tasks by controlling iteration and flow.
Answer: Correct: 'int x = 100;'. String literal assigned to integer variable causes type mismatch.
Answer: Correct: 'int[] arr = new int[5];'. Square brackets for arrays, not parentheses like method calls.
Answer: No error. Proper switch syntax with break statements and default case.
Answer: Hiding complex implementation details behind simple interfaces. Simplifies complexity by exposing only essential features to users.
Answer: Remove ';' after the condition. Semicolon creates empty loop body, preventing intended execution.
Answer: Integrated Development Environment. Software providing comprehensive tools for coding, debugging, and testing.
Answer: '==' checks reference equality; 'equals()' checks value equality. Reference vs content comparison for determining object equality.
Answer: try-catch block. Catches and manages runtime errors gracefully without crashing.
Answer: main method. Starting point where JVM begins program execution.
Answer: Bundling data with methods that operate on the data. Data hiding principle combining related data and functions together.
Answer: Integrated Development Environment. Software providing comprehensive tools for coding, debugging, and testing.
Answer: Ability of different classes to respond to the same method call. Same interface produces different behaviors in different classes.
Answer: Correct: 'for(int i = 0; i < 10; i++)'. Missing second '+' in increment operator; should be 'i++'.
Answer: To manage changes to source code over time. Tracks modifications, enables collaboration, and maintains code history.
Answer: No error. Proper switch syntax with break statements and default case.
Answer: '==' checks reference equality; 'equals()' checks value equality. Reference vs content comparison for determining object equality.
Answer: A reusable solution to a common problem. Template providing proven structure for recurring design challenges.
Answer: Mechanism for one class to inherit attributes and methods from another. Child classes acquire properties and behaviors from parent classes.
Answer: To outline the step-by-step solution to a problem. Provides clear, logical sequence of instructions to solve problems.
Answer: Ability of different classes to respond to the same method call. Same interface produces different behaviors in different classes.
Answer: Do-while loop. Condition checked after execution, guaranteeing minimum one iteration.
Answer: The data type of the value returned by the function. Specifies what kind of value the function sends back.
Answer: Remove ';' after else. Semicolon after else creates syntax error in conditional structure.
Answer: Conditional statements. if-else and switch statements control program flow based on conditions.
Answer: To explain code logic and facilitate future maintenance. Comments and structure make code understandable for others and future edits.
Answer: To manage changes to source code over time. Tracks modifications, enables collaboration, and maintains code history.
Answer: Model-View-Controller. Architectural pattern separating presentation, logic, and data concerns.
Answer: A reusable solution to a common problem. Template providing proven structure for recurring design challenges.
Answer: Stack. Last In, First Out - elements added/removed from same end.
Answer: To repeat a block of code multiple times. Automates repetitive tasks by controlling iteration and flow.
Answer: Correct: 'if (x == 10)'. Single '=' assigns value; '==' compares for equality in conditions.
Answer: Correct: 'for(int i = 0; i < 10; i++)'. Missing second '+' in increment operator; should be 'i++'.
Answer: Mechanism for one class to inherit attributes and methods from another. Child classes acquire properties and behaviors from parent classes.
Answer: Do-while loop. Condition checked after execution, guaranteeing minimum one iteration.
Answer: The region of code where the variable is accessible. Determines where variables can be accessed within program structure.
Answer: Remove ';' after else. Semicolon after else creates syntax error in conditional structure.
Answer: To outline the step-by-step solution to a problem. Provides clear, logical sequence of instructions to solve problems.
Answer: Stack. Last In, First Out - elements added/removed from same end.
Answer: Correct: 'int x = 100;'. String literal assigned to integer variable causes type mismatch.
Answer: An error in the code's grammar or structure. Violates language rules preventing code from compiling or running.
Answer: A function that calls itself. Solves problems by breaking them into smaller identical subproblems.
Answer: try-catch block. Catches and manages runtime errors gracefully without crashing.
Answer: Bundling data with methods that operate on the data. Data hiding principle combining related data and functions together.
Answer: To convert source code into machine code. Translates high-level code into executable machine instructions.
Answer: To initialize new objects. Special method that sets up object state when created.
Answer: main method. Starting point where JVM begins program execution.
Answer: To convert source code into machine code. Translates high-level code into executable machine instructions.
Answer: A function that calls itself. Solves problems by breaking them into smaller identical subproblems.
Answer: The region of code where the variable is accessible. Determines where variables can be accessed within program structure.
Answer: 'public' is accessible everywhere; 'private' is within the same class. Controls visibility and access levels for class members.
Answer: Application Programming Interface. Interface defining how software components communicate and interact.
Answer: extends. Establishes parent-child relationship between classes for code reuse.
Answer: To explain code logic and facilitate future maintenance. Comments and structure make code understandable for others and future edits.
Answer: Problem analysis. Understanding requirements before designing solutions is essential first step.
Answer: Don't Repeat Yourself. Principle promoting code reusability by avoiding duplication.
Answer: Class is a blueprint; object is an instance. Template defines structure; instance contains actual data values.
Answer: Application Programming Interface. Interface defining how software components communicate and interact.
Answer: Division by zero error. Mathematical impossibility that causes runtime exception or undefined behavior.