What is an abstraction?
An abstraction describes what an object can do while hiding the details of how it does it.
Study 6 Interfaces and Abstractions with 12 free online flashcards. Review key terms, definitions, and concepts with this interactive flashcard deck.
What is an abstraction?
An abstraction describes what an object can do while hiding the details of how it does it.
What does an interface define?
An interface defines a contract of required operations, properties, or members without normally specifying their implementation.
What is an abstract class?
An abstract class is an incomplete class intended for extension; it may combine abstract members, concrete methods, state, and protected operations.
How do nominal and structural interfaces differ?
Nominal typing requires explicit declaration that a class implements an interface; structural typing accepts a type when it has the required structure.
Why implement multiple interfaces?
A class can implement multiple interfaces, allowing it to support several independent capabilities.
What is polymorphism in this context?
Polymorphism lets one interface-typed variable or parameter refer to objects of different concrete types, each providing its own implementation.
When is an interface preferable?
Use an interface when a capability may apply to unrelated classes or when clients mainly need a small behavior-focused contract.
When is an abstract class preferable?
Use an abstract class when related subclasses should share state, construction rules, protected members, or substantial implementation.
What is dependency injection?
Dependency injection supplies a component’s required object from outside instead of having the component construct or locate it internally.
What does dependency inversion change?
Dependency inversion makes important application logic depend on abstractions while concrete infrastructure implements those abstractions.
What does programming to abstractions mean?
Programming to an abstraction means declaring types using the most general contract that provides everything the code actually needs.
What else does an abstraction contract include?
An abstraction’s contract includes semantics such as error behavior, invariants, copying or referencing rules, thread safety, and expiration—not only signatures.
A 14-question medium-difficulty quiz on Boolean algebra, logic gates, truth tables, and combinational circuits.
A focused set of flashcards covering Python variables, data types, expressions, control flow, functions, input, output, and common programming practices.
Learn how Boolean expressions, logical operators, and conditional structures let programs make reliable decisions, including how to handle boundaries, branch order, and testing.
Learn how computer memory stores and addresses information, how RAM and ROM differ, and how caches and the memory hierarchy balance speed, capacity, and cost.
A progressive guide to tree structure, binary-tree traversals, binary search tree operations, deletion, balancing, and the way tree height determines time and space costs.
A practical guide to integrating problem definition, data representation, modular programming, algorithms, complexity analysis, testing, correctness, and ethical evaluation into a responsible computer science capstone.
Reviews how interrupts support event handling and multitasking, and how Linux system calls use the RISC-V `ecall` instruction and register conventions.
This quiz covers process management, context switching and scheduling, multitasking, traps and interrupts, and RISC-V privilege transitions.
A quiz on operating-system system calls, including privileged-operation requests, process creation and execution with fork, exec, and waitpid, and signal handling.