Exam 3 MIS 4050 OU

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

What are the two symbols of visibility?

+ = public - = private

What are the specifications of the use case controller pattern?

- pattern name -problem that requires a solution -solution to or explanation of the pattern -example of the pattern -benefits and consequences of the pattern

Adapter pattern

- similar to protection from variations and indirection design principles - it plugs an external component into an existing system - adapter class is inserted to convert the method calls from within the system to the method names in the external class

What are the steps in OOD?

1. choose a single use case 2. create a model, the depends not the complexity of use case 3. produce a complete DCD

What are three methods for updating and packaging the DCD?

1. constructor methods 2. data-get and data-set methods 3. use-case specific methods

What are the 4 standard stereotypes?

1. entity class - /persistent class 2. boundary/view class 3. controller class 4. data access class

What two types of information are captured during analysis to define requirements?

1. information about things 2. information about the business processes

What 3 layers are in a system and what are there responsibilities?

1. input window: responsible for formatting and presenting information not the screen 2. domain layer: responsible for business logic layer for the use case, acts out the use case 3. data access layer: responsible for connecting to the database

What are the 6 fundamental principles of good design of DCD?

1. object responsibility 2. separation of responsibilities 3. protection of variations 4. indirection 5. coupling 6. cohesion

What are the four design patterns?

1. use case controller 2. adapter 3. Factory 4. Singleton

Stereotype

A way to categorize a model element as a certain type by its characteristics

Separation of responsibilities

Applied to a group of classes - segregate classes into packages or groupings based on primary focus of processing responsibilities -fundamental principle behind multilayer design because each layer has a particular focus and are grouped together based on that

What is the second compartment of the DCD?

Attributes

What is bad about low cohesion?

Hard to maintain -overly sensitive - hard to reuse because many different functions - difficult to understand

A class that is used to retrieve data from and send data to a database is known as

Data Access Class

What layer is the database access object?

Data layer

Visibility

Denotes whether other objects can directly access the attributes

What is a strength of object oriented design?

Design models are an extension of the requirement models

What layer is the student object?

Domain layer

Persistent Classes

Entity stereotyped class with objects that exist after the program quits - objects of an entity classes usually need to be remembered and are also referred to as persistent classes

True or False: Object responsibility is a design principle in which parts of a system that are unlikely to change are segregated from those that will.

False

True or False? You add the data access layer first to the sequence diagram and then the view layer.

False

True or false: a class can have only one object

False

True or false? The adapter class in the adapter pattern does not inherit those method names and provides the method logic for those methods from the original design.

False

True or false? High coupling is better than Low coupling.

False

True or false? Requiring the user/actor to create a new cart rather than the system doing it itself is great idea.

False It is a poor idea, never require the user to perform an act if the system can do it automatically

True or false? In multilayer design, every system needs a view layer and a data access class.

False, Every system will need a view layer to represent the input and output screens for application but the data access classes are not always required (only when business logic is fairly complex)

True or false? If a sequence interaction diagram, if the use case were add item to cart and there was already a first item in the cart, the sequence of the messages would begin from the very beginning not skipping any.

False, a sequence of messages would be skipped to just add the item straight to the cart already created.

GoF

Gang of Four -Erich Gamma - Richard Helm -Ralph Johnson -John Vlissides Wrote a book that made design patterns widely accepted for OO

Design class Diagram

an extension of the domain model class diagram that was developed during analysis activities and requirements

In the sequence of events that are OOP: 1. enter student ID 2. Request student object 3. retrieve student info 4. enter personal updates 5. update student info 6. save updates to database What object does 3 and 6 go to? a. input window object b. student object c. database access object

c. database access object, first the student object asks the database access object to retrieve the data already entered, in 6 the new updated information that is created in student object is forwarded to be saved into database

What is a benefit of sequence diagrams?

Laying out messages from top to bottom to emphasize the sequence of firing.

Entity class stereotype

Main class (business logic class) - describes something user deal with when doing their work

Instantiation

Making an instance (an object) based on the template provided by the class definitions - object does not exist until program begins to execute

What are interactions between objects called?

Messages

What is the third compartment of the DCD?

Methods

Perfect solution assumption

No exception conditions, no error handling is included - no logic is included to handle a situation in which the requested catalog or product is not found

Object

Object oriented programming consists of computing object: - each object has data and program logic encapsulated within itself

Object responsibility

Objects should be responsible for carrying out system processing - what an object is expected to know and do

Protection from variation

Parts of a system that are unlikely to change should be segregated or protected from those that will change - affects the multilayer design pattern

Indirection

Principle of separating 2 classes or other system components by placing an intermediate class between them to serve as a link

Activation lifelines

Representation of the period during which a method of an object is alive and executing

What principle of designing DCD is the motivating factor behind the design of the data access layer?

Separation of responsibilities

Boundary/View class

Specifically designed to live on the system's automation boundary - windows classes/ web pages/ user interface Boundary class: user/system interface (an input window)

What is in the first compartment of the DCD?

Stereotype name and class name

True or False: In OOP, it consists of many objects

True

True or False: Combining interface code with business logic code violates the protection from variation principle.

True

True or False: Identifying and specifying all the objects that must work together to carry out each use case is the main objective of object-oriented detailed design.

True

True or False: The intermediate class placed between two classes to decouple them is known as indirection.

True

True or False: With object-oriented design (OOD), the design models are extensions of the analysis models.

True

True or False? An OOP consists of a set of these instantiated objects that cooperate to accomplish a result. They work together by sending each other messages and working in concert to support the functions of the main program.

True

True or False? Factory pattern reduces coupling, enhances cohesion, and assigns responsibilities to the right classes.

True

True or False? Sequence diagrams are more detailed and allow the designer to visually document the process flow of messages.

True

True or False? Systems design is the bridge between user requirements and programming new system

True

True or False? The 6 fundamental principles of design increases the probability that the design of the DCD is solid.

True

True or False? Communication diagrams and sequence diagrams are UML interaction diagrams.

True

True or false? Adding the data access layer to the sequence diagram is complex.

True

True or false? Developing a system without doing design is comparable to writing a research paper without an outline

True

True or false? OOD is use-case driven

True

True or false? Using indirection the classes go from A -> C -> B instead of A -> B

True

True or false? A particular class might get instantiated from multiple locations but only one instance needs to be created

True

True or false? Design classes don't have foreign keys.

True

True or false? For any particular use case, messages come from the external actor to a windows class and then to a problem domain class.

True

True or false? Some classes must have exactly one instance like a factory class or a main window class

True

True or false? Systems design provides a cohesive, complete, comprehensive new system.

True

True or false? The realization of a use case (determining what objects collaborate and the messages they send to each other to carry out the use case) is done through the development of an interaction diagram.

True

True or false? The use case controller pattern answers the question of which problem domain class should receive input messages to reduce coupling, maintain highly cohesive domain classes, and maintain independence between the user interface and the domain layer.

True

True or false? High cohesion is better than low cohesion.

True

True or false? It is a problem when designers mix together all the user interface logic and business logic together in the same classes because when an interface needs to be updated all the business logic needs to be rewritten.

True A better approach is to decouple user interface from the business logic

True or False: DCD is a growing model.

True As each use case design is finished, new methods are added to existing DCD

True or False? In the sequence of events that are: 1. enter student ID 2. Request student object 3. retrieve student info 4. enter personal updates 5. update student info 6. save updates to database this is all for only one use case...

True (update student info)

What layer is the window object?

View object

The term used to describe whether an attribute can be directly accessed by another object (class) or if its restricted is _______________.

Visibility

Methods

Within each object, the program logic exists in small segments - invoked through message - getFullName() are pieces of executable code that carry out the functions of the class

Data Access Class

a class that is used to retrieve data from and send data to a database

Controller Class

a class that mediates between boundary classes and entity classes, acting as a switchboard between the boundary or view layer and domain layer -get the information/data from the boundary class (view) to the entity class

Coupling

a qualitative measure of how closely the classes in a design class diagram are linked - # of association relationships and whole/part relationships on the DCD - does not measure individual class but as it progresses use case by use case

Use Case realization

method used to extend the process of detailed design - each use case is taken individually to determine all classes that collaborate with it - any other utility or support classes are identified

Object Oriented Design

process by which a set of detailed OO design models are built which are then used by the programmers to write and test new systems -identifies and describes the classes within each layer and defines the message that are used to invoke the methods of the involved classes

Singleton

provides a solution in which the class itself controls the creation of only one instance -has code that applies to itself as a static method - mostly like a service class that manages a system resource such as a database connection

Design patterns

standard design techniques and templates that are widely recognized as good practice - can speed up OO design work

perfect technology assumption

the assumption that a system runs under perfect operating and technological conditions - do not include user logs on

Use case controller

Acts as a switchboard, taking input messages and routing them to the correct domain class - acts as an intermediary between the outside world and the internal system

Data type/property for attributes

Character, string, integers, number or key if applicable

What do the boxes represent in the sequence diagram?

Classes

Factory

Classes that instantiate objects from utility classes - the factory will create a new data access object and return the reference

The measure of focus or unity of purpose within a single class is known as

Cohesion

An instance of a class in object-oriented programming is known as ___________________.

Instantiation

The process of creating an object based on a class is called

Instantiation

Class

The class definition describes the structure or a template of what an executing object looks like -analysts define the structure of the program logic and data fields by defining a class

What are the objects in a sequence diagram?

The classes are being used to create the objects. Thereafter an object gets used by the system to allow a user to view their properties (ex: first name, gpa) or perform an action (ex: update information).

Cohesion

The consistency of the functions within a single class and is a qualitative measure of its focus or its unity of purpose

What is the advantage of adding the view layer to the sequence diagram?

The programmer can see how the view layer classes integrate with the rest of the design.

What is the objective in design models?

To identify and define methods that are required in each class

An input window (a form) is an example of a _______________ design class type. a. boundary b. controller c. entity d. persistent

a. boundary

In the sequence of events that are: 1. enter student ID 2. Request student object 3. retrieve student info 4. enter personal updates 5. update student info 6. save updates to database What object does 1 and 4 go to? a. input window object b. student object c. database access object

a. input window object (displays a form)

Which of the following is TRUE about high coupling? a. it increases complexity b. it reduces ripple effects in a system when changes occur c. it makes systems easier to maintain d. it reduces complexity

a. it increases complexity

What is an example of an object in the sequence diagram?

aC: Customer In this case aC is the object and Customer is the class. This tells you that the Customer class will create an object called aC

Which of the following classes act as a switchboard between business logic and the boundary layers? a. persistent b. controller c. DCD d. none of the above

b. controller

A negative sign (-) indicates that a method is: a. public b. private c. primary key d. none of the answers

b. private

The top compartment of a class in a DCD includes: a. attributes b. stereotype and class name c. methods d. visibility

b. stereotype and class name

In the sequence of events that are: 1. enter student ID 2. Request student object 3. retrieve student info 4. enter personal updates 5. update student info 6. save updates to database What object does 2 and 5 go to? a. input window object b. student object c. database access object

b. student object (window object sends message to the student object to tell it to create a new student object (instance)) and once updated info is put in window object it is sent to the student object

In a design class diagram, a stereotype is shown using a. ( ) b. «» c. { } d. --

b. «»

The measure of consistency of functions within a single class is known as: a. coupling b. encapsulation c. object d. none of the above

d. none of the above

Which of the following is the correct notation for a method signature in a design class? a. visibility name: type-expression {parameter list} b. name: class-name (parameter list):return data type c. visibility class-name: name: return data type {parameter list} visibility name(parameter list): return data type d. visibility name(parameter list): return data type

d. visibility name(parameter list): return data type

Which of the following is the correct notation for an attribute in a design class? a. visibility name: data-type initial-value(property) b. visibility class-name: data-type {property} c. visibility name: initial-value{property} d. visibility name: data-type = initial-value {property}

d. visibility name: data-type = initial-value {property}

Interaction Diagram

focus on interactions between the objects that are required to execute a particular use case

What must the design model provide in regards to information?

information required to: 1. identify the class - for a single use case 2. document flow of execution - for a single use case


Ensembles d'études connexes

RP: 2/Comissioner/Diff license/exemptions/how to get license

View Set

Integrated Business policy Chapter 1

View Set

Data Types (Work with Data 25-30% of Exam)

View Set