Software Development Flashcards
What does the SDLC represent?
The development of software as phases or sets of activities
What causes the SDLC?
The desire to define a predictable process to improve quality
What does the SDLC involve?
Creating processes that can be effectively managed
What are the 5 broad categories of the SDLC?
- Requirement Analysis
- Design
- Implementation
- Testing
- Evolution
What is Requirement Analysis?
What business/scientific problem is the system addressing?
What will the system do? Who are the users?
What is Design?
Hardware, software and network requirements
What parts are in-house, and what is externally developed or bought of the shelf
What is Implementation
The process of turning a software design into a working system by writing code, integrating components, and deploying it for use.
What is Testing?
The process of evaluating software to ensure it works as expected, is free of bugs, and meets user requirements.
What is Evolution?
Has system accomplished its goals, are there any modifications
Also includes maintenance of the system
What are the 4 Software Development Methodologies?
- Waterfall
- Prototyping
- Rapid Application Development
- Agile Development
What is a Waterfall?
Breaks process down into distinct sequential phases
- Each phase needs sign-off before moving to the next
- Leads to very well documented projects
What is Rapid Application Development?
Creating software quickly by focusing on speed, flexibility, and user feeback.
1. Fast Prototyping: quickly build small working versions
2. User involvement: give feedback on prototypes
3. Team improves software in short cycles
4. Skips heavy documentation and focuses on delivering functional features quickly
- Often development deadline prioritised over requirements.
What is Agile Development?
Where teams work in small steps called sprints, constantly adapt to change, and deliver results frequently. After each sprint teams reflect what went well, and get feedback. It focuses on collaboration, flexibility, and getting feedback to improve the product.
What is Prototyping?
Creating a simplified, working model of the software to test ideas, gather feedback, and refine before the final version is built.
What are the advantages of Agile Development
- User engagement
- Rapid Development of a usable product
- Early testing catches bugs and results in a high quality product
- Small incremental changes mitigate potential risk of introducing large change to system
What is a Scrum?
A framework within Agile development that organizes work into short, focused cycles called sprints (typically 2-4 weeks) to deliver small, workable software increments.
What is a Sprint planning meeting?
Part of a scrum that focuses on:
- Which items will be worked on
- Identify sprint tasks
- Divide the sprint into timeboxes
What is a Daily scrum meeting?
Part of a scrum that focuses on:
- Summarising previous day’s work and coming day’s work
- Intended to foster collaboration
What is a sprint review meeting?
A session where the team shows what they have built during a sprint
Part of a scrum that focuses on:
1. Showcase work: Team shows the features or improvements completed
2. Feedback time: Stakeholders give input on work
3. Adjust plans: Based on feedback, update priorities
4. Collaborative session: Everyone discusses what went well and what could be improved
What are the advantages of OOP?
- Encapsulation/information hiding
- Inheritance
- Polymorphism
What is the difference with OOP in comparison to procedural programming?
Puts code into objects, in contrast to procedural programming where no relationships are defined for each entity.
What should classes in OOP include and how does encapsulation sometimes cause issues?
- Should usually be specified to include only code related to their specific function.
- Encapsulation can cause issues with tightly coupled classes that rely heavily on each other’s members.
- This creates a lot of work in designing functions to access those - members.
- These issues are more common in GUI programming.
Define a Nested Class
Classes defined within classes
What are two types of Nested Class?
- Static nested class
- Inner class
What modifiers can be used for standard outer classes and nested classes in Java?
Standard outer classes (top-level classes) can only be declared with two modifiers:
- public
- default (package-private)
Nested classes can be declared with any of the standard modifiers:
- public, private, protected, or package-private.
What is the main difference between Static Nested Class and Inner Class?
Static nested class (doesn’t have access to instance members)
Inner class (does have access to instance members)
Why use nested classes?
- Closely linked classes can be located in one place for better organization.
- If one class is only used by another, making it a nested class makes this relationship explicit.
- Increases encapsulation by controlling visibility:
- If the Engine class is nested inside the Car class, the private members of Car are visible to Engine.
- Can also improve code readability.
List 4 key features of Inner Classes
- Can be difficult to spot in code
- Will produce two class files on compilation
- Inner classes can be directly accessed by the enclosing instance
- All nested classes can be accessed externally through either the containing class or object
How does the scope with inner classes work?
“this” refers to the inner type instance
“OuterClass.this” refers to the instance of the surrounding (outer) class, when within the inner class code blocks.
What are local classes?
Local classes are defined and exist solely within a block (usually a method)
What can’t local class declaration contain?
Cannot contain public, protected, private, or static.
What can local classes access and not access?
Can access all members of outer class instance like standard inner class member
Cannot access method local variables unless they are declared as final
Define an anonymous class
Classes that are declared without any class name at all
How can anonymous classes be defined?
Not only may these be defined within a method, they may also be defined within an argument to a method.
Define Concurrency
To be able to perform multiple processes at same time
Each process happens in parallel without having to wait for each other to be scheduled
(including the potential interaction between them)
What is multiple tasks at the same time called?
Parallelism
Why is concurrency important?
Most efficient use of hardware - gets the most out of the processor and its cores
What is a thread?
Can be treated as lightweight processes
Threads exist within a process
Why use threads instead of separate programs?
Easier to manage multiple threads under a process than have multiple different programs
What is Multi-threading
OS can run threads in parallel
- Virtually, on a single core processor
- Actually, on a multi-core processor
Define Nondeterminism
Where the exact order in which processes are executed cannot be predicted
What causes Nondeterminism?
Multiple tasks are running at the same time, and the OS may decide to swich between them at different moments
What is Liveness?
In simple terms, it means that the system isn’t stuck, frozen, or waiting forever—it ensures that things keep moving forward, like responding to user actions, processing data, or handling requests
Examples:
- A website showing search results when you hit “search.”
- A background task in an app eventually finishing its job.
What are the 2 ways threads can be created in Java?
- Using the Thread class
- Using the Runnable interface
How to stop a Thread?
- Setting a flag
- Interrupting
What are Race Conditions?
When two threads try to access/change data at the same time
Define an Atomic Action
In programming, atomic actions are self-contained, they can’t be stopped in the middle
- They either happen or don’t
What is Deadlock?
When thread 1 needs a resource in thread 2, and thread 2 needs a resourse in thread 1
This creates a deadlock and nothing happens as to run they both require resources from each other, creating an infinite cycle - deadlock
Define Starvation
Where a thread can’t gain regular access to shared resouces because another thread is frequently calling the objects methods
Define Livelock
Similar to deadlock, except that it occurs when 2 threads are too busy responding to one another to work
What does wait() do?
Releases the lock and regains it using the notify()
What is the difference between Wait and Sleep?
Wait
- Must occur in block synchronised on the monitor object
- Releases the monitor (lock) when called; doesn’t sacrifice the remainder of its time slice
- Will wake up if notified via call
Sleep
- Doesn’t need to occur in a synchronized block
- Retains the monitor (lock) when called and sacrifices the remainder of its time slice
- Can only be woken up by an interruption (not by notify)
What is a Thread lifecycle?
Thread needs to wait to start until the start method is invoked goes between runnable and running, this is dependent on the OS
What is Yield()?
Identifies the current thread as doing something not particularly important
How does Yield() work?
Causes the currently executing thread object to pause and allow other threads to execute
If no other threads of the same priority need to execute, the thread continues.
What is Join()?
Allows one thread to wait for the completion of another
How to stop a Join()?
Like sleep, responds to an interrupt
What is important about the data threads access?
Need to ensure the data our threads are accessing is fresh (up to date)
Stale data can lead to large issues
What are Atomic Variables?
Variables that support atomic operations, ensuring that increments, decrements or reads happen as a single uninterruptible action
Explain volatile & data freshness
Volatile: : A volatile variable is a variable that can change at any moment, often due to factors outside the program
Data Freshness: How recent or up-to-date the data is, fresh data is reliable and current.
What is publishing?
Publishing an object is when you make it available outside its current scope
By default should you publish an object?
By default, we shouldn’t have to publish an object unless we have to
- if we do, we may need to confirm the thread-safe nature of the publishing
What is an escaped object?
An object published when it should not have been
List 4 key points about thread confinement.
- One of the simplest ways to ensure thread-safety
- If the data doesn’t need to be shared, confine it to a single thread
- If data is only used by a single thread then its said to be confined
- Thread confinement is an element of the programs design
What is a Lambda expression?
Essentially a block of code that you can pass a round between objects
Define Version Control
Tracking and managing your files by recording changes over time, you can recall specific versions later
How does a Version Control System work?
In a team setting if a change is made that isn’t wanted by other members, they can revert the changes back to before
What are three key factors of a Version Control System?
- If a new person joins a team they can check the older versions to understand the progress of the project
- Sharing of files and information about the project
- Modern version control systems have atomic commits
What are the advantages of using a Version Control System?
Gives a development team a project wide undo button
Place to store all files/documents/directories - repository
Repository acts as a server
Allows multiple developers to work on same code in controlled manner
Keeps record of changes
Can support multiple releases at same time
Time machine can examine how project looked at particular dates/versions
Can see who added/changed code - name/blame
Centralized vs Distributed repositories
As soon as you commit to a centralized repository others can see your changes
Developers must push changes and pull updates from distributed repositories
Copies vs Versions in Version Control Systems
Doesn’t just store copies, it stores every version that has ever been checked in
What are Revision Tags?
Allow you to provide text for particularly important revisions
Easier to remember and more informative than version numbers
What is a Trunk?
Main code base that developers are working on
What is Branching?
Like creating a copy of your project to work on separately without affecting the main version. You can make changes, try new features, or fix bugs in the branch, and later merge it back into the main project once everything works well.
What is Forking?
Forking means creating a personal copy of someone else’s project in your own repository. It’s like copying the whole project to your account so you can work on it independently.
What is Merging?
Merging back the changes made in branch
What is Strict Locking?
Only one person can change a file at any one time
What is Optimistic Locking?
All files can be changed, but if changed in the repository since last check out then local copy needs to be updated before you can commit a change
What are the implications of Optimistic Locking?
The version control system doesn’t know what you want - so it leaves it up to you to sort out
If you commit a file which has changed since you last updated you will be told the commit has failed
What is an Event?
Something that happens in a program
(Such as: pressing a key)
What is a Listener?
A function/piece of code that waits for a specific event to happen, and responds by executing some action.
Polling vs Event-Driven Programming.
In event-driven programming, instead of repeatedly checking for events, the system waits and responds to an event only when it occurs - typically more efficient
Polling on the other hand is less efficient, because it consumes resources even when nothing happens
What are Alternatives to Polling?
Interrupts - where the hardware or OS alerts the software when an event occurs
Event Listeners - where the system waits for an event to trigger a specific action
Why use Events & Listeners - GUIS?
- Can check for button presses and clicking on graphical icons
- Efficient use of resources
What is a source?
An object that generates an event
What is a key model used in Software Development?
V-Model
What is the V-Model?
Extends the Waterfall Model by emphasizing testing at every stage. Follows a sequential process, where each development phase has a corresponding testing phase.
The V shape illustrates thee relationship between developing on the left and testing on the right of the V.
It ensures early testing and verification, but is rigid, making it less flexible for changes once a phase is complete
What is the concept of operations in the V-Model?
- Provides a statement of the goals and objectives of the system
- Includes strategies, tactics, policies and constraints affecting the system - so contextualizes the system in the wider business
- Clear statement of responsibilties and authorities to the various participants involved in the system
- Specifies the processes for iniating, developing, maintaining and retiring the system
What is the Requirement analysis in the V-Model?
Cover three core areas:
1. Requirement gathering
2. Are the gathered requirements, clear, complete, consistent and unambiguous?
3. Clear statement of responsibilities and authorities to the various participants involved in the system
- Also what can the system achieve with time?
What is the High-Level design in the V-Model?
Will describe the platforms, systems, products, services, that the developed system will depend on
Typically will include an architecture diagram - this will show the interface, components and networks that need to be further specifed or developed
What is the Detailed design in the V-Model?
Specifies how the system will be constructed
- for instance how the functions/objects/methods should be
Once detailed design is generated it should be possible to write the tests before the actual system is implemented
What is Unit Testing in the V-Model?
Testing individual blocks of code in terms of correctness
(Probably the most widely used testing type that you have done so far)
What is Integration Testing in the V-Model?
Testing the final system when grouped together or integrated
Unexpected behaviour may arise at this point, which is checked for here
What is System Testing in the V-Model?
Testing the system as a whole
- Also checks that it doesn’t impair performance on the wider environment
- Affecting broader resource availability on the OS
- Affecting other applications working on the same system
What is User Acceptance Testing in the V-Model?
Plans are developed during requirement analysis phase and are composed by users
Is performed in a user environment that resembles the production environment and uses realistic data
Ensures that the delivered system meets the users requirements and system is ready for use in real time
It’s based on validation rathjer than verification
What are the advantages of the V-Model?
Highly structured, phases completed one at a time
Works well where all requirements are understood
Simple to understand
Easy to manage - each phase has a definite end with a review
What are the disadvantages of the V-Model?
Once a project is in the tesing phase it is difficult to go back and change functionality
Not suitable for projects where requirements might change
No working software created until late in the cycle
What are the Testing Categories?
Static Testing
Dynamic Testing
- White box testing
- Black box testing
- Grey box testing