(6,7,8) Software Construction Quiz 3

studied byStudied by 0 people
0.0(0)
learn
LearnA personalized and smart learning plan
exam
Practice TestTake a test on your terms and definitions
spaced repetition
Spaced RepetitionScientifically backed study method
heart puzzle
Matching GameHow quick can you match all your cards?
flashcards
FlashcardsStudy terms and definitions

1 / 26

flashcard set

Earn XP

Description and Tags

Slides 6,7, 8

27 Terms

1

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>
New cards
2

Advantages of CRC Cards

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

New cards
3

CRC Process

Exploratory phase - find classes, determine responsibilities, collaborators

Analysis phase - collect into subsystems (group classes)

New cards
4

Properties of good class

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

New cards
5

Class Responsibilities

Public services provided to other objects and system

New cards
6

Knowledge and Action

Knowing - private encapsulated data, related objects, things derived

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

New cards
7

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

New cards
8

Collaboration

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

New cards
9

“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)

New cards
10

“Has-knowledge-of” Relationship

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

New cards
11

Collaboration Graph

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

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

Exploratory Phase

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

New cards
13

Analysis Phase

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

New cards
14

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>
New cards
15

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>
New cards
16

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
New cards
17

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>
New cards
18

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.

New cards
19

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

True

New cards
20

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

True

New cards
21

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

False (private responsibilities)

New cards
22

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

True (cannot have same responsibility in different contracts)

New cards
23

True or False: Contracts are used in a collaboration

True

New cards
24

Contract Documentation

A contract is a set of responsibilities.

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

Guideline 1 for Defining Contract

Group responsibilities used by same clients

New cards
26

Guideline 2 for Defining Contract

Maximize cohesiveness of classes

New cards
27

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.

New cards
robot