Software dev midterm

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

1/49

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.

50 Terms

1
New cards

waterfall process model

  • requirements

  • design

  • implementation

  • verification

  • maintenance

2
New cards

6 reasons for project failure

  • functionality issues

  • substantially late

  • quality issues

  • high cost variance

  • canceled after launch

  • rejected or not implemented for other reasons

3
New cards

three steps in a SW project

  • analysis

  • design

  • implementation

4
New cards

what superseded the waterfall model?

Agile Software Development, managed by Scrum

  • build software incrementally

  • use short 1-4 week iterations

  • keep development aligned with changing needs

5
New cards

ISA

  • instruction set architecture

  • machine code

6
New cards

compiled languages

  • translated into machine code ahead of time by the compiler

  • compiler produces an executable file that runs directly on the CPU

  • fast and efficient at run time

  • must be recompiled separately for each machine architecture/OS

7
New cards

interpreted langauge

  • code is read and executed line by line by an interpreter

  • can move the same program between different systems and run it unchanged

  • slower since each instruction is translated at runtime

8
New cards

java language

  • compiles into java bytecode and runs on a Java Virtual Machine

  • that same bytecode can be run on any machine with a JVM

  • JVM uses a JIT (just in time) compiler, which watches which parts of the code run a lot, then compiles those hot spots into machine code (pretranslated)

  • portability of interpreted languages + efficiency of compiled languages

9
New cards

Local Version Control System

  • database of changes on local computer

  • delta base version control

  • stores a base version and then only saves the specific changes for each version

  • no collaboration

  • example: revision control system

10
New cards

Centralized Version Control System

  • entire version database is stored on a central network server

  • supports collaboration

  • workflow:

    • sync with VCS server

    • update to latest version from VCS

    • work on local version

      • commit changes to VCS (after potential conflict resolution)

  • single point of failure

    • if a server goes down, no one can save their work

11
New cards

Distributed Verson Control System

  • everyone gets a clone of the repository, including its full history

  • if central server crashes, repository can be restored from any local copy

  • workflow:

    • commit: save changes to local repository history

    • push: to share local commits to the upstream repository

  • Git is the actual software

  • Github provides the central repository

12
New cards

Git

  • series of snapshots of a miniature file system

  • no duplicate files as snapshots share references to identical files

  • operations are local because I have a fully copy of snapshots and history

  • checksum SHA-1 Hash key used as id for files/folders

13
New cards

Git: 3 states for a file

  • committed: data is safely stored in the local database

  • modified: file changed but not yet committed to local database

  • staged: modified file is marked in its current version to go into the next commit snapshot

14
New cards

trunk(green)

  • main line of development

  • Git: “master” branch (default) or main branch

15
New cards

tag(blue)

release, a full snapshot of a version that is not supposed to be changed

16
New cards

branch (yellow)

  • side tracks to the trunk line that results from maintenance, bug fixes of released versions, or as a general stratedgy to support team work and concurrent development

  • merging occurs if one wants to incorporate improvements from a branch into the trunk

17
New cards

hardware has separate units for integer and floating point arithmetic

  • basic types for discrete numbers: integer, short, long integer

  • basic types for floating point: float, double precision

18
New cards

program counter (PC)

  • special register in the CPU that holds the memory address of the very next instructions to be run

  • After the CPU finishes an instruction, the PC increments to the next address (pc + 1)

19
New cards

heap

  • large, less structured pool of memory available

  • memory can be allocated (requested) and deallocated (released) at runtime

  • garbage collection

    • finds any objects on the heap that are no longer being used by the program and frees memory

  • Java’s type system tells the program how to interpret raw bit patterns

  • it is important to initialize variables bc it might contain leftover garbage

  • Dynamic data structures

    • it can always request more memory from the heap as it grows

20
New cards

volatile memory

  • short-term memory that requires constant power to maintain its data, losing everything when the device is turned off

  • RAM

  • CPU cache

  • main memory

21
New cards

persistent memory

  • long term storage that retains its data after power is turned off

  • SSD, hard drive

22
New cards

object-oriented programming

a paradigm that bundles data (attributes) and the functions that operate on that data(methods) into a single unit called an object

23
New cards

encapsulation

practice of hiding an object’s internal data and complexity, exposing only safe, public methods for interaction

24
New cards

polymorphism

  • the ability to treat objects of different types as if they are the same, as long as they share a common role/interface

  • allows for flexible and reusable code

  • ability to select different methods (of same signature) according to the actual type of an object

25
New cards

package

  • a mechanism for organizing related classes and interfaces into a group/namespace

  • implemented as sub directories on the file system

26
New cards

class

  • fundamental coding unit

  • can only have one public class per file

  • it is reccomended to give each class its own file

27
New cards

non static method

  • belongs to a specific instance of a class

  • works w/ the unique data (attributes) of that instance

  • must create an object first to be able to call the method

28
New cards

static method

  • belongs to the class itself, not to any one object

  • a general function that doesn’t depend on the state of a specific instance

  • can call it directly on the class without ever creating an object

29
New cards

try{

}

finally{

}

  • guaranteed to execute after the try block, regardless of whether an exception was thrown or not

  • primary purpose is for resource cleanup, such as closing files or network connections

30
New cards

unchecked exception

  • represent a bug/logical error

  • things the programmer could have and should have prevented

  • the compiler doesn’t check to see if you handle them

  • NullPointerException

  • ArrayIndexOutOfBoundsException

31
New cards

checked exception

  • expected probemems with external resources that a correct program might encounter

  • compiiler checks your code and forces you to acknowledge that this error might happen and have a plan for it

  • if you call a method that is declared to throw a checked exception, you have to handle it with a try-catch or a throw

  • IOE exception - if a file is deleted or network connection is lost

32
New cards

primitive type

  • value is stored directly in memory

  • byte, short, int, long, float, double, char, and boolean

33
New cards

tokenization

  • the process of splitting a string into a sequence of smaller strings, called tokens

  • based on a separater called a delimiter

34
New cards

hasMoreTokens()

  • boolean method that returns true if there are more tokens left to process

  • used as the condition for a while loop

35
New cards

nextToken()

returns the next token as a string and advances the internal cursor

36
New cards

countTokens()

returns the number of tokens remaining to be processed

37
New cards

parseInt()

static method that takes a string and returns the corresponding int

38
New cards

call stack

  • stores local variables for primitive types

  • for object types (String, ArrayList) : stores a reference that points to where the actual object lives on the heap

39
New cards

object state

  • constructor establishes a valid initial state

  • an object can use its state to control the order in which its methods are called

40
New cards

interface

  • a contract that defines a set of abstract method signatures

  • what a class must do, not how

  • a class that uses “implements” promises it will provide the code for all methods in the interface

  • enables polymorphism, allowing to write code that works with any object that fulfils the contract

41
New cards

static field

  • a variable that is shared across all instances of a class

  • only one copy of a static variable, no matter how many objects you create

42
New cards

constant

  • static final

  • only one instance of this variable associated with the class

  • its value can never be changed after it is initalized

43
New cards

what is the superclass of all objects?

java.lang.Object

44
New cards

HashMap

  • a data structure that stores key-value pairs

  • uses a key’s hashCode() to find the correct array index for storing/retrieving a value

  • then uses equals() to find the exact key in the bucket, which is needed to handle hash collisions

  • if two objects are equal, they must have the same hash code

45
New cards

superclass

  • you can use a subclass object whenever a superclass object is expected

  • a subclass method can’t be more demanding/stricter about its inputs then its parent method

  • user super.method() to call a method from your direct parent class

  • climbs are just one level in hierarchy

  • For constructors:

    • super() used to call a constructor from the direct parent class

    • it must be the 1st statement

    • if a subclass constructor doesn’t call super, the superclass must have a constructor with no parameters

46
New cards

SOLID principles in OO Design

  • S: single responsibility principle

    • class should only have one responsibility

    • concerns: effect of changes, complexity of a class, class reuse

  • O: Open/Closed principle

    • software entities should be open for extension, closed for modification

    • concerns: inherit from abstract base classes, keep interface fixed

  • L: Liskow’s substitution principle

    • objects in a program should be replaceable w/ instances of their subtype w/o altering the correctness of the program

  • I: interface segregation principle

    • many client-specific interfaces are better than one general-purpose interface

  • D: dependency inversion principle

    • depend upon abstractions

    • don’t depend on concretions

47
New cards

The percentage of large software development projects (budget exceeds $1M) that fail is in the following range (based on a Gartner study of 2012)

20-40%

48
New cards

what is method signature?

  • method name

  • parameter list

49
New cards

java primitive types

  • byte

  • short

  • int

  • float

  • long

  • double

  • boolean

  • char

50
New cards

Wrapper classes

  • Byte

  • Integer

  • Short

  • Double

  • Long

  • Float

  • Boolean

  • Character