Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Study Notes/Solutions, Lecture notes of Computer Science

covers the test banks and solutions

Typology: Lecture notes

2020/2021

Uploaded on 02/02/2023

JashanKaur
JashanKaur 🇨🇦

3 documents

1 / 8

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Chapter 5.2
Abstraction: a concept to hide unnecessary details and only show essential features
Inheritance: a mechanism in which derived classes acquire the property of a base class
Polymorphism: ability to process objects differently depending on their data types or class
Encapsulation: the hiding of information
Object Oriented Design
Association
Definition: when objects are related to one another
Types:
oAggregation
Definition: a special form of association where all objects have their own lifecycle
oComposition
Definition: a technique to combine objects or data types into a more complex one
Inheritance VS Composition
Inheritance is-a relationship
Composition has-a relationship
SOLID Design Principles
Single Responsibility Principle (SRP)
oDefinition: a computer programming principle that states that every module, class, or
function should have responsibility over a single part of the functionality
oCoupling and Cohesion
Open-Close Principle (OCP)
oDefinition: states that software entities should be open for extension, but closed for
modification
Liskov Substitution Principle (LSP)
oDefinition: objects in a program should be replaceable with instances of their subtypes
without altering the correctness of that program
oSubtyping
Subtyping is a form of polymorphism in which a subtype is a datatype that is
related to another datatype; methods or functions operate on elements of the
supertype can also operate on the elements of the subtype
Interface Segregation Principle (ISP)
oDefinition: no client should be forces to depend on methods it does not use
Dependency Inversion Principle (DIP)
oDefinition 1: High level modules and low-level modules should depend on abstractions
oDefinition 2: Abstractions should not depend on details; details should depend on
abstractions
pf3
pf4
pf5
pf8

Partial preview of the text

Download Study Notes/Solutions and more Lecture notes Computer Science in PDF only on Docsity!

Chapter 5. Abstraction: a concept to hide unnecessary details and only show essential features Inheritance: a mechanism in which derived classes acquire the property of a base class Polymorphism: ability to process objects differently depending on their data types or class Encapsulation: the hiding of information Object Oriented Design  Association Definition: when objects are related to one another Types: o Aggregation Definition: a special form of association where all objects have their own lifecycle o Composition Definition: a technique to combine objects or data types into a more complex one Inheritance VS Composition Inheritance  is-a relationship Composition  has-a relationship SOLID Design Principles  Single Responsibility Principle (SRP) o Definition: a computer programming principle that states that every module, class, or function should have responsibility over a single part of the functionality o Coupling and Cohesion  Open-Close Principle (OCP) o Definition: states that software entities should be open for extension, but closed for modification  Liskov Substitution Principle (LSP) o Definition: objects in a program should be replaceable with instances of their subtypes without altering the correctness of that program o Subtyping  Subtyping is a form of polymorphism in which a subtype is a datatype that is related to another datatype; methods or functions operate on elements of the supertype can also operate on the elements of the subtype  Interface Segregation Principle (ISP) o Definition: no client should be forces to depend on methods it does not use  Dependency Inversion Principle (DIP) o Definition 1: High level modules and low-level modules should depend on abstractions o Definition 2: Abstractions should not depend on details; details should depend on abstractions

Chapter 6. Fail-safe default – states that unless a subject is given explicit access to an object it should be denied access to that object Coding Standard  Definition - a set of guidelines, rules, programming styles and conventions that software developers adhere to when writing source code for a project  Benefits o Improve software quality o Easier to code review work o Quicker to debug o Avoid conflict o Code is easier to collaborate with Software code/version control  Definition - the management of changes to documents, computer programs  Benefits o Automatic backup o Sharing on many computers o Version control o Maintaining different versions Recommendations  High Cohesion and Low Coupling  SOLID Principles  Creative Thinking (work smart not hard)  Use Comments  Avoid Side Effects o Definition – a function is said to have a side effect if it modifies global variables or has observable interaction with the outside of its scope  Practise Offensive Programming o Definition – departs form defensive principles when dealing with errors  Defensive Programming o Definition: the process of designing and implementing software so that it continuous to function when it is under attack o expect erroneous input to your functions or methods  Exception Handling (unexpected event) Tips for Developers  Memory Consumption o Stack overflow – undesirable condition where a program uses more memory space than stack size o Memory leak – software fails to release memory when it is no longer needed  Problems with Functions o Minimize number of local variables o Reduce number of function parameters o Avoid cascaded function calls  Safety Considerations o Safety critical system – a system whose failure or malfunction may result in serious injury/death o Redundancy – improving reliability  Constructors and Destructors in OOP o Constructors as simple as possible o Focus on releasing resources that have been allocated in heap o Never allow exceptions to leave destructors

Chapter 7. Deployment Definition – all the activities that make a new or new version of software system available for use Involves –  Deployment plan  New or new version of software system  User training support  Bug fix Deployment Tasks

  1. Plan your document  Software document plan – defines the scope, approach, and execution for the deployment of a software product
  2. Test software document
  3. Deployment Strategies  Deployment strategies – a way to change or upgrade software where the aim is to make changes without user noticing or downtime  Types o Cutover – the process of deploying new or new version software to all devices at the same time  Pros  Easy to setup, Software entirely renewed  Cons  High risks, High impact on customers, expect downtime o Stage deployment – a strategy for deployment that has exactly functional production environments for practicing deployment  Pros  Low risks, Software entirely renewed  Cons  Expensive, expect downtime o Gradual cutover – the process of installing new software into some user’s machines while other machines continue working with existing software  Pros  Low risks  Cons  Difficult to configure o Incremental – the process of releasing the new features of software to the users’ machines gradually  Pros  Low risks  Cons  Slow rollout  Does not work with monolithic software o Parallel – where a new software system slowly assumes the roles of older software system while both software systems operate simultaneously  Pros  Different versions run in parallel  Zero down time release  Cons  Difficult to configure
  4. Documentation
  5. Training

Chapter 7. Introduction to Software Metrics  Definition - A software metric is a measure of software characteristics which are measurable or countable.  Purpose - measuring software performance, planning work items, measuring productivity  Advantages o Good for comparative study of various design methodologies of software systems o Good for comparing and evaluating the capabilities and productivities of team members o Helps to prepare software quality specifications o Gets an idea about the complexity of the software o Provides feedback to software engineers and managers about progress of different software cycles o Helps for decision making for future software projects  Types o Process - Software engineering is a process  Definition – process metrics are standard measurements used to evaluate the performance of software engineering process  Types of measurement  Efficiency  Productivity  Error rate  Cost effectiveness o Product – Software is a product  Definition – product metrics describe the characteristics of the product like the size, complexity, design features, productivity, quality level  Types of measurement  Size  Usability  Security  Complexity  Performance o Projects – Software is built with projects  Definition – project metrics describe the projects characteristics and execution  Types of measurements  Number of teams  Number of developers  Schedule  Cost  Productivity Defect analysis – defects are classified into different categories and are also used to identify the possible causes to prevent the problems from occurring again Ishikawa Diagrams – cause and effect diagrams  Advantages o Highly visual Normalization in metrics – the process of reducing measurements to a standard scale Software complexity – a technique used to describe a specific set of characteristics of software code  Cyclomatic complexity – a graph driven model that is based on decision making constructs of program control statements  Formula  V(G) = e – n + 2 n = nodes e = edges (larger number results in higher complexity) Function Point Metrics – a unit of measurement to express the amount of business functionality from the user’s point of view  Inputs – number of times data moves into the software  Outputs – number of times output moves out of software  Inquiries – number of times software preforms a query/response action  Internal files – number of internal logic files

 Definition – a process model of software engineering that embodies the principle that continuous adaptation process to the work is the normal state of affairs Chapter 8. Disadvantages of Waterfall Model  Inflexible  No working software is produced until late during life cycle  High amounts of risk and uncertainty Iterative Model Definition – is a process of model software engineering that focuses on initial simplified implementation which then progressively gains more complexity Examples  Online banking system  Online investments Pros  Generates working software quickly  More flexible  Easier to test and debug  Easier to manage risk Cons  Each phase is rigid  Problems may arise pertaining to system architecture Iterative Model VS Incremental Model Incremental – initially provides fewer features with full fidelity  goes form start to finish in linear paths of progressions  all about making something bigger through accretion Iterative – initially provides few features with low fidelity  no number of steps, development is done in cycles  all about making something better through repetition Prototype Model Definition 1 – rudimentary software product that is not complete but represent the final product Definition 2 – is designed and built then new features are added until the software is acceptable Pros  Improved requirements  Common vision  Encourages active user participation  Helps resolve discrepancies between client and company Cons  Narrowing vision  Schedule pressure  Leads people to believe the final system will follow  Gives no indication of performance Iterative Model VS Prototype Model Similarities – initially provides features with low fidelity  iterative process Prototype – customer involves explicitly