• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/33

Click to flip

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;

33 Cards in this Set

  • Front
  • Back
What is the goal of Software Architecture
1. Partition the problem
2. Create interfaces
3. Manage overall structure and flow
4. State how system interfaces with its environment
5. Recommend tools and techniques to build system
Why Software Architecture is important
1. Controls complexity
2. Enforces best practices
3. Gives consistency
4. Increases predictability
5. Enables re-use
What is an Object
It can be considered a "thing" that can perform a set of related activities.
In OOP terms it is an "instance" of a class.
What is a Class
a blueprint/plan/template for an object
Name 5 principles to follow in designing a class
S.O.L.I.D.
1. SRP - Single Responsibility
2. OCP- Open Closed
3. LSP - Liskov Substitution
4. ISP - Interface Segregation
5. DIP - Dependency Inversion
What is the "Single Responsibility Principle" (SRP)
A class should have one, and only one, reason (or responsibility) to exist. That responsibility should be entirely encapsulated by the class.
What is the Open Closed Principle (OCP)
You should be able to extend a class behavior without modifying it.
What is the Liskov Substitution Principle (LSP)
If a statement is true for a base class, then you should be able to use (in the statement) an instance of a derived class. The statement should still be valid.

I.E.: if the class "animal" has a certain capability ... then so should the class "dog", if "dog" is derived from "animal".
What is the Interface Segregation Principle (ISP)
Make fine grained interfaces that are client specific.
What is the Dependency Inversion Principle (DIP)
Depend on generalities (abstractions), not on concrete implementations.
What concepts group OOP system-design techniques
"A PIE" (mnemonics)
1. Abstraction
2. Polymorphism
3. Inheritance
4. Encapsulation
What is Encapsulation
The inclusion, within an object, of all the resources (attributes, data & methods) it needs to function
What basic (relationship) techniques can be used to "link" classes with each other
1. Association
2. Aggregation
3. Composition

(note: each forms a 'subset' of the one above)
What is "Association"
Most general relationship between classes, as: companies "use" security guards (but don't HAVE to).
What is "Aggregation"
A directional type of "Association" between classes that indicates inclusion and is usually stated using forms of the verb "to have", as in: companies have (sometimes) security-guards.
What is "Composition"
An "Aggregation" of one class within another which indicates that the lifetime of the two classes is linked: like University and Faculties. It's usually stated by the phrase "composed of", as "a University is composed of faculties. If the university closes ... the (isolated) existence of its faculties does not make sense.
What is abstraction
A means to reduce complexity by hiding irrelevant details of an object & emphasizing its reason for existence, its qualities and its properties. It emphasizes the "what", rather than the "how".
What is generalization
A means to reduce complexity by replacing multiple entities that perform similar functions with a single one.

I.E.: the overloading of the "+" operator to work on numbers (addition) and strings (concatenation)
How do programming languages provide means to use generalization
1. variables
2. parametrization
3. generics
4. polymorphism
What is an Abstract class
1. A template, or "super-class", for other classes.
2. Contains at least one or more "stubs", or abstract methods/properties.
3. Can NOT be instantiated
4. Can be "extended" by another class by overriding ALL its abstract methods/properties.
5. Can have a default constructor, but it must be marked "protected", so it's "auto-called" while instantiating sub-class.
What is an Interface
1. Defines a "contract", not an implementation.
2. Can have properties.
3. Method stubs and properties are, implicitly, public and abstract.
4. Can't be instantiated.
Describe how to mark a class that implements an interface, but not all of its methods.
1. Subclass must be marked abstract
2. Non-implemented methods/properties must be marked both: public & abstract
What method modifier (public, private, ... etc) are allowed on interface methods.
Only the "new" modifier is allowed, indicating that it hides a method of the same name on an inherited interface.
If a class, interface or struct is not marked with an access modifier, what access level does it get by default: public, private, protected, internal
internal
What modifiers are valid in C# interface methods (public, private, protected, internal, new, static
"new" is the ONLY valid modifier in an interface method. The method is, by default, also "public" & "abstract", but it should not be marked as such.
Assuming the following class/interface are at a global scope (not nested within another class or interface): are these snips of code OK?:

protected class MyClass{ ... }
protected interface MyInterface{ ... }
No, the ONLY access modifiers valid on a (global) class/interface are "public" and "internal"
Can a C# class, or interface, be nested within another interface
No, classes and interfaces can NOT be nested within another interface.
If a method is declared "virtual" in a base class, what is the difference between "overriding" it, or marking it "new", in a derived class.
If an object, Obj, is defined as an instance of a derived class, then:

1. If a method is overridden in the derived class Obj will use the overridden method whether or not Obj is declared as base or as derived.

2. If a method is declared "new" in the derived class, Obj will use the base method if it is declared as base ... and the "new" method if it is declared as derived.
What is (object) polymorphism
Means: "many-shaped", and means an object can behave as an instance of multiple classes.

1. at run-time (as a parameter, etc) the object may be treated as being an instance of:
i) the class that was used to instantiate it.
ii) any of its base classes.

2. base class "virtual" methods can be "overridden" by the derived class and thus be called on the object EVEN when the object is declared an instance of the base class.
What is method overloading
Is a form of method polymorphism: the ability to define several methods all with the same name.
What is operator overloading
A type of method polymorphism that causes operators (+, -, ==, *) to behave differently depending on the type of its arguments.
What is method overriding
A "virtual" method, if "overridden" in a subclass, causes the new method to be invoked on the object EVEN when the derived object is declared/used as if it were an instance of its base class.

If you want the original method to still be available when the derived object is declared as base, use the "new" keyword instead of overriding.
What is a "use case"
It is the description of what an "actor" (not necessarily a person) perceives when using a function of a software system.