Lecture 1-8

0.0(0)
studied byStudied by 0 people
GameKnowt Play
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/87

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

88 Terms

1
New cards
OO Paradigm's 4 fundamental concepts
Abstraction, Polymorphism, Inheritance, Encapsulation (A-PIE)
2
New cards
Abstraction (Updated Definition)
the ability of separating the interface from implementation
3
New cards
Abstraction Advantages
Simplifies complex systems by hiding unnecessary details (increases readability, reusability, testability, and maintainability)
4
New cards
Inheritance pt.1 (two way ability)
Inheritance is two way ability: ability to extend parent class capabilities by creating a child class that gets all parent capabilities and possibly defines more
5
New cards
Inheritance pt.2 (two way ability)
the ability of factoring out the common capabilities of a group of classes (children) into a parent class
6
New cards
parent class is called?
superclass
7
New cards
child class is called?
subclass
8
New cards
Mother class of Java
Object class
9
New cards
Keyword in Java to denote Inheritance
extends
10
New cards
Inheritance relationship
asymmetric relationship, child inherits from parent, parent doesn't inherit from child
11
New cards
Subclass can have..?
additional methods/instance fields
12
New cards
Method overriding
re-implementing an inherited method in the subclass
13
New cards
Inheritance in UML
ClassA inherits from ClassB
14
New cards
What members of superclass would be inherited by subclass?
All visible members
15
New cards
Can you declare same instance variables of superclass in subclass?
Yes, BUT DONT DO IT.
16
New cards
How to invoke superclass constructor?
use super(); as first statement of subclass constructor
17
New cards
How to invoke superclass method?
use super keyword (good programming practice even if optional)
18
New cards
Multiple Inheritance (have 2+ direct superclasses)
NOT SUPPORTED IN JAVA; increases complexity of programming
19
New cards
Implementation Artifact
Source code and Read
20
New cards
Implementation Goals
to implement, test and integrate classes
21
New cards
Big Bang Integration Strategy
WORST IMPLEMENTATION STRATEGY
22
New cards
OOP Implementation Strategy
implement a class, test it, integrate into software, test again (integration testing)
23
New cards
Prototype
simple version of the software that served as mockups
24
New cards
Implementation: Two phenomena

needs to cope with non-stop change and increasing complexity (OOD is most effective)

25
New cards
Testing
systematic attempts to find defects (breaking code deliberately)
26
New cards
Testing criteria
compare behavior with what was promised in functional spec; any violation from functional spec is considered a defect.
27
New cards
Types of Testing
UNIT, integration, smoke, regression, stress, user acceptance, alpha/beta
28
New cards
Unit Testing
make sure all units (methods/objects/packages) of the software individually works fine
29
New cards
Expected Value vs. Actual Value
value of variable we expect to get vs what we get after executing code (TWO VALUES SHD BE EQUAL IN WORKING CODE)
30
New cards
JUnit5 Framework
organizes testcases OUTSIDE of source code (helps with neatness)
31
New cards
JavaFX
framework written in Java for creating graphical user interface (GUI) in java applications (desktop & web)
32
New cards
Why is JavaFx better than Swing?
JavaFX has richer libraries/widgets, GUI can be created faster, more efficient applications, more readable, better support for MVC, easier to integrate sound and video
33
New cards
Goals of Design
Identify the classes, responsibilities (interface), relationships between classes
34
New cards
Technical-spec
artifact from design phase; official description of software components written by software designers for developers
35
New cards
technical-spec ingredients
repeat problem statement, block diagram of software architecture, UML diagrams showing classes/relationships, UI mockups
36
New cards
identifying classes from functional-spec
look for nouns, don't be too specific or too general
37
New cards
identifying responsibilities
look for verbs, every responsibility belongs to only one class,
38
New cards
CRC
class-responsibilities-collaborations, technique to refine classes/responsibilities, find a class for each responsibility, find class' relationships
39
New cards
crc card (NOT PART OF TECHNICAL-SPEC)
describes one class- contains name of class, responsibilities of class, and it's dependencies/collaborators
40
New cards
Golden Rule of Design
every class should have a single purpose.
41
New cards
Quality of Class' Interface (5 Cs)
Cohesion, Completeness, Convenience, Clarity, Consistency
42
New cards
Cohesion
a class is cohesive if it has a single purpose
43
New cards
Completeness
class' interface should support all responsibilities it was intended to and NOTHING LESS
44
New cards
Convenience
class' interface should be easy to use
45
New cards
Clarity
there should be no confusion in class's interface (should be clear and readable)
46
New cards
Consistency
operations in a class should be consistent
47
New cards
Benefits of 5 Cs
higher readability, maintainability, reusability, and testability.
48
New cards
Relationship Between Classes
6 relationships - dependency, aggregation, composition, inheritance, interface implementation
49
New cards
Dependency (uses relationship)
ClassA depends on ClassB is ClassA USES ClassB (asymmetrical relationship- only works one way); classB is mentioned in classA
50
New cards
Is imported by unused class a dependency?
YES, because Java compiler looks for it when compiling the code.
51
New cards
Is importing a library in a class a dependency?
If it's a Java library then NO, any other libraries YES.
52
New cards
Golden Rule of Design #2
Minimize dependency between the classes so that we can be less concerned about how changes in ClassB will affect ClassA (easier maintenance)
53
New cards
Aggregation (has-a-relationship)
ClassA aggregates ClassB if ClassA has ClassB in its INSTANCE VARIABLES; implemented through instance variables
54
New cards
Multiplicity of Aggregation
how many instances of ClassB is required in classA; written as x(# of ClassA's instances):z(# of classBs instances)
55
New cards
precise multiplicity

use a range for number of instances of ClassB; x:y..z

(# of classA instances):(min # of classB instances)..(max # of classB instances)

56
New cards
difference between aggregation and dependency
aggregation is a subset (type) of dependency
57
New cards
Composition
ClassA composes ClassB if ClassA has ClassB in its instance variables AND ClassB CANNOT exist independently
58
New cards
Showing relationships between Classes using UML diagrams
use connectors, each of the 6 relationships has a specific connector
59
New cards
Diamond for both aggregation/composition is at the end of of the..?
aggregator/composer class
60
New cards
Sequence Diagram
shows interaction between OBJECTS during RUNTIME- show single method behavior (single complex use case)
61
New cards
Preferred way to write object in sequence diagram
Rectangle, underlined font for object, name is ( : ClassName); other ways are just objectName and objectName : ClassName
62
New cards
State Diagram
shows how different states of an OBJECT change its behavior during RUNTIME; for SPECIFIC OBJECTS that have high impact on system behavior
63
New cards
Entity
any individual thing that exists in this universe
64
New cards
Cyberspace

virtual universe; electronic model of the real universe

65
New cards
Paradigm
a method for modeling and representing ENTITIES and their INTERACTIONS
66
New cards
Object Oriented Paradigm
models entities of the real universe with objects
67
New cards
Object
entity in the cyberspace that has a state, behavior, and identity
68
New cards
State of an Object
the set of the values of the attributes at any moment
69
New cards
Behavior of an Object
set of the operations (services/methods) that an object can do (or give)
70
New cards
Identity of an Object
unique name given to the object by the JVM (helps distinguish objects with same states and behaviors)
71
New cards
Abstraction
removing the details to have a generic concept/blueprint of it
72
New cards
Class
an abstraction of similar objects
73
New cards
Class Members
instance variables (attributes), methods (behavior), and nested classes
74
New cards
Access Modifiers
public (no restrictions, global visibility), protected (only visible in same package), default (same package), private (most restricted, only in same class)
75
New cards
API (of a single class or library)
whatever can be seen by other classes
76
New cards
Interface
whatever can be seen by other classes from a SINGLE CLASS
77
New cards
UML (Unified Modeling Language)

A tool for diagramming a set of object classes has class name, instance variables, and methods

78
New cards
JavaDoc Tags
@author
@param
@return,
we can also add new tags
79
New cards
javadoc utility

creates HTML pages for classes takes first sentence of comments into summary table (so first sentence should be rlly descriptive)

80
New cards
Problem Statement

non-technical document from client that clearly describes the problem with 3 major parts problem, vision, domain

81
New cards
Software Development Lifecycle (SDLC)
(1) Planning (2) Analysis (3) Design (4) Implementation (5) Testing (6) Delivery (7) Maintenance

The sequence of these phases is the SDLC
82
New cards
Planning Phase
allocating resources (time, team, money), creating project plan
83
New cards
Artifact
The output of a phase (document, source code, diagrams, etc.)
84
New cards
Analysis Phase
transform problem statement to a precise description of the tasks that the software is going to do
85
New cards
Functional-spec

Artifact from Analysis Phase official description of requirements demanded by client

86
New cards
Components of Functional-spec
Problem in more detail, describe what required features are (NOT HOW), describe use-cases, has software mockup
87
New cards
Use Case

description of the steps that provides ONE BENEFIT (feature) of your software (system) to the client; in analysis phase

88
New cards
Use case Variants

use cases should predict bad scenarios too; bad scenarios are variants/alternatives