chapter 6 Flashcards

1
Q

What is software design?

A

Software design involves specifying the structure of a software system without implementing the complete code.

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

The most common design approach is ________

A

Object-Oriented,

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

How is Object-Oriented structure is usually represented?

A

by Classes and by Class interactions

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

What does software design transition from _______ to ______ ?

A
  • “what” the system must do to
  • “how” the system will do it.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How are nouns and verbs utilized in the design process?

A
  • Nouns are potential classes, objects, and fields [ student, grade, order, registration form ]
  • verbs are potential methods or responsibilities of a class. [ register, encode grade, submit order ]
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What do relationships between nouns in design signify?

A

Relationships between nouns in design represent potential interactions, such as containment, generalization, or dependence.

  • Student registers for Course
  • customer orders pizza
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What questions does the design process aim to answer?

A

The design process seeks to answer questions like:

  • Which nouns should be classes?
  • Which ones become fields?
  • What verbs should be methods?
  • What interactions exist between classes?
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is CRC, and how is it used to identify classes?

A

CRC stands for Class-Responsibility-Collaborators.

It helps identify classes by creating cards where :

  • the class name is on top,
  • followed by responsibilities (problems to be solved) and
  • collaborators (classes that receive messages).
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What are the types of classes in CRC?

A
  • Entity class
  • Boundary class
  • Control class
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

_______ is a.k.a domain class

A

Entity class

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

Entity class are the most important classes.

A

t

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

entity class exists in the ______

A

problem domain. E.g student, course

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

________ a class that exists on a system’s automation boundary [ web page, input window ]

A

Boundary class or view class

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

what is a Control class?

A

Is a class that mediates between boundary classes and entity classes, acting as a switchboard between the view layer and domain layer

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

_______ takes an event from boundary
class and calls the Entity class?

A

Control class

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

Why do we create CRCs for classes that collaborate with the primary object class?

A

To complete a use case, CRCs for collaborating classes are created by asking questions about their responsibilities and the information they need to fulfill those responsibilities.

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

_______ represents a collection of similar object in CRC?

A

A class

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

_______ is something that a class knows or does in CRC

A

responsibility

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

________ is another class that a class interacts with to fulfill its responsibilities in CRC?

A

collaborator

20
Q

What is the purpose of noun analysis from requirements?

A

Noun analysis from requirements helps identify essential elements in a system by focusing on nouns and their attributes.

UNIVERSITY
- have records of student and staff
- records = id, name, # no, …
- Subjects
- Salary …

21
Q

What is A UML class diagram?

A

A picture that Shows classes and relationships among them.

22
Q

What elements are Not represented in a UML class diagram?

A

– details of how the classes interact with each other
– algorithmic details; how a particular behavior is implemented

23
Q

What is meant by flexibility in UML class diagrams?

A
  • Same class can be modeled in 4 different ways:
    – With no attributes or operations shown
    – With only the attributes shown
    – With only the operations shown
    – With both the attributes and operations shown
24
Q

______ is always the first component of the class box

A

The name of the class

25
Q

_______ is a property of a class

A

Attribute
Circle (centreX, centreY)

26
Q

_________ is sth that a class can do?

A

operation

27
Q

______ begins below a line separating them from class name and ______ below a line separating them from the attributes?

A
  • attributes
  • operations
28
Q

_______ specifies the extent to which other classes can use a given class’s attributes or operations?

A

Visibility

29
Q
A
30
Q

What are the Three levels of visibility?

A

*public level
*protected level
*private level

31
Q

In _________ level is usability open only to classes that inherit from original class?

A

protected

32
Q

What does class multiplicity specify in a class?

A

Class multiplicity specifies the number of instances (objects) of that class that can exist simultaneously.

33
Q

What are the different types of relationships between classes?

A
  • Association (delegation),
  • Generalization (inheritance),
  • Realization (interfaces),
  • Dependency.
34
Q

How is Association represented between classes?

A

Association is a link.
- represented by a solid line between classes, with an example being “A Person works for a Company.”

35
Q

What are Association Properties?

A
  • Name – Name of the association
  • Role – The specific role of the association
    • employee | employer
  • Multiplicity – Indicates the number of objects that are connected
  • Type – Plain association, aggregation, composition
  • Direction – Direction can also be shown for a association
36
Q

How is Multiplicity used in Association?

A

specify the number of links that can exist between instances (objects) of the associated classes.

37
Q

Multiplicity can be expressed as?

A
  • Exactly one - 1
  • Zero or one - 0..1
  • Many - 0..* or *
  • One or more - 1..*
  • Exact Number - e.g. 3..4 or 6
  • Or a complex relationship – e.g. 0..1, 3..4, 6..* would mean
    any number of objects other than 2 or 5
38
Q

An association that connects a class to itself is
called a _________

A

self association.

39
Q

what are the 2 types of association?

A
  • aggregation
  • composition
40
Q

explain aggregation.

A
  • “is part of” / “Has a”
    ■ Unidirectional/not vice versa
  • clear white diamond
  • collage | teacher
41
Q

explain composition.

A
  • “is entirely made of“ / “Contained”
    ■ stronger version of aggregation
    ■ the parts live and die with the whole
    ■ black diamond
  • book | page
42
Q

explain Generalization (Inheritance).

A
  • Child class is a special case of the parent class
  • Animal [cat , dog ]
43
Q

Inheritance - Implementation?

A

public class Animal {
}

public class Cat extends Animal {
}

public class Dog extends Animal {
}

44
Q

The relationship between a class and an interface is called ________

A

realization

45
Q

explain an interface.

A
  • Interface is a class with no attributes, only method signatures
  • «interface» Animal
    • getSound()

■ Classes can implement the methods
■ Relationship Represented by a dashed, white arrow

46
Q

What is Dependency?

A
  • Explains that Change in specification of one class can change the other class
  • can also be used to show relationships between classes and objects.
47
Q

______ classes are left out from UML class diagram since Including them makes the diagram complex?

A

Boundary classes