(6,7,8) Software Construction Quiz 3

0.0(0)
studied byStudied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/26

flashcard set

Earn XP

Description and Tags

Slides 6,7, 8

Last updated 3:09 AM on 10/7/24
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

27 Terms

1
New cards

CRC Cards

Contains information of class, responsibility (knows or does), potential collaborators (other class used to get information or perform action)

May contain superclasses/subclasses, description and attributes on back.

<p>Contains information of class, responsibility (knows or does), potential collaborators (other class used to get information or perform action)</p><p>May contain superclasses/subclasses, description and attributes on back.</p>
2
New cards

Advantages of CRC Cards

Portable, Anthropomorphic, involvement increase, useful, serves as input/starting point, eases transition from process to objects, general size bound

3
New cards

CRC Process

Exploratory phase - find classes, determine responsibilities, collaborators

Analysis phase - collect into subsystems (group classes)

4
New cards

Properties of good class

Clear/recognizable name, uppercase letter singular noun, has responsibilities, participates in system

5
New cards

Class Responsibilities

Public services provided to other objects and system

6
New cards

Knowledge and Action

Knowing - private encapsulated data, related objects, things derived

Doing - creating an object, initiating/controlling action/activities in other objects

7
New cards

Identifying Responsibilities

Verb-phrase identification - identify verbs

Scenarios and role play - walk-through where people play classes

Class enumeration - create initial set of responsibilities and designate them to enumerated classes

Class relationship examination - examine how class relationships fulfill responsibilities

8
New cards

Collaboration

Request from one object to another in order to fulfill a responsibility.

9
New cards

“Is-part-of” Relationship between classes

Imply responsibilities for maintaining information OR fulfill responsibilities by delegating them. (Composition and Aggregation) (students as part of school)

10
New cards

“Has-knowledge-of” Relationship

May know other classes that are not in part-of relationships (associations in UML) (teacher has knowledge of subject)

11
New cards

Collaboration Graph

Arrows point from client(class) to contract(semi-circle).

<p>Arrows point from client(class) to contract(semi-circle).</p>
12
New cards

Exploratory Phase

Identify preliminary list of classes, responsibilities, collaborations. (all identified classes are probably concrete and few may have been identified as abstract)

13
New cards

Analysis Phase

Obtain global understanding of design using Hierarchy graphs, Venn diagrams, Contracts

14
New cards

Hierarchy Graph

Tree representation of inheritance, parents are superclasses, children are subclasses, arcs represent abstract class.

<p>Tree representation of inheritance, parents are superclasses, children are subclasses, arcs represent abstract class.</p>
15
New cards

Venn Diagram

Views class as set of responsibilities. (Ordered and Indexable are properties of all Matrix,Array, and String)

<p>Views class as set of responsibilities. (Ordered and Indexable are properties of all Matrix,Array, and String)</p>
16
New cards

If B supports only a part of the responsibilities for A, make a new abstract class C and have both A and B extend from them.

knowt flashcard image
17
New cards

It only takes one responsibility to create an abstract class.

Ellipse and Rectangle are both Filled, so Filled Element is created as an abstract class.

<p>Ellipse and Rectangle are both Filled, so Filled Element is created as an abstract class.</p>
18
New cards

Contract

Set of cohesive responsibilities that a client can depend on. (Defines set of requests client make to server, server is guaranteed to respond). An abstraction analysis technique for refining hierarchy and identifying subsystems.

19
New cards

True Or False: Responsibilities are the basis for determining contracts.

True

20
New cards

True or False: A class can support any number of contracts.

True

21
New cards

True or False: All responsibilites will be part of contract.

False (private responsibilities)

22
New cards

True or False: A responsibility may only be a part of at most one contract.

True (cannot have same responsibility in different contracts)

23
New cards

True or False: Contracts are used in a collaboration

True

24
New cards

Contract Documentation

A contract is a set of responsibilities.

<p>A contract is a set of responsibilities.</p>
25
New cards

Guideline 1 for Defining Contract

Group responsibilities used by same clients

26
New cards

Guideline 2 for Defining Contract

Maximize cohesiveness of classes

27
New cards

Guideline 3 for Defining Contract

Minimize coupling of classes by reducing the number of contracts

(provide general interface, use polymorphism, look for similar responsibilities to generalize, define classes for classes at the top of hierarchy, add new contracts only for subclasses that add new functionality.