Class Design Flashcards
What are the stages of software development?
- Establishing the requirements
- Creating a design
- Implementing the code
- Testing the implementation
- Maintaining the implementation
What is the purpose of software requirements?
Software requirements specify the tasks a program must accomplish.
What does a software design specify?
A software design specifies how a program will accomplish its requirements.
What is an algorithm?
An algorithm is a step-by-step process for solving a problem.
What are activity diagrams used for?
To describe the flow of different activities and actions.
What are the main components of a Use Case diagram?
- Functional requirements
- Actors
- Relationships between actors and use cases
What are State UML diagrams used for?
To describe the different states of a component within a system.
What do UML Class diagrams contain?
Classes, attributes, and behaviours of the software.
What is the process of implementation in software development?
Translating a design into source code.
What is debugging?
The process of discovering the causes of problems and fixing them.
What is regression testing?
Testing to ensure existing functionality is maintained after modifications.
What is the goal of low coupling in software design?
To minimize the interdependence between classes.
What does encapsulation achieve in software design?
It reduces coupling by hiding the internal state of an object.
What is a black box in the context of encapsulation?
An encapsulated object whose inner workings are hidden from the client.
What are the visibility modifiers in Java?
- public
- protected
- private
What does high cohesion in a class refer to?
A class should represent one single, well-defined entity in the problem domain.
What is the benefit of high cohesion in methods?
A method should only be responsible for one well-defined task.
Fill in the blank: A program should be executed multiple times with various input in an attempt to find _______.
errors
True or False: High coupling is preferred in software design.
False
Which one of these is not an activity of program development?
1. System Requirements
2. Encapsulation
3. Creating a Design
4. Testing and Debugging
- Encapsulation
What is the divide-and-conquer approach in software design?
Dividing a problem into sub-problems that can be easily solved.
What does the ClockDisplay class represent?
A digital clock with functionalities to set and increment time.
What is the importance of careful attention to software requirements?
It can save significant time and expense in the overall project.
What is the relationship between coupling and change in software design?
High coupling can necessitate changes in several classes when one class is modified.
What is the main focus during the implementation stage?
Coding details, including style guidelines and documentation.
What is the role of visibility modifiers in encapsulation?
They specify the accessibility of methods and data values within a class.
Fill in the blank: A cohesive method should only be responsible for _______.
one well-defined task
What is the significance of well-defined interfaces in class design?
They facilitate communication between classes with low coupling.
What does a class diagram illustrate?
The structure of classes and their relationships in a system.