Use LEFT and RIGHT arrow keys to navigate between flashcards;
Use UP and DOWN arrow keys to flip the card;
H to show hint;
A reads text to speech;
90 Cards in this Set
- Front
- Back
What is Software Engineering? |
Software Engineering is the “systematic, disciplined, quantifiable approach to the development, operation, and maintenance of software, and the study of these approaches; that is, the application of engineering to software.” |
|
What are the goals (4) of Software Engineering? |
Economical |
|
How does Software Engineering relates to CS as a whole? |
We can apply CS theories and functions, to the tools and techniques of problem solving to get solutions! |
|
What are the different parts of Software Engineering? |
Project Management, Software Design, Hardware Considerations, Programming, Software Specification, User Interface Design, User Documentation, Maintenance, Testing. |
|
Why is Software Engineering needed? |
Software engineering is necessary to become able to build software on time, on budget, within specification while minimizing defects, managing quality, cost, time, complexity, verifiable, maintainability, availability, reliability, dependability, performance, security, usability, and other attributes of software. |
|
Myths about Software Engineering |
MYTHS: |
|
What is Version Control? |
Managing the change of documents. |
|
Uses for Version Control |
Backup & Restore, synchronizing work, track changes, track ownership, sandboxing, branching & merging, short/long-term undo. |
|
Distributed vs Central Version Control |
Distributed is faster (other than push/pull), can use without internet (other than push/pull), committing is local, every person has own personal copy, could be sucky for large projects or long history (YuUUUuuGe files). |
|
Mercurial Commands (hg) |
init : make repository |
|
Bill needs to pull the new changes into his repository, merge the changes, commit them and push the changes: |
•hg pull •hg merge •hg commit •hg push |
|
What is Issue Tracking? |
A database for tracking work that needs to be done on the software –Text file (2 person) –Spreadsheet (small team) –Database-backed system (small to large teams) |
|
What is Issue Tracking used for? |
Bug Reports |
|
What are bug reports and who uses them? |
A bug report is way to convince a developer to spend time and energy on your problem or feature idea. Used by: Testers, Managers, Users, Developers, and those mysterious others... |
|
Bug Report Lifecycle |
Tester identifies a bug -> files a bug report -> Triager prioritize bug -> developer fixes -> Tester tests to see if fix worked -> Bug report updated ->? |
|
Team Roles in Handling Bug Reports |
Tester: finds, investigates & reports |
|
Ways motivate developers and overcome their objections? |
BEER... stroke ego, looks bad, interesting puzzle, affects a lot of users, trivial fix, embarrassment, management says so! |
|
Principles of writing a good bug report |
1. Clearly describe steps to reproduce the problem |
|
What is Software Testing? |
The dynamic verification of the behavior of a program on a finite set of test cases, suitably selected from the usually infinite executions domain, against the expected behavior. |
|
Types of testing |
Black-box, white-box, gray-box |
|
What is Black-Box Testing? |
Testing of a system without understanding the implementation. |
|
What are black-box testing techniques? |
Robustness Testing (values outside of domain) and Ad hoc/Exploratory (based on tester's skills, intuition and experience), equivalence partitioning (selecting the RIGHT test cases to cover all possible scenarios), Boundary value Analysis (choose cases at boundaries). |
|
What is Gray-box Testing? |
Testing of functionality, but also looking at how it is done to make sure that is correct also. |
|
What is White-box Testing? |
Testing software that tests internal structures or workings of an application, as opposed to its functionality. |
|
What is Unit Testing? |
A ‘unit’ is the smallest possible testable item. |
|
What is Test Fixture? |
Class containing one or more test methods |
|
What is Test Method? |
Method that executes a specific test |
|
What is Test Runner? |
Application that finds and executed test methods on |
|
What is Assertion? |
A Boolean expressions that describes what must be true when an action execute. |
|
What is UML? |
Unified Modelling Language |
|
Visibility Symbols: ~ |
+ -> Public |
|
Three main components of the class in a UML diagram? |
Name of the class, attributes, and methods. |
|
What is the difference between “composition” and “aggregation”? |
The distinction is subtle, and has to do with if the object would exist after the containing object is destroyed. Composition wouldn't exist, and Aggregation would still exist. |
|
Italics means...? |
Italics: Abstract class |
|
What are exceptions? |
A situation where something ‘unexpected’ happened during normal execution of program |
|
Examples of Exceptions? |
Index out of bounds Divide by 0 Unexpected input |
|
What are the two types of errors? |
Logic errors: internal logic; length, domain, invalid-argument, out_of_range. |
|
When you detect an error.... what you have to do? |
THROW AN EXCEPTION! |
|
When do exceptions stop being 'thrown up the chain'? |
Exception is ‘thrown up the chain’ until either: Exception is handled Entire program terminates |
|
Try Catch Block... |
try{ } catch () { } |
|
Which catch does it go to? |
When an exception occurs in a try block, the first catch that matches the exception type is executed. |
|
What is the key idea of inheritance?undefined |
You get it from your parents! |
|
Design Principles (5) |
•Form consistent abstraction in same class •Encapsulate implementation details •Use inheritance to simplify design and reuse code •Information hiding (complexity hiding) •Keep coupling loose |
|
What is coupling? |
Coupling is the degree of interdependence between software modules; a measure of how closely connected two routines or modules are; the strength of the relationships between modules. Coupling is usually contrasted with cohesion. |
|
ADT and used for? |
Abstract Data Types: a collection of data and operations that work on that data (i.e. vector), hides implementation details, easy to change implementation, and works with ABSTRACTION! (not details) |
|
What is Inheritance good for? |
Avoiding duplication of code, model relationships, easily extend functionality. |
|
"Has a" ? |
“Has a”: use containment (i.e. data members) |
|
A is a B... |
A inherits the properties of B.
A is a subclass of B, B is a superclass of A, A is a derived class of B, B is a base class of A. |
|
Chain of calls... |
Constructor goes from the Base and goes down to the actual class. Destructors are the opposite. |
|
Employees and Persons have writeInfo(); |
Use SCOPING!!! |
|
All data members and member functions are automatically inherited by a derived class except for.... |
Functions which are overriden, constructors, destructors, assignment operators, and friends! |
|
Employee is a subclass of Person. How do we convert? Employee e{"Joe Blow", 30000}; p = e; OR e = p; ? |
p = e; // legal, but you lose information e = p; // illegal SoooOOOo, use first one. |
|
Differences between Public, Private, and Protected? |
Public: All can use. |
|
3 Forms of inheritance? |
Specialization: uses public inheritance, adds new specialized attributes and behaviours. |
|
What is polymorphism? |
Means that a call to a member function will cause a different function to be executed depending on the type of object that invokes the function. |
|
Function overloading (static or dynamic)? |
STATIC! |
|
Binding the meaning to the form when the program is run (static or dynamic)? |
DYNAMIC BINDING!!! |
|
How is dynamic binding achieved in C++? |
Virtual functions |
|
How is a member declared as virtual? |
Writing virtual in front of its prototype. |
|
Why polymorphism for functions of same name? |
Avoid unnecessary if-thens or switches. Makes the code cleaner and easier to extend! Smells better ;) |
|
True or False: To be safe, destructors of any base class should NOT be called virtual! Only do this when you know what you are doing. |
FALSE! |
|
How do we make something an abstract class? |
Give it a pure virtual function! |
|
How do we declare a pure virtual function? |
virtual void draw() = 0; Technically yes, but for the purpose of this class, NO, the function is not implemented in this class. |
|
Can one declare objects of an abstract class? |
NO! One cannot do this. So stop trying! |
|
If a base class is abstract, how can its derived class be normal? |
All pure virtual functions must be override! |
|
What is typeid() ? |
The typeid() operator allows us to get a unique value for each type. So you can do: if (typeid(*p1) == typeid(Employee)) { ... } |
|
Dynamic vs Static Casting |
Static_cast is used for cases where you basically want to reverse an implicit conversion, with a few restrictions and additions and performs no runtime checks. |
|
Multiple Inheritance. Does C++ have this? class A : public B, public C { ... }; really mean? |
YES! class A inherits all members from classes B and C. |
|
A is a B and is a C. B and C have printInfo() . Let 'a' be of type A. How do I call B's printInfo? |
a.B::printInfo(); |
|
SOLID? |
S: Single Responsibility Principle |
|
What is encapsulation? |
Information hiding. The less you know, the better! |
|
What is Single Responsibility Principle |
A class should have only a SINGLE responsibility (i.e. ONLY ONE potential change in the software's specification should be able to affect the specification of the class). Delegate! |
|
What is Open/closed principle? |
Software entities … should be open for extension, but closed for modification! |
|
What is Liskov substitution principle? |
Objects in a program should be replaceable with instances of their subtypes without altering the correctness of that program |
|
What is Interface segregation principle? |
Many client-specific interfaces are better than one general-purpose interface. |
|
What is Dependency inversion principle? |
One should “depend upon abstractions, [not] concretions". |
|
What's the best way to test a design? |
Try to change something!!! |
|
Three OO Design Principles? |
1. Code to interface, not implementation |
|
What is a cohesive class? What's it do? |
A cohesive class does one thing really well and does not try to do or be anything else. It has only one reason to change. |
|
What is leading cause of project failure? |
Teamwork Problems! |
|
Team Structures |
Hierarchical: chief exec -> team leaders -> project members (pyramid!). |
|
Phases of Team Development? |
Forming: team comes together Storming: disagreements (teams fail if stuck) Norming: offering ideas, preferences, contributions Performing: ideal phase, work hard & play hard |
|
What are these? |
Aggregation Association. |
|
What is this? |
Composition Association. |
|
Fill in the blank. |
Generalization |
|
Fill in the blanks. |
|
|
Whats wrong? |
|
|
What is this?! |
Tight coupling with concrete instruments. |
|
What type of version control is this? |
Centralized. |
|
What type of version control is this? |
Distributed. |