Class Design Flashcards

1
Q

What are the stages of software development?

A
  1. Establishing the requirements
  2. Creating a design
  3. Implementing the code
  4. Testing the implementation
  5. Maintaining the implementation
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is the purpose of software requirements?

A

Software requirements specify the tasks a program must accomplish.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What does a software design specify?

A

A software design specifies how a program will accomplish its requirements.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is an algorithm?

A

An algorithm is a step-by-step process for solving a problem.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What are activity diagrams used for?

A

To describe the flow of different activities and actions.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What are the main components of a Use Case diagram?

A
  • Functional requirements
  • Actors
  • Relationships between actors and use cases
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What are State UML diagrams used for?

A

To describe the different states of a component within a system.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What do UML Class diagrams contain?

A

Classes, attributes, and behaviours of the software.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is the process of implementation in software development?

A

Translating a design into source code.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is debugging?

A

The process of discovering the causes of problems and fixing them.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is regression testing?

A

Testing to ensure existing functionality is maintained after modifications.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is the goal of low coupling in software design?

A

To minimize the interdependence between classes.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What does encapsulation achieve in software design?

A

It reduces coupling by hiding the internal state of an object.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is a black box in the context of encapsulation?

A

An encapsulated object whose inner workings are hidden from the client.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What are the visibility modifiers in Java?

A
  • public
  • protected
  • private
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What does high cohesion in a class refer to?

A

A class should represent one single, well-defined entity in the problem domain.

17
Q

What is the benefit of high cohesion in methods?

A

A method should only be responsible for one well-defined task.

18
Q

Fill in the blank: A program should be executed multiple times with various input in an attempt to find _______.

19
Q

True or False: High coupling is preferred in software design.

20
Q

Which one of these is not an activity of program development?
1. System Requirements
2. Encapsulation
3. Creating a Design
4. Testing and Debugging

A
  1. Encapsulation
21
Q

What is the divide-and-conquer approach in software design?

A

Dividing a problem into sub-problems that can be easily solved.

22
Q

What does the ClockDisplay class represent?

A

A digital clock with functionalities to set and increment time.

23
Q

What is the importance of careful attention to software requirements?

A

It can save significant time and expense in the overall project.

24
Q

What is the relationship between coupling and change in software design?

A

High coupling can necessitate changes in several classes when one class is modified.

25
What is the main focus during the implementation stage?
Coding details, including style guidelines and documentation.
26
What is the role of visibility modifiers in encapsulation?
They specify the accessibility of methods and data values within a class.
27
Fill in the blank: A cohesive method should only be responsible for _______.
one well-defined task
28
What is the significance of well-defined interfaces in class design?
They facilitate communication between classes with low coupling.
29
What does a class diagram illustrate?
The structure of classes and their relationships in a system.