Object Oriented Paradigm - ilya-khadykin/notes-outdated GitHub Wiki
TO DO:
Interconnected topics:
- Object-Oriented Analysis: what is the problem
- Object-Oriented Design: how we are going to solve it
- Object-Oriented Programming: implementation of designed solution in one of programming languages
An object has:
- identity (name)
- attributes (data)
- behavior
Class is a blueprint of an object
Object is a noun
Class describes attributes and behavior of an object. So, every Class has:
- name (type)
- attributes (properties, data)
- behavior (operations, methods)
Creating a object is an instantiation
- focus on the essentials
- ignore the irrelevant
- ignore the unimportant
- data hiding
- "black boxing"
- reducing dependencies inside your application
- code reuse
Superclass (parent class), subclass (child class)
Multiple and single inheritance
"Many forms"
- overriding methods of Superclass in subclasses
There are the following steps in designing the system:
- Gather Requirements
- Describe the app
- use case
- user story
- Identify the main and most important objects
- Describe the Interactions between the objects
- Create a Class Diagram
- Functional Requirements: what does it do?
Features / Capabilies - Non-functional Requirements: what else?
Documentation / Help / Legal / Performance / Support / Security
System must ...
Application must ...
- Functional requirements
- Usability requirements
- Reliability requirements
- Performance requirements
- Supportability requirements
-
- Design requirement
-
- Implementation requirement
-
- Interface requirement
-
- Physical requirement
- Title: what is the goal? (Register new member, Transfer funds, Create new page)
- Actor: who desires it? (User, Customer, Member, Administrator, ACMESystem)
- Scenario: how is it accomplished? (A paragraph describing the scenario in detail)
Example:
Title: Purchase items
Actor: CustomerScenario: Customer reviews items in shopping cart. Customer provides payment and shipping information. System validates payment information and responds with conformation of order and provides order number that Customer can use to check on order status. System will send Customer a conformation of order details and tracking number in an email.
Prompt questions:
- Who performs a system administration?
- Who manages system and security?
- What happens if the system fails?
- Is anyone looking at performance metrics or logs?
Use Case Diagram
As a ... (type of user)
I want ... (goal)
so that ... (reason or benefit)
User Stories | Use Cases |
---|---|
short - one index card | long - a document |
one goal, no details | multiple goals and details |
informal | casual to (very) formal |
"placeholder for conversation" | "record of conversation" |
UML is used to show internal structure of the system