1/100
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai |
|---|
No analytics yet
Send a link to your students to track their progress
Software System Life Cycle
Analysis -> Design -> Implement(Code) -> Test -> Maintain -> Analysis -> ...
Top-Down Design (stepwise refinement)
break down into smaller and smaller pieces, easy to implement
Bottom Up Design
uses pre-existing modules/libraries, saves time and effort
Object oriented Programming (OOP)
interacting objects, data centered, bundles actions and processes with data, very large projects can be developed more easily, modifications can be made without altering the "insides"
3 Big Ideas of OOP
abstraction(encapsulation), inheritance, and polymorphism
Flowchart Shape: diamond
decision (boolean)
Flowchart Shape: rectangle
process
Flowchart Shape: paralellogram
input/output
Flowchart Shape: oval
start/end
Unified Modeling Language (UML)
visual organizer showing objects and contents
UML visual example
Name of class
------------------------
Attribute name: type
[set of variables, attributes, etc.]
-------------------------
Methods (parameters)
.
.
.
return type
Waterfall Development Model
linear progress, works in industry, not software, clear and straightforward but rigid and difficult to modify, changes are costly
idea -> analysis -> design -> develop -> test -> final
Incremental Development Design
small amount done at a time, test and adjust as needed, completes entire process in each increment, flexible to change, includes customer testing
plan -> analyze,design,implement(development) -> test -> evaluate -> plan -> ...
Spiral Development Design
includes risk analysis, documentation is difficult, uses prototyping and best parts of other models, costly and complex to manage
communicate -> plan -> model -> construct -> deploy -> communicate -> ...
Agile Development Design
commonly used in software development, can cause loss of focus or more complex project, risk of going over budget, incremental and iterative, flexible
sprint - set small simple short-term goals, achieve, test, evaluate, repeat
some common examples: SCRUM, XP, Kanban
code style conventions for constants
CAPS
code style conventions for class
Firstlettercapital
code style conventions for method/variable
CamelCase
Precondition
what must be true for the code to be executed
Postcondition
what will be true after the code is executed
Robust Program
able to withstand adverse conditions ("handle exceptions")
Unit Testing
process of testing each individual process
Input Protection/Data Validation
include a test of the form of input data
Exception
error in programming (checked or unchecked)
Exception Handling
protecting against exceptions
Try Catch Block
common exception handler
string
try {...}
catch {...}
Class vs. Object
definition of thing vs. actual thing
ex) recipe vs. meal
ex) blueprint vs. building
Encapsulation
object is defined as single entity with several inter-working parts
Abstraction(information hiding)
User is not privy to how inner parts work, but understands how to interface for use
ex) cars, computers, TV
Imperative(Procedural) Programming
code describes in exact detail what steps computer must make
Functional Programming
pure functional approach to problem solving
Inheritance
defining an object just like another but with more details, or extra details
[test "is a": one object "is a" form of another]
"Is a" Test
If one object "is a" form of another this is an example of inheritance
Parent Class
original class
Child Class
Inheriting class
Composition
made of predefined parts, several objects make one large object
[test "has a": a car "has a" body]
"Has a" Test
if an object "has a" different object this is an example of composition
Polymorphism
"many forms", redefining methods as needed
3 situations: overloading, overriding, polymorphic objects
Overloading
type of polymorphism, same name but operate different parameters to perform the same task
ex) car door lock is opened with a key or remotely
Overriding
type of polymorphism, redefining
Polymorphic Objects
type of polymorphism, parent can reference any child or grandchild
ex) furniture -> wooden furniture -> chair
a chair is still also furniture
Instruction Set Architecture (ISA)
part related to programming (native data types, instructions, external input/output, exception handling, registers, memory architecture)
Complex Instruction Set Computing (CISC)
micro-processor architecture, the machine instruction set designated as complex, primarily used by Intel and Intel Pentium; processors contain numerous instruction sets
Reduced Instruction Set Computing (RISC)
micro-processor architecture, few instructions, limiting to frequently used instructions, used by MacIntosh and Apple
Computer Architecture
relates to the way circuit boards and processors are designed and defined (CPU most significant)
Operating System (OS)
software that manages hardware and provides common services
Disk Operating System (DOS)
1966, first widely installed OS, operates using the command line, mainly IBM 1981-1995
Windows OS
1.0 released 11/20/1985,
XP - used underpinnings advanced security, stability, efficiency
vista - 2006, windows search, DVD maker, aimed to increase peer to peer file sharing
windows 8 - 2012, optimized for touch systems
Unix
family of multitasking, multiuser OS derived from AT&T, developed 1970s by Bell Labs, Ken Thompson, Dennis Ritchie
Linux
Linus Torvalds 10/5/1991, Unix-like open-source software, defining component was Linux kernel
Mac OS
1984, graphical user interface OS, Apple and MacIntosh
Mac OSX 2001
GM-NAA I/O
1956, forst OS for IBM 704 computer, General Motors, aeronautical research
Master Control Program (MCP)
1961, first OS with multiple processors, first commercial implementation of virtual memory, first OS written exclusively in a high level language
Artificial Intelligence
logic processes performed by software using sophisticated logic and large database systems
Low Level Language
easy for computer to understand and execute, written in machine code
High Level Language
easy for human to understand, must be translated into machine language to execute
Machine Code
original low level language, rows of switches flipped on or off by operator
Assembly
one step above machine, made easier to express programs, converts to machine code
Two Ways to Translate High Level Language to Machine Code
interpret
compile
Interpret
translated and executed line by line
Compile
translate all, then execute
Three Paradigms of High Level Language
procedural
functional
object oriented
Procedural (Structured Programming)(Imperative Languages)
first to develop, contain step-by-step instructions
ex) Fortran, Cobol, Pascal, C
Functional
"mathy", given data, recursion primary way to iterate process
ex) LISP, Haskell, Scheme
Object Oriented (OOP)
actions and data bundled in objects defined by classes
ex) C++, Java, Python
Fortran (Formula Translation)
1950s John Backus, used for science and engineering
COBOL
late 50s/early 60s Grace Hopper, used for business
BASIC (beginner's All-Purpose Symbolic Instruction Code)
1964 Dartmouth College, easy to learn and use, good for new or young programmers
Pascal
late 60s Niklaus Wirth, used as a teaching language
C and C++
1970s, replaces Pascal, general purpose, further developed OOP
Programming Language used on AP exams
1984 Pascal - 1sy Ap comp sci exam
1999 C++
2003 Java
Java
early 90s Sun Microsystems, James Gosling, used by engineers, popular present day, not compiled into machine but instead bytecode(portable code) which is then translated by each device and OS
Bytecode
universally portable software (Java uses)
ex) a game made for Xbox and Nintendo uses the same code but each console translates to what they need in order to execute
Python
Guido Van Rossum, named for Monty Python, supports procedural, functional, and OOP, general purpose high level language, emphasizes code readability
Visual Basic
1991 Microsoft, event-driven, easy to learn and used to create GUI based programs
XML (Extensible Markup Language)
set of rules defined for encoding documents in a format readable by both human and machine
Assembly Language
low level language using mnemonic opcodes (such as mov, sto, load) to directly interact with CPU, used by experts for highly efficient/fast programs
Backus Naur Notation
used to describe syntax in a context-free way
Pseudocode
informal high level description of algorithm, non-executable, meant to clearly express code
Syntax (Railroad Diagram)
graphical alternative to Bakus Naur
ex) if -> condition -> then -> statements -> else-if <(2 options) ...
float/double
data type, number with decimal values
int/short
data type, integer
char
data type, single entry text, 'enclosed in single quotes'
string
data type, multiple entry text, "enclosed in double quotes"
boolean
data type, true or false, 1 or 0
byte storage and limits
8 bits, values from -128 to 127
short storage and limits
16 bits, values from -32,768 to 32,767
int storage and limits
32 bits
long storage and limits
64 bits
char storage and limits
16 bits, cousin to int, number represents characters in ASCII/UniCode
ex) A=65, a=97, 0=48
Wraparound
reaching the end of an integer value and looping around to the other end
ex) byte num -> 127
num <- num + 1
print (num)
*output is -128 because byte max value is 127
float storage precision
32 bits, loses precision beyond 7 decimals
double storage precision
64 bits, loses precision beyond 15 decimals
Variable
location in memory containing a changeable value
Constant
memory location cannot be changed once assigned
Declare
assign name
Instantiated
assign a value to a declared variable
<- or = symbols used
a valid variable name... (5 identifier rules)
1. Must contain only letters, numbers, and underscore
2. Must begin with letter or underscore
3. May not contain symbols
4. May not contain spaces
5. May not be a reserved word from the language
coding conventions (6 rules of thumb)
1. classes start upper case
2. procedures, functions, and methods start lower case
3. camelCase multiple word identifiers
4. CONSTANTS are all caps
5. use meaningful names
6. abbreviate within reason
True or False: Assignment statements are "left to right" operation.
False, they are right to left operations, the right side compiles first, i.e. comp sci is not commutative
ex) num = 7 is good
ex) 7 = num is bad