0% found this document useful (0 votes)
15 views16 pages

SE VivaPrep

Uploaded by

atharv
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views16 pages

SE VivaPrep

Uploaded by

atharv
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

1.

Practicals Theory and Execution


• Understand Practical Goals: Revise the aim and outcomes of each practical.
• Code Understanding:
o Review the logic of the code.
o Understand algorithms used and their purpose.
o Memorize key functions or shell commands.
• Execution Steps:
o Know how to compile and execute the code.
o Be familiar with any specific tools or dependencies.
• Shell Commands:
o Common ones like ls, cd, mkdir, rm, cp, mv, chmod, grep, awk, and their
usage.
o Git commands like git init, git add, git commit, git push, etc.

2. GitHub
• Basic Workflow:
o Understand git clone, git pull, git push.
o Branching: git branch, git checkout, git merge.
o Handling conflicts during merge.
• Practical Uses:
o Version control.
o Collaboration.
o Maintaining a project history.

Detailed Explanation for CMake


What is CMake?
• CMake is a cross-platform build system generator.
• It simplifies building and managing the configuration of software projects.
• It generates platform-specific build files, such as Makefiles or Visual Studio
project files, from a platform-independent CMakeLists.txt file.
Why Use CMake?
• Portability: Works across Windows, Linux, macOS, and others.
• Flexibility: Handles dependencies, linking, and builds.
• Automation: Simplifies the build process for complex projects.
Key Components of CMake
1. CMakeLists.txt:
o The configuration fi le used by CMake to define the build process.
o Contains project metadata, source files, include paths, libraries, and
build instructions.
2. Commands in CMakeLists.txt:
o cmake_minimum_required(VERSION x.x): Specifies the minimum
version of CMake required.
o project(ProjectName): Defines the project name and optionally the
language (e.g., C, C++).
o add_executable(target_name file1 file2 ...): Defines an executable
target and its source files.
o target_link_libraries(target_name library1 library2 ...): Links libraries
to the target.
3. Typical Workflow:
o Create a CMakeLists.txt file.
o Generate build files using cmake command.
o Build the project using make or the corresponding build tool.
Basic Example
CMakeLists.txt:
CODE:
cmake_minimum_required(VERSION 3.10)
project(SampleProject)

# Add an executable target


add_executable(sample main.cpp)

Steps to Build:
1. Create a directory for your project and include the above CMakeLists.txt and
a main.cpp file.
2. Run the following commands in the terminal:
Bash SCRIPT
CODE:
mkdir build
cd build
cmake ..
make
3. The sample executable will be created in the build directory.

Software Development Models

1. Waterfall Model
Overview:
• The Waterfall model is a linear and sequential approach to software
development.
• Each phase must be completed before moving to the next.
• There is no overlap or iteration between phases.
Phases:
1. Requirement Analysis:
o Gather and document requirements.
o Outcome: Software Requirement Specification (SRS) document.
2. System Design:
o High-Level Design (HLD): System architecture and modules.
o Low-Level Design (LLD): Details for individual modules.
3. Implementation:
o Write and integrate the code based on the design.
4. Testing:
o Unit Testing, Integration Testing, and System Testing.
o Ensures software meets requirements.
5. Deployment:
o Deliver the software to the customer.
6. Maintenance:
o Post-deployment updates and bug fixes.
Advantages:
• Simple and easy to understand.
• Works well for small projects with clear, stable requirements.
Disadvantages:
• Rigid and inflexible; changes are dibicult to incorporate.
• Late discovery of errors during the testing phase.
• Unsuitable for complex or long-term projects.
Best Suited For:
• Small-scale projects with well-defined requirements.
2. Agile Model
Overview:
• The Agile model is iterative and incremental.
• It emphasizes flexibility, collaboration, and customer feedback.
• Development happens in small iterations called Sprints (2–4 weeks).
Key Features:
1. User Stories:
o Requirements are written from the user's perspective.
2. Sprints:
o Short cycles of development, testing, and review.
3. Daily Stand-Up Meetings:
o Team updates on progress, roadblocks, and plans.
4. Continuous Feedback:
o Customer feedback is incorporated after each sprint.
Advantages:
• Highly flexible and adaptive to changing requirements.
• Encourages collaboration between developers and customers.
• Faster delivery of working software.
Disadvantages:
• Requires constant customer involvement.
• Dibicult to predict cost and timeline.
• Less suitable for projects where requirements are not evolving.
Best Suited For:
• Dynamic projects with frequent changes in requirements.
• Projects focused on delivering a Minimum Viable Product (MVP).
3. Spiral Model
Overview:
• The Spiral model combines iterative development with a focus on risk
analysis.
• Each iteration, called a spiral, consists of planning, risk analysis,
engineering, and evaluation.
Phases:
1. Planning:
o Define objectives, alternatives, and constraints.
2. Risk Analysis:
o Identify and mitigate risks.
3. Engineering:
o Develop and verify the software increment.
4. Evaluation:
o Review deliverables with the customer.
Advantages:
• Risk-driven approach minimizes project risks.
• Suitable for complex projects requiring iterative refinement.
• Allows for incremental delivery of software.
Disadvantages:
• High cost and complexity.
• Requires expertise in risk assessment.
Best Suited For:
• Large, high-risk projects with evolving requirements.

4. V-Model (Verification and Validation Model)


Overview:
• The V-Model emphasizes testing at every phase of development.
• Each development phase has a corresponding testing phase.
Phases:
1. Requirement Analysis:
o Corresponding test: Acceptance Testing.
2. System Design:
o Corresponding test: System Testing.
3. High-Level Design (HLD):
o Corresponding test: Integration Testing.
4. Low-Level Design (LLD):
o Corresponding test: Unit Testing.
5. Implementation and Coding:
o Actual coding of the software.
Advantages:
• Testing begins early, reducing the chances of defects.
• Rigid and disciplined approach.
Disadvantages:
• Inflexible to requirement changes.
• Testing consumes significant time and resources.
Best Suited For:
• Projects where testing is critical, such as medical or safety-critical systems.

5. Iterative Model
Overview:
• The Iterative model develops the software in small chunks (iterations).
• Each iteration refines the product, adding more functionality.
Phases:
1. Initial Planning.
2. Iterative Refinement:
o Design → Implement → Test → Evaluate.
3. Final Deployment.
Advantages:
• Early delivery of partially working software.
• Easier to accommodate changes.
Disadvantages:
• Requires good planning and design upfront.
• Not suitable for small projects.
Best Suited For:
• Medium-to-large projects with clear but expandable requirements.

6. Big Bang Model


Overview:
• The Big Bang model is a non-structured model.
• Development happens without a clear plan or process.
Advantages:
• Simple and requires minimal planning.
• Suitable for small projects with one or two developers.
Disadvantages:
• High risk of failure.
• Poorly suited for large or complex projects.
Best Suited For:
• Small projects or proof-of-concept developments.

Incremental Model
The Incremental Model is a type of software development approach that divides
the project into smaller, manageable increments or builds. Each increment adds a
specific set of functionalities to the existing product until the entire software
system is developed.

Key Characteristics
1. Step-by-Step Development:
o The project is broken into smaller parts (increments).
o Each increment focuses on delivering a subset of the overall
functionality.
2. Partial Delivery:
o Functional software is delivered at the end of each increment.
o The software evolves over multiple iterations.
3. Customer Feedback:
o Early increments can be reviewed and feedback can guide
subsequent development.
4. Overlapping Phases:
o Development and testing are performed iteratively for each
increment.

Phases in Incremental Model


1. Requirement Analysis:
o All requirements are initially gathered and categorized into
increments.
2. System Design:
o A high-level design is created for the overall system.
o Each increment is designed in detail.
3. Implementation:
o The first increment is implemented, tested, and delivered.
o Subsequent increments are built on top of the previous ones.
4. Testing:
o Each increment undergoes testing for functionality and integration.
5. Integration:
o All increments are progressively integrated to form the final product.

Diagram of the Incremental Model


mathematica
Copy code
Initial Requirements → Increment 1 → Increment 2 → Increment 3 → Final Product
| | |
Deliverable Deliverable Deliverable

Advantages
1. Early Delivery:
o Early increments provide functional software, even if the complete
product is not yet ready.
2. Flexibility:
o Changes can be made in later increments based on feedback from
earlier ones.
3. Risk Management:
o Issues can be identified and resolved incrementally, reducing overall
risk.
4. Cost Management:
o Costs are spread out as each increment is delivered separately.
Disadvantages
1. Requires Planning:
o The model requires clear and thorough planning of increments.
2. Dependency Challenges:
o Later increments may depend heavily on earlier increments.
3. Overhead:
o Frequent testing and integration can introduce additional overhead.

When to Use the Incremental Model


1. Project Characteristics:
o Requirements are well-defined but may evolve slightly.
o The project can be divided into smaller, independent modules.
2. Examples:
o E-commerce websites (adding features incrementally such as user
registration, product catalog, and payment gateway).
o Mobile apps (starting with basic features and adding advanced ones).

he Incremental Model is most similar to the Iterative Model and shares some
characteristics with the Agile Model. Here's how they compare:

Incremental Model vs. Iterative Model


1. Similarities:
o Both deliver the software in parts, allowing for incremental
improvements.
o Testing and feedback occur after each stage.
o Supports gradual delivery and refinement.
2. Diberences:
o The Incremental Model focuses on delivering fully functional features
or modules incrementally, where each increment is a working subset
of the final product.
o The Iterative Model focuses on improving the entire system iteratively,
refining and evolving prototypes over successive iterations.

Incremental Model vs. Agile Model


1. Similarities:
o Both emphasize delivering working software in phases.
o Support customer feedback and adaptability.
o Early and frequent delivery of functional parts of the software.
2. Diberences:
o Incremental Model is less flexible than Agile. The plan for increments
is mostly fixed upfront, though minor adjustments are possible.
o Agile Model is highly adaptive, with priorities and scope often shifting
between iterations based on customer needs.
Conclusion
In the provided table, the Incremental Model aligns most closely
with Iterative and Agile Models, but it sits between them in terms of flexibility and
structure:
• More structured than Agile.
• Less focused on prototypes compared to the Iterative Model.

Software Development Life Cycle (SDLC)


1. Phases of SDLC:
1. Requirement Analysis:
§ Gather and analyze user needs.
2. System Design:
§ High-Level Design (HLD): System architecture.
§ Low-Level Design (LLD): Detailed designs for modules.
3. Implementation:
§ Coding the designed solution.
4. Testing:
§ Types: Unit Testing, Integration Testing, System Testing,
Acceptance Testing.
5. Deployment:
§ Releasing the product for use.
6. Maintenance:
§ Bug fixes, updates, and feature enhancements.
2. Importance of SDLC:
o Provides a structured approach to software development.
o Reduces risks and ensures quality.
`
Types of Software
1. System Software:
o Manages hardware and provides basic functionality.
o Examples: Operating Systems (Windows, Linux), device drivers.
2. Application Software:
o Directly used by end-users for specific tasks.
o Examples: MS Obice, web browsers.
3. Middleware:
o Acts as a bridge between software applications and operating
systems.
o Examples: Database middleware, message-oriented middleware.
4. Embedded Software:
o Built for specific hardware with dedicated functionality.
o Examples: Software in washing machines, smart TVs.
5. Utility Software:
o Provides additional functionality for system maintenance.
o Examples: Antivirus, disk cleanup tools.

1. Repository Setup
• git init: Initialize a new Git repository in the current directory.
bash
Copy code
git init
• git clone: Clone an existing repository to your local machine.
bash
Copy code
git clone <repository_url>
2. Checking Repository Status
• git status: Check the status of the working directory (staged, unstaged,
untracked files).
bash
Copy code
git status
• git log: View the commit history.
bash
Copy code
git log
• git dib: See changes between the working directory and the staging area.
bash
Copy code
git diZ

3. Adding and Committing Changes


• git add: Stage files for commit.
o Add specific files:
bash
Copy code
git add file1 file2
o Add all changes:
bash
Copy code
git add .
• git commit: Commit staged changes with a descriptive message.
bash
Copy code
git commit -m "Your commit message"
• git commit --amend: Edit the last commit message or include additional
changes.
bash
Copy code
git commit --amend

4. Working with Branches


• git branch: List branches or create a new branch.
o List branches:
bash
Copy code
git branch
o Create a new branch:
bash
Copy code
git branch new_branch_name
• git checkout: Switch to a diZerent branch.
bash
Copy code
git checkout branch_name
• git switch: A modern alternative to git checkout for switching branches.
bash
Copy code
git switch branch_name
• git merge: Merge a branch into the current branch.
bash
Copy code
git merge branch_name
• git branch -d: Delete a branch locally.
bash
Copy code
git branch -d branch_name

5. Pushing and Pulling Changes


• git push: Push changes to a remote repository.
bash
Copy code
git push origin branch_name
• git pull: Fetch and merge changes from a remote repository into the current
branch.
bash
Copy code
git pull origin branch_name
• git fetch: Download updates from a remote repository without merging.
bash
Copy code
git fetch origin

6. Stashing Changes
• git stash: Save uncommitted changes for later use.
bash
Copy code
git stash
• git stash apply: Reapply the stashed changes.
bash
Copy code
git stash apply
• git stash list: View all stashes.
bash
Copy code
git stash list

7. Undoing Changes
• git checkout -- file: Discard changes in a file (unstaged changes).
bash
Copy code
git checkout -- file_name
• git reset: Unstage changes or move the branch pointer.
o Unstage files:
bash
Copy code
git reset file_name
o Reset branch to a specific commit:
bash
Copy code
git reset --hard commit_hash

8. Tagging
• git tag: Create or list tags for marking specific points in the history.
o Create a tag:
bash
Copy code
git tag tag_name
o Push tags to a remote repository:
bash
Copy code
git push origin tag_name

9. Collaborating
• git remote: Manage remote repositories.
o Add a remote:
bash
Copy code
git remote add origin <repository_url>
o List remotes:
bash
Copy code
git remote -v
• git rebase: Reapply commits on top of another base tip.
bash
Copy code
git rebase branch_name

10. Viewing and Cleaning Files


• git show: View details of a commit.
bash
Copy code
git show commit_hash
• git clean: Remove untracked files from the working directory.
bash
Copy code
git clean -f

11. Resolving Conflicts


• During a Merge Conflict:
o Edit conflicting files manually.
o Stage the resolved files:
bash
Copy code
git add file_name
o Complete the merge:
bash
Copy code
git commit

Quick Reference for Common Workflows


1. Initialize a New Repository:
bash
Copy code
git init
git add .
git commit -m "Initial commit"
git remote add origin <repository_url>
git push -u origin main
2. Clone, Work, and Push:
bash
Copy code
git clone <repository_url>
cd repository_name
# Make changes
git add .
git commit -m "Work description"
git push origin branch_name
3. Pull Latest Changes and Merge:
bash
Copy code
git pull origin main

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy