OOP Concepts in Banking Systems
42 Questions
0 Views

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to Lesson

Podcast

Play an AI-generated podcast conversation about this lesson

Questions and Answers

In an object-oriented design representing bank accounts, what is the primary purpose of AccountId in the Bank class?

  • To uniquely identify each bank branch.
  • To store the current balance of all accounts.
  • To serve as a foreign key relating to specific accounts. (correct)
  • To track the transaction history of the bank.

Which of the following scenarios best illustrates the use of packages in UML for a large-scale incident management system?

  • Duplicating commonly used classes across multiple packages to minimize dependencies.
  • Using a single package to contain all classes, interfaces, and use cases for the entire system to simplify navigation.
  • Creating separate packages for user interface components, database access objects, and business logic to improve modularity. (correct)
  • Omitting packages altogether to reduce the complexity of the UML diagram.

In a banking application, if SavingsAccount, CheckingAccount, and MortgageAccount all inherit from a common Account class, which principle is being demonstrated?

  • Polymorphism
  • Encapsulation
  • Abstraction
  • Inheritance (correct)

Consider a system with a Notification package and an IncidentManagement package. If the IncidentManagement package relies on the DispatcherInterface from the Notification package, what type of relationship exists between IncidentManagement and Notification?

<p>Dependency (A)</p> Signup and view all the answers

Within the Account class, the methods Deposit(), Withdraw(), and GetBalance() are defined. What concept of object-oriented programming does this exemplify?

<p>Encapsulation (A)</p> Signup and view all the answers

In object-oriented software engineering, what is the primary purpose of modeling complex systems?

<p>To create simpler representations that aid in understanding and managing complexity. (A)</p> Signup and view all the answers

Which sequence represents the correct order of applying principles for managing complexity?

<p>Abstraction, Decomposition, Hierarchy (C)</p> Signup and view all the answers

What best describes the relationship between systems, models, and views?

<p>A model is an abstraction describing a subset of a system. (C)</p> Signup and view all the answers

If an aircraft is considered a 'system', which of the following would be classified as a 'model' of that system?

<p>A flight simulator used for pilot training. (C)</p> Signup and view all the answers

In the context of software engineering models and views, what role does a notation serve?

<p>It provides a set of rules for depicting views, either graphically or textually. (C)</p> Signup and view all the answers

In the context of the provided statechart diagram, what condition would cause the system to transition directly from BlinkHours to IncrementMin?

<p>Pressing both button 1 and button 2 simultaneously. (D)</p> Signup and view all the answers

Which UML diagram primarily focuses on the physical architecture and deployment of software components?

<p>Deployment diagram (B)</p> Signup and view all the answers

Under what circumstance is roundtrip engineering most beneficial in software development?

<p>When requirements, technology, and schedules are subject to frequent changes. (A)</p> Signup and view all the answers

What best describes the purpose of reverse engineering in software development?

<p>Creating a model from existing code. (B)</p> Signup and view all the answers

Which of the engineering processes is most suitable for starting a new project from scratch?

<p>Forward Engineering (C)</p> Signup and view all the answers

Which UML notation would be most helpful during the system design phase to represent the physical components of a system?

<p>Component Diagrams (C)</p> Signup and view all the answers

What is a primary goal of using statechart diagrams during the early stages of object-oriented software engineering?

<p>Modeling the dynamic behavior of objects. (D)</p> Signup and view all the answers

In a scenario where a software project is undergoing continuous changes in both requirements and technology, which engineering approach would provide the most adaptive and iterative development process?

<p>Agile development using roundtrip engineering (D)</p> Signup and view all the answers

Which of the following is the MOST accurate representation of the relationship between systems, models, and views?

<p>A view is described by a model, which represents the system. (C)</p> Signup and view all the answers

In UML diagrams, what distinguishes composition from aggregation?

<p>Composition implies that components cannot exist without the aggregate, while aggregation allows components to exist independently of the aggregate. (A)</p> Signup and view all the answers

In the context of software engineering, which of the following BEST exemplifies a 'model' of a car?

<p>A simplified CAD drawing showing the car's dimensions and major components. (D)</p> Signup and view all the answers

Which UML notation represents a 'one-to-many' association between two classes?

<p>A line with a '1' at one end and a '*' at the other end. (B)</p> Signup and view all the answers

Considering the concepts of systems, models, and views, which of the following scenarios BEST describes a 'view'?

<p>A financial analyst's report on the company's performance. (B)</p> Signup and view all the answers

How does the concept of abstraction relate to creating models in software engineering?

<p>Models use abstraction to simplify complex systems by focusing on relevant details and ignoring irrelevant ones. (A)</p> Signup and view all the answers

Consider a Car class and an Engine class. If a Car must have an Engine and the Engine cannot exist without the Car, what type of relationship exists between them?

<p>Composition (A)</p> Signup and view all the answers

A University class 'has-a' Department class. The Department can exist even if the University ceases to exist. What type of relationship is this?

<p>Aggregation (D)</p> Signup and view all the answers

In UML use case diagrams, what is the significance of the arrow direction in an «extend» relationship?

<p>It points from the extending use case to the base use case being extended. (A)</p> Signup and view all the answers

What is the PRIMARY difference between a 'concept' and a 'phenomenon'?

<p>A phenomenon is a real-world object or event as perceived, while a concept describes common properties of phenomena. (C)</p> Signup and view all the answers

Which of the following is a primary reason for factoring out behavior into a separate use case using an «include» relationship?

<p>To reuse the factored behavior in multiple use cases. (B)</p> Signup and view all the answers

In a many-to-many association between StockExchange and Company, what does the Lists class typically represent?

<p>An association class that holds attributes specific to the relationship between <code>StockExchange</code> and <code>Company</code>. (D)</p> Signup and view all the answers

Which of the following is an example of a 'phenomenon'?

<p>A specific instance of a running program on a computer. (A)</p> Signup and view all the answers

Which of the following activities is MOST reliant on creating and utilizing different 'views' of a system?

<p>Debugging a complex software application. (C)</p> Signup and view all the answers

What does the direction of the arrow signify in an «include» relationship between use cases?

<p>It points towards the use case whose behavior is being included. (C)</p> Signup and view all the answers

What is the primary difference between an association and an aggregation?

<p>An aggregation represents a &quot;part-of&quot; relationship, while an association represents a more general relationship. (C)</p> Signup and view all the answers

If a Polygon class has a one-to-many association with a Point class, what does this imply?

<p>A <code>Point</code> can only belong to one <code>Polygon</code>, but a <code>Polygon</code> can contain multiple <code>Point</code> objects. (B)</p> Signup and view all the answers

Consider a scenario where multiple exceptional flows can extend a single use case. Which UML relationship is most appropriate to model this?

<p>Extend (B)</p> Signup and view all the answers

How can different models of the same system be beneficial in software development?

<p>Different models can represent different aspects of the system, providing a more complete understanding and catering various stakeholder needs. (B)</p> Signup and view all the answers

Which of the following scenarios best illustrates an aggregation relationship?

<p>A <code>Building</code> is composed of <code>Rooms</code>; if the <code>Building</code> is demolished, the <code>Rooms</code> can still exist. (C)</p> Signup and view all the answers

What is the primary purpose of an abstraction, such as a 'Type', in programming languages?

<p>To provide a generalized concept or category with specific characteristics. (B)</p> Signup and view all the answers

In the context of software design, how does an 'instance' relate to a 'type'?

<p>An instance is a specific realization or occurrence of a type. (C)</p> Signup and view all the answers

In object-oriented design, if a 'CollectMoney' use case is common to both 'PurchaseSingleTicket' and 'PurchaseMultiCard' use cases, which relationship should be used?

<p>Include (C)</p> Signup and view all the answers

What is the key difference between «extend» and «include» relationships in UML use case diagrams regarding their typical usage?

<p>«Extend» is for optional or conditional behavior, while «include» is for required behavior. (B)</p> Signup and view all the answers

Flashcards

Association

A link between two classes.

One-to-one Association

One object is linked to exactly one other object.

One-to-many Association

One object is linked to many other objects.

Many-to-many Association

Many objects are linked to many other objects.

Signup and view all the flashcards

Aggregation

A special association representing a 'consists of' relationship.

Signup and view all the flashcards

Aggregate

The parent class in an aggregation.

Signup and view all the flashcards

Component

The child class in an aggregation.

Signup and view all the flashcards

Composition

A strong aggregation; the component cannot exist without the aggregate.

Signup and view all the flashcards

Bank Account

A class representing a customer's funds, with methods to Deposit, Withdraw, and GetBalance.

Signup and view all the flashcards

Savings Account

A specific type of bank account for saving money.

Signup and view all the flashcards

Checking Account

A specific type of bank account for everyday transactions.

Signup and view all the flashcards

Mortgage Account

A specific type of bank account used for home loans.

Signup and view all the flashcards

Package (in UML)

A UML mechanism for organizing elements into groups to improve readability.

Signup and view all the flashcards

Iteration

A control flow structure that repeats a block of code until a condition is met.

Signup and view all the flashcards

Condition

A constraint or requirement that must be true for a program to proceed or take a certain path.

Signup and view all the flashcards

Model

A simplified representation of a complex system, focusing on relevant details.

Signup and view all the flashcards

View

A representation of a model from a specific perspective, highlighting certain aspects.

Signup and view all the flashcards

Notation

A set of rules for visually or textually representing models and views.

Signup and view all the flashcards

Phenomenon

A real-world object as perceived by someone.

Signup and view all the flashcards

Concept

Properties shared by multiple phenomena.

Signup and view all the flashcards

System

Set of interacting components.

Signup and view all the flashcards

View (UML)

A depiction or illustration of a model.

Signup and view all the flashcards

Model (UML)

Abstraction of a system.

Signup and view all the flashcards

System (UML)

A complete element with defined functionality.

Signup and view all the flashcards

Relationship

Represents behavior factored out of a use case for reuse, not due to being an exception.

Signup and view all the flashcards

Direction of Relationship

Points towards the use case that uses the factored-out behavior.

Signup and view all the flashcards

Extend Relationship in Use Cases

A relationship indicating exceptional flows, and can extend more than one use case.

Signup and view all the flashcards

Direction of Extend Relationship

Points toward the use case being extended.

Signup and view all the flashcards

Type (in Programming)

An abstraction representing a set of values.

Signup and view all the flashcards

Instance (in Programming)

A specific value that belongs to a type.

Signup and view all the flashcards

Type

An abstraction in the context of programming languages

Signup and view all the flashcards

Purpose

integral number

Signup and view all the flashcards

Statechart Diagram

A diagram showing an object's states and transitions in response to events.

Signup and view all the flashcards

Transition (UML)

A change from one state to another in a statechart diagram, triggered by an event.

Signup and view all the flashcards

Implementation Diagrams

UML diagrams showing the physical components and deployment of a system.

Signup and view all the flashcards

Component Diagrams

UML diagrams illustrating the software components of a system.

Signup and view all the flashcards

Deployment Diagrams

UML diagrams showing the hardware and software nodes where components are deployed.

Signup and view all the flashcards

Object Constraint Language (OCL)

A language for specifying constraints and rules in UML models.

Signup and view all the flashcards

Forward Engineering

Creating code from a model.

Signup and view all the flashcards

Reverse Engineering

Creating a model from existing code.

Signup and view all the flashcards

Study Notes

  • Software Modeling and Analysis (CS 284) is taught at Taibah University in Yanbu, Saudi Arabia

Application and Solution Domain

  • Application Domain in requirements analysis refers to the environment where the system operates.
  • Solution Domain includes the available technologies to build the system in system and objet design
  • UML Package is the Application Domain Model
  • System Model consists of SummaryDisplay, TrafficControl, Aircraft, FlightPlanDatabase, FlightPlan, MapDisplay, TrafficController, and Airport

What is UML?

  • UML (Unified Modeling Language) is an emerging standard to model object-oriented software.
  • UML resulted from the convergence of notations from three leading object-oriented methods: OMT (James Rumbaugh), OOSE (Ivar Jacobson), Booch (Grady Booch)
  • UML is supported by several CASE tools such as Rational ROSE and TogetherJ

UML: First Pass

  • About 20% of UML can model 80% of problems
  • Use case Diagrams describe the system's functional behavior as seen by the user.
  • Class diagrams describe the static structure of the system: Objects, Attributes, Associations
  • Sequence diagrams describe the dynamic behavior between actors and the system and between objects of the system.
  • Statechart diagrams describe the dynamic behavior of an individual object (essentially a finite state automaton)
  • Activity Diagrams model the dynamic behavior of a system and workflow.

UML Core Conventions

  • Rectangles represent classes or instances.
  • Ovals represent functions or use cases.
  • Instances are denoted with underlined names, such as myWatch:SimpleWatch or Joe:Firefighter.
  • Types are denoted with non underlined names, for example SimpleWatch or Firefighter
  • Diagrams are graphs with nodes representing entities and arcs as the relationships between entities.

Use Case Diagrams

  • Use during requirements elicitation to represent external behavior
  • Actors represent roles, a type of user of the system
  • Use cases represent a sequence of interaction for functionality
  • A use case model is the set of all use cases providing a complete description of the functionality of a system and its environment.

Actors

  • An actor models an external entity communicating with the system: User, External system, and Physical environment
  • An actor has a unique name and an optional description.
  • Examples include a passenger on a train or a GPS satellite providing the system with GPS coordinates.

Use Case

  • A use case represents a class of functionality provided by the system as an event flow.
  • A use case consists of a unique name, participating actors, entry conditions, flow of events, exit conditions, and special requirement.

Use Case Diagram: Example

  • Name: Purchase ticket
  • Participating actor: Passenger
  • Entry condition: Passenger standing in front of the ticket distributor
  • Entry condition: Passenger has sufficient money to purchase ticket.
  • Exit condition: Passenger has ticket.
  • Event flow: Passenger selects the number of zones, the distributor displays the amount due, the passenger inserts money, the distributor returns change, and the distributor issues the ticket.
  • Use case diagrams represent external behavior
  • Use case descriptions provide the details of the model, not the diagrams themselves.
  • All use cases need to be described for the model to be useful.

Class Diagrams

  • Class diagrams represent the structure of the system.
  • Used during requirements analysis to model problem domain concepts such as TarifSchedule which encompasses Enumeration getZones() and Price getPrice(Zone)
  • Used during system design to model subsystems and interfaces
  • Used during object design to model classes, such as Trip which covers zone:Zone and Price: Price

Classes

  • A class represents a concept and encapsulates state (attributes) and behavior (operations).
  • An attribute has a type, and an operation has a signature.
  • The class name is the only mandatory information. Example shown is TarifSchedule class encompassing zone2price attributes, and getZones() and getPrice() operations

Instances

  • An instance represents a phenomenon.
  • The name of an instance is underlined and can contain the class of the instance.
  • Attributes are represented with their values, for example tarif 1974:TarifSchedule including zone2price

Actor vs Instances

  • Actor: An entity outside the system interacting with it, like a "Passenger"
  • Class: An abstraction modeling an entity in the problem domain inside the system, like "User"
  • Object: A specific instance of a class, such as "Joe, the passenger who is purchasing a ticket".

Associations

  • Associations denote relationships between classes regarding TariffSchedule and Enumeration getZones() & Price getPrice(Zone)
  • The multiplicity of an association end denotes how many objects the source object can reference, relating TarifSchedule with TripLeg which covers Price and Zone

Associations (multiplicity)

  • One-to-one association: A Country has-capital City with respective names
  • One-to-many association: Connecting Polygon with Points
  • Many-to-Many Associations: Relates StockExchange with Companies

Aggregation

  • Aggregation denotes a "consists of" hierarchy where an aggregate is the parent class, and components are the children.
  • A solid diamond denotes a composition, a strong form of aggregation where components cannot exist without the aggregate.

Inheritance

  • Children classes inherit the attributes and operations of the parent class
  • Inheritance simplifies the model by eliminating redundancy, for example Button can inherit from CancelButton & ZoneButton

Object Modeling in Practice: Class Identification

  • Naming is important when identifying classes
  • Models may include Betrag, CustomerId, Deposit(), Withdraw(),and GetBalance()
  • Related classes can be Foo, Dada, Account

Object Modeling in Practice ctd

  • Includes related items such as Banks, Account & Customer
  • Banks consist of Name
  • Accounts Consist of Betrag, AccountId, Deposit(), Withdraw(), GetBalance()
  • Customers consist of Name & CustomerId
  • Find new object and iterate on names, attributes and methods

Object Modeling in Practice: A Banking System

  • Finds new objects, iterates, finds association between objects, labels the associations, and determines the multiplicity of the associations
  • Related items may include Banks, Account & Customer
  • Banks consist of Name
  • Accounts Consist of Betrag, AccountId, Deposit(), Withdraw(), GetBalance()
  • Customers consist of Name & CustomerId

Practice Object Modeling: Iterate, Categorize!

  • Diagram illustrating connections between Banks, Customer Class Diagram, Savings Account, Checking Account, Withdraw() Mortgage Account, Account Class Diagram

Packages

  • Packages are a UML mechanism for organizing elements, mainly not an application domain concept
  • Packages are the basic grouping construct to organize UML models for readability such as Notification, DispatcherInterface, and IncidentManagement
  • A complex system is decomposed into subsystems, where each subsystem is modeled as a package

UML sequence diagrams

  • Used during requirements analysis to refine use case descriptions and discover additional objects
  • Used during system design to refine subsystem interfaces.
  • Classes are represented by columns, Messages by arrows, Activations by narrow rectangles, and Lifelines by dashed lines.
  • UML sequence diagrams represent behavior in terms of interactions, finding missing objects
  • They complement class diagrams which represent the structure of classes

Nested messages

  • Source of an arrow indicates the activation that sent the message.
  • Activation lasts as long as all the nested activations.
  • Horizontal dashed arrows indicate data flow.
  • Vertical dashed lines indicate lifelines.

Iteration & condition

  • Iteration is denoted by a * preceding the message name
  • Condition is denoted by a boolean expression in [] before the message name

Creation and destruction

  • Creation is denoted by a message arrow pointing to the object.
  • Destruction is denoted by an X mark at the end of the destruction activation.
  • In garbage collection environments, destruction can denote the end of the useful life of an object.

State Chart Diagrams

  • Represents behavior as States with button transitions and states
  • Includes Event, initial state, Transition, State, and final state

Activity Diagrams

  • Shows flow control within a system with Actions related to handling, documenting and Archiving an incident
  • An activity diagram is a special case of a state chart diagram in which states are activities ("functions")
  • Includes Action state that cannot be decomposed any further, and happens instantly
  • Includes Activity state that can be decomposed further, and is modeled by another activity diagram

Activity Diagrams are the same Incident differently

  • Activity Diagram for Incident is similar to Moore
  • Statechart Diagram for Incident is similar to Mealy Automaton

Activity Diagram: Modeling Decisions

  • Illustrates relationship between opening an incident, which is classified as low or highPriority, and whether the system is notified of Police or Fire Chief

Activity Diagrams: Modeling Concurrency

  • Relates to synchronization of multiple activities and splitting of the flow of control into multiple threads
  • Includes Splitting and Synchronization
  • Covers the flow of Open incident to allocate resources, coordinate resources and document incident, and archive incident

Activity Diagrams: Swimlanes

  • Actions can be grouped into swimlanes such as dispatcher and field officers to show which object or subsystem implements the actions.

UML Summary

  • UML provides a wide variety of notations for representing many aspects of software development
  • UML can be powerful, but complex language
  • UML can be improperly used to generate unreadable models due to overuse of exotic features
  • For now focus on Functional Model, Object Model, and Dynamic model.

Functional model: use case diagram Object model: class diagram Dynamic model: sequence diagrams, statechart and activity diagrams

Appendix: Additional Slides

  • Consisting of UML definitions relating what constitutes a model, and also its relation to reality

Studying That Suits You

Use AI to generate personalized quizzes and flashcards to suit your learning preferences.

Quiz Team

Related Documents

Description

This quiz covers object-oriented programming (OOP) concepts within the context of banking systems. It tests understanding of inheritance, encapsulation, and relationships between classes such as Account, SavingsAccount, and IncidentManagement. Key areas include the use of AccountId, packages, and interfaces.

More Like This

UML and Object Oriented Programming
16 questions
Object-Oriented Programming Concepts
48 questions
Object-Oriented Concepts & UML Diagrams
5 questions
Object-Oriented Programming & UML Diagrams
23 questions
Use Quizgecko on...
Browser
Browser