3380 Object Oriented Design Final

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

Component Based Architecture

Breakdown the application design into reusable functional or logical components that expose well-defined communication interfaces.

Service-Oriented Architecture (SOA)

Defines the applications that expose and consume functionality as a service using contracts and messages.

Object oriented Architecture

Based on the division of responsibilities of an application or system into objects, each containing the data and the behavior relevant to the object.

Builder Design Pattern

Builder pattern builds a complex object using simple objects and using a step by step approach. This type of design pattern comes under creational pattern as this pattern provides one of the best ways to create an object. A Builder class builds the final object step by step. This builder is independent of other objects.

Interpreter Design Pattern

Interpreter pattern provides a way to evaluate language grammar or expression. This type of pattern comes under behavioral pattern. This pattern involves implementing an expression interface which tells to interpret a particular context. This pattern is used in SQL parsing, symbol processing engine etc.

Memento Design Pattern

Memento pattern is used to restore state of an object to a previous state. Memento pattern falls under behavioral pattern category.

Message Bus Architecture

Prescribes use of a software system that can receive and send messages using one or more communication channels.

Singleton Design Pattern

Singleton pattern is one of the simplest design patterns in Java. This type of design pattern comes under creational pattern as this pattern provides one of the best ways to create an object. This pattern involves a single class which is responsible to create an object while making sure that only single object gets created. This class provides a way to access its only object which can be accessed directly without need to instantiate the object of the class.

Complete problem-domain models should include design details of the software system being developed. a) False b) True

a)

Modeling use cases can be a effective tool for eliciting and describing key requirements. a) True b) False

a)

Adapter Design Pattern

Adapter pattern works as a bridge between two incompatible interfaces. This type of design pattern comes under structural pattern as this pattern combines the capability of two independent interfaces. This pattern involves a single class which is responsible to join functionalities of independent or incompatible interfaces. A real life example could be a case of card reader which acts as an adapter between memory card and a laptop. You plugin the memory card into card reader and card reader into the laptop so that memory card can be read via laptop.

Command Design Pattern

Command pattern is a data driven design pattern and falls under behavioral pattern category. A request is wrapped under an object as command and passed to invoker object. Invoker object looks for the appropriate object which can handle this command and passes the command to the corresponding object which executes the command.

Composite Design Pattern

Composite pattern is used where we need to treat a group of objects in similar way as a single object. Composite pattern composes objects in term of a tree structure to represent part as well as whole hierarchy. This type of design pattern comes under structural pattern as this pattern creates a tree structure of group of objects. This pattern creates a class that contains group of its own objects. This class provides ways to modify its group of same objects.

Layered Architecture

Divide the concerns of the application into stacked groups (layers).

Filter Design Pattern

Filter pattern or Criteria pattern is a design pattern that enables developers to filter a set of objects using different criteria and chaining them in a decoupled way through logical operations. This type of design pattern comes under structural pattern as this pattern combines multiple criteria to obtain single criteria.

Domain Driven Design Architecture

Focused on modeling a business domain and defining business objects based on entities within the business domain.

Visitor Design Pattern

In Visitor pattern, we use a visitor class which changes the executing algorithm of an element class. By this way, execution algorithm of element can vary as and when visitor varies. This pattern comes under behavior pattern category. As per the pattern, element object has to accept the visitor object so that visitor object handles the operation on the element object.

Proxy Design Pattern

In proxy pattern, a class represents functionality of another class. This type of design pattern comes under structural pattern. In proxy pattern, we create object having original object to interface its functionality to outer world.

Mediator Design Pattern

Mediator pattern is used to reduce communication complexity between multiple objects or classes. This pattern provides a mediator class which normally handles all the communications between different classes and supports easy maintenance of the code by loose coupling. Mediator pattern falls under behavioral pattern category.

Observer Design Pattern

Observer pattern is used when there is one-to-many relationship between objects such as if one object is modified, its dependent objects are to be notified automatically. Observer pattern falls under behavioral pattern category.

Prototype Design Pattern

Prototype pattern refers to creating duplicate object while keeping performance in mind. This type of design pattern comes under creational pattern as this pattern provides one of the best ways to create an object. This pattern involves implementing a prototype interface which tells to create a clone of the current object. This pattern is used when creation of object directly is costly. For example, an object is to be created after a costly database operation. We can cache the object, returns its clone on next request and update the database as and when needed thus reducing database calls.

There are following six phases in every Software development life cycle model:

Requirement gathering and analysis Design Implementation or coding Testing Deployment Maintenance

Client/server Architecture

Separate the system into two applications, where the client makes requests to the server.

3-tier or N-tier Architecture

Separates the functionality into separate segments with each segment being a tier located on a physically separate computer.

Which of the following activities should occur soonest in software developemnt project? a) Risk analysis b) Specification c) Documentation d) Cost Estimation

a)

Which of the following is not an advantage of using design patterns a) code reuse b) communication among team members c) lack of support tools d) capture concepts that are widespread

c)

Which of the following is/are useful for documenting design patterns a) SQL b) Agile dev c) pattern languages d) neural networks

c)

Which of the following is not a design pattern a) pipe-filter b) MVC c) reactor d) iterative process e) iterator

d)

Which of the following is not an agile process model? a) Scrum b) DSD c) Extreme Programming d) Transformative

d)

Which of the following is not part of a design pattern structure a) pattern name b) also known as c) known uses d) pattern cost

d)

What is the most expensive phase in a software development life cycle? a) Design b) Maintenance c) Implementation d) Analysis e) Testing

e)

State Design Pattern

In State pattern a class behavior changes based on its state. This type of design pattern comes under behavior pattern. In State pattern, we create objects which represent various states and a context object whose behavior varies as its state object changes.

Strategy Design Pattern

In Strategy pattern, a class behavior or its algorithm can be changed at run time. This type of design pattern comes under behavior pattern. In Strategy pattern, we create objects which represent various strategies and a context object whose behavior varies as per its strategy object. The strategy object changes the executing algorithm of the context object.

Template Design Pattern

In Template pattern, an abstract class exposes defined way(s)/template(s) to execute its methods. Its subclasses can override the method implementation as per need but the invocation is to be in the same way as defined by an abstract class. This pattern comes under behavior pattern category.

Iterator Design Pattern

Iterator pattern is very commonly used design pattern in Java and .Net programming environment. This pattern is used to get a way to access the elements of a collection object in sequential manner without any need to know its underlying representation. Iterator pattern falls under behavioral pattern category.

Evolutionary Software process models a) Are iterative in nature b) can easily accommodate product requirements changes c) do not generally produce throwaways systems d) All of the above

a)

Which architecture is most appealing for a system to perform transactions against a database? a) Repository architecture. b) Client-server architecture. c) Virtual machine architecture. d) Data-flow architecture.

a)

Null Object Design Pattern

In Null Object pattern, a null object replaces check of NULL object instance. Instead of putting if check for a null value, Null Object reflects a do nothing relationship. Such Null object can also be used to provide default behaviour in case data is not available. In Null Object pattern, we create an abstract class specifying various operations to be done, concrete classes extending this class and a null object class providing do nothing implemention of this class and will be used seamlessly where we need to check null value.

MVC Design Pattern

MVC Pattern stands for Model-View-Controller Pattern. This pattern is used to separate application's concerns. Model - Model represents an object or JAVA POJO carrying data. It can also have logic to update controller if its data changes. View - View represents the visualization of the data that model contains. Controller - Controller acts on both model and view. It controls the data flow into model object and updates the view whenever data changes. It keeps view and model separate.

Which architecture is most appealing for modeling a mouse click action? a) Event system architecture. b) Client-server architecture. c) Layered architecture. d) Data-flow architecture.

a)

Which of the following activities was the waterfall model created to avoid? a) Rework b) Testing c) Planning d) Documentation e) Communication

a)

In a software project team within Microsoft, what type of people are involved: a) Marketing b) Software Devs c) Rocket Scientists d) Testers

a) b) d)

In which of the following development processes is pair programming commonly practiced? a) Agile b) Spiral c) Evoltionary Prototyping d) Incremental

a) b)

Which of the following is/are part of the reactor pattern? a) an infinite event loop b) event handlers c) databases d) file handling

a) b)

In Extreme Programming each pair maintains the requirements in the form of a) a book b) CRC cards c) a disk d) a database

b)

Chain of Responsibility Design Pattern

As the name suggests, the chain of responsibility pattern creates a chain of receiver objects for a request. This pattern decouples sender and receiver of a request based on type of request. This pattern comes under behavioral patterns. In this pattern, normally each receiver contains reference to another receiver. If one object cannot handle the request then it passes the same to the next receiver and so on.

Bridge Design Pattern

Bridge is used when we need to decouple an abstraction from its implementation so that the two can vary independently. This type of design pattern comes under structural pattern as this pattern decouples implementation class and abstract class by providing a bridge structure between them. This pattern involves an interface which acts as a bridge which makes the functionality of concrete classes independent from interface implementer classes. Both types of classes can be altered structurally without affecting each other.

Business Design Pattern

Business Delegate Pattern is used to decouple presentation tier and business tier. It is basically use to reduce communication or remote lookup functionality to business tier code in presentation tier code. In business tier we have following entities. Client - Presentation tier code may be JSP, servlet or UI java code. Business Delegate - A single entry point class for client entities to provide access to Business Service methods. LookUp Service - Lookup service object is responsible to get relative business implementation and provide business object access to business delegate object. Business Service - Business Service interface. Concrete classes implement this business service to provide actual business implementation logic.

Composite Entity Design Pattern

Composite Entity pattern is used in EJB persistence mechanism. A Composite entity is an EJB entity bean which represents a graph of objects. When a composite entity is updated, internally dependent objects beans get updated automatically as being managed by EJB entity bean. Following are the participants in Composite Entity Bean. Composite Entity - It is primary entity bean. It can be coarse grained or can contain a coarse grained object to be used for persistence purpose. Coarse-Grained Object - This object contains dependent objects. It has its own life cycle and also manages life cycle of dependent objects. Dependent Object - Dependent object is an object which depends on coarse grained object for its persistence lifecycle. Strategies - Strategies represents how to implement a Composite Entity.

Data Access Object Design Pattern

Data Access Object Pattern or DAO pattern is used to separate low level data accessing API or operations from high level business services. Following are the participants in Data Access Object Pattern. Data Access Object Interface - This interface defines the standard operations to be performed on a model object(s). Data Access Object concrete class - This class implements above interface. This class is responsible to get data from a data source which can be database / xml or any other storage mechanism. Model Object or Value Object - This object is simple POJO containing get/set methods to store data retrieved using DAO class.

Decorator Design Pattern

Decorator pattern allows a user to add new functionality to an existing object without altering its structure. This type of design pattern comes under structural pattern as this pattern acts as a wrapper to existing class. This pattern creates a decorator class which wraps the original class and provides additional functionality keeping class methods signature intact.

Facade Design Pattern

Facade pattern hides the complexities of the system and provides an interface to the client using which the client can access the system. This type of design pattern comes under structural pattern as this pattern adds an interface to existing system to hide its complexities. This pattern involves a single class which provides simplified methods required by client and delegates calls to methods of existing system classes.

Factory Design Pattern

Factory pattern is one of the most used design patterns in Java. This type of design pattern comes under creational pattern as this pattern provides one of the best ways to create an object. In Factory pattern, we create object without exposing the creation logic to the client and refer to newly created object using a common interface.

Flyweight Design Pattern

Flyweight pattern is primarily used to reduce the number of objects created and to decrease memory footprint and increase performance. This type of design pattern comes under structural pattern as this pattern provides ways to decrease object count thus improving the object structure of application. Flyweight pattern tries to reuse already existing similar kind objects by storing them and creates new object when no matching object is found. We will demonstrate this pattern by drawing 20 circles of different locations but we will create only 5 objects. Only 5 colors are available so color property is used to check already existing Circle objects.

Cohesion within a module is the degree to which communication takes place among the module's elements. Coupling is the degree to which modules communicate with other modules. What are the properties of good modular decompositions in software?

High cohesion low coupling

Transfer Object Design Pattern

The Transfer Object pattern is used when we want to pass data with multiple attributes in one shot from client to server. Transfer object is also known as Value Object. Transfer Object is a simple POJO class having getter/setter methods and is serializable so that it can be transferred over the network. It does not have any behavior. Server Side business class normally fetches data from the database and fills the POJO and send it to the client or pass it by value. For client, transfer object is read-only. Client can create its own transfer object and pass it to server to update values in database in one shot. Following are the entities of this type of design pattern. Business Object - Business Service fills the Transfer Object with data. Transfer Object - Simple POJO having methods to set/get attributes only. Client - Client either requests or sends the Transfer Object to Business Object.

Front Controller Design Pattern

The front controller design pattern is used to provide a centralized request handling mechanism so that all requests will be handled by a single handler. This handler can do the authentication/ authorization/ logging or tracking of request and then pass the requests to corresponding handlers. Following are the entities of this type of design pattern. Front Controller - Single handler for all kinds of requests coming to the application (either web based/ desktop based). Dispatcher - Front Controller may use a dispatcher object which can dispatch the request to corresponding specific handler. View - Views are the object for which the requests are made.

Intercepting Filter Design Pattern

The intercepting filter design pattern is used when we want to do some pre-processing / post-processing with request or response of the application. Filters are defined and applied on the request before passing the request to actual target application. Filters can do the authentication/ authorization/ logging or tracking of request and then pass the requests to corresponding handlers. Following are the entities of this type of design pattern. Filter - Filter which will performs certain task prior or after execution of request by request handler. Filter Chain - Filter Chain carries multiple filters and help to execute them in defined order on target. Target - Target object is the request handler Filter Manager - Filter Manager manages the filters and Filter Chain. Client - Client is the object who sends request to the Target object.

Service Locator Design Pattern

The service locator design pattern is used when we want to locate various services using JNDI lookup. Considering high cost of looking up JNDI for a service, Service Locator pattern makes use of caching technique. For the first time a service is required, Service Locator looks up in JNDI and caches the service object. Further lookup or same service via Service Locator is done in its cache which improves the performance of application to great extent. Following are the entities of this type of design pattern. Service - Actual Service which will process the request. Reference of such service is to be looked upon in JNDI server. Context / Initial Context - JNDI Context carries the reference to service used for lookup purpose. Service Locator - Service Locator is a single point of contact to get services by JNDI lookup caching the services. Cache - Cache to store references of services to reuse them Client - Client is the object that invokes the services via ServiceLocator.

Which among the following does not apply to sequence diagrams? a) They enable better communication with the customer b) They describe interactions in distributed systems c) They describe the detailed design d) They are associated with a causal order

a)

Which of the following are appropriate outcomes of systems analysis activities? a) a better understanding of the real-world system b) A modular design that can form a basis for a dev plan c) User interface specifications d) A high-level, logical database design e) all of the above

a)

Which of the following development processes is pair programming commonly practiced? a) Responding to change b) Following a plan

a)

Which of the following is mainly for promoting reusability a) Design patterns b) Use case c) COCOMO d) System analysis e) CASE

a)

Which of the following process models can't be used effectively in connection with rapid prototyping? a) Waterfall b) Spiral c) Unified Process d) Agile Process

a)

Which of the following represent and object request broker architecture a) CORBA b) pipe-filter c) iterator d) client server

a)

Which of the following statements best characterizes how software engineers determine when they are done modeling use cases? a) The system's stakeholders (including the software engineers) agree that the use cases represent the goals of the system and the use cases are associated with appropriate actors. b) The software engineers have broken down all of the use cases into the atomic features of the software system c) The software engineers have identified all of the actors that will use the system

a)

Which of the following uml diagrams fo not capture dynamic behavior of a system a) class b) scenarios c) state machine d) use case

a)

Which type of UML diagram best captures user goals? a) Use case b) class c) interaction d) state charts

a)

Which type of UML diagram is best at describing persistent relations between objects? a) Class diagrams b) Uses case diagrams c) Interaction diagrams d) State Charts

a)

Which of the following is part of uml a) use case diagram b) class diagram c) sequence diagram d) simulink

a) b) c)

What are the four framework activities found in the extreme programming process model? a) analysis, design, coding, testing b) planning, analysis, design, coding c) planning, analysis, coding, testing d) planning, design, coding, testing

c)


Set pelajaran terkait

investigating God's world lesson: 9 Chapter checkup

View Set

Bus Stat Test 3 CH 7-8 concept questions from learnsmart

View Set

Exam 2 progressive up to cold war

View Set

Insurance regulation (flash cards)

View Set

Practice test Cali life insurance Part 1

View Set

TEST REVIEW - 7th Grade SS - Chapter 5 - The Decline of Feudalism

View Set