Monday, March 11, 2024

Spiral model in Software Engineering

 áš˘piral model-:

Process is represented as a spiral rather than as a sequence of activities with backtracking.

Each loop in the spiral represents a phase in the process.

No fixed phases such as specification or design -loop in the spiral are chosen depending on what is required.
 Risks are explicitly assessed and resolved throughout the process.



  •  risk driven process model
  •  used for generating software projects
  •  alternate solution is provided if any risk found in the risk analysis then alternate solutions are suggested and implemented
  • combination of proto type and sequential model or waterfall model
  •  one iteration all activities are done for large projects the output is small.
>>>>>>> 
  1. Planning
  1. Modelling
  1. Construction
  1. Deployment
  1. Communication
 
Advantages
  • Reduce high amount of risk
  • Good for large and critical projects
  • Strong  approval and documentation control
  • The software is produced early in the life cycle
 
 
 

Tuesday, February 27, 2024

Java Constructor

what is constructor?


A constructor is special method used to initialize objects.
  • The constructor is called when an object of a class created.
  • constructor is name must match the class name.
  • it cannot have a return type(like void).
  • constructors can not inherited by subclass, but the constructor of the superclass can be invoked from the subclass. 
  • All classes have constructors by default: if you do not create a class constructor yourself, Java creates one for you. 
  • Constructors are called only once at the time of Object creation while method(s) can be called any number of times. 
  • Constructor in Java can not be abstract, final, static, or Synchronized.

Types of constructors in Java 
Default constructor 
Parameterised Constructor 
Copy constructor


 ➤Default constructor 

  • A constructor that has no parameters is known as default the constructor. 
  • if we create a default constructor with no arguments, the compiler does not create a default constructor


➤Parameterised constructor 

  • A constructor that has parameters is known as parameterized constructor. 

 1) Example of parameterised constructor 
 public class A
 {
 int x; 
 public A(int y)
 {
 x = y;
 }
 public static void main(String[] args) 
A obj = new A(5);
 System.out.println(obj.x);
 }
 } 

 2)Example of parameterised constructor (using "this" keyword)
 public class A 
 int x; 
 public A(int x) 
{ this.x=x; 
 }
 //constructor 
 public static void main(String[] args) 
{
 A obj = new A(5);
 System.out.println(obj.x);
 }
 }

 ➤Copy constructor 

  •  Like C++, Java also supports a copy constructor. But, unlike C++, Java doesn’t create a default copy constructor if you don’t write your own.

NOTE : 

  •  If constructors are inherited (class is inheriting other classes) then always first parent class's constructors invoke first one by one then child classes. 
  • Java does not call a parameterized constructor implicitly, you need to explicitly invoke parameterised constructor.
  • In Java, when you create an object of a child class, the default constructor of the parent class is implicitly called. If the parent class has a parameterized constructor and no default constructor is explicitly defined, you need to ensure that the child class constructor explicitly calls the appropriate parent constructor using the super keyword

Factorial in java

import java.util.*;

public class fact

{

public static void main (String [] args) {

System.out.println("Enter the no:" ) ;

Scanner s=new Scanner(System.in);

int a=s.nextInt();

int fact =1;

for(int i=0; i<=a; i++) 

fact = fact*i;

}

System.out.println("factorial of" +a+ "number is"  +fact) ;

}



output - Enter the no.

5

factorial of 5 number is 120

What is software testing??

 



Software testing is a process of identifying the correctness of software by considering its all attributes (Reliability, Scalability, Portability, Re-usability, Usability) and evaluating the execution of software components to find the software bugs or errors or defects.



-------Types of testing-------((

:( Manual testing

In manual testing there are some types 

White box testing

Black box testing

Gray box testing

Sunday, February 4, 2024

Differentiate between the top down and the bottom up approach in designing software

 

S.No.

Top-Down Approach

Bottom-Up Approach

1.

In this approach, the problem is broken down into smaller parts.

In this approach, the smaller problems are solved.

2.

It is generally used by structured programming languages such as C, COBOL, FORTRAN, etc.

It is generally used with object oriented programming paradigm such as C++, Java, Python, etc.

3.

It is generally used with documentation of module and debugging code.

It is generally used in testing modules.

4.

It does not require communication between modules.

It requires relatively more communication between modules.

5.

It contains redundant information.

It does not contain redundant information.

6.

Decomposition approach is used here.

Composition approach is used here.

7.

The implementation depends on the programming language and platform.

Data encapsulation and data hiding is implemented in this approach.

Saturday, February 3, 2024

what is prototype

 A prototype is an early sample, model or release of a product built to test a concept of process. It can be used in for variety of context, including semantics design electronics and software programming.

A Prototype can serve as a model or inspiration for those that come later. It can also mean an original model on which something is patterned, a standard or typical example, or a full-scale and usually functional form of a new type or design of a Constuction.

For example, a software developer might create a prototype of a new application to test its functionality and user interface before building the final version. Similarly, a car manufacturer might create a prototype of a new vehicle to test its design and performance before beginning mass production.;


waterfall models

 

waterfall model phases


The main drawback of the waterfall model is the difficulty of accommodating change after the process is underway. One phase has to be complete before moving onto the next  phase. 
 
 problems

Inflexible partitioning of the project into distinct stages makes it difficult to respond to changing customer requirements.

Therefore, this model is only appropriate when the requirements are well-understood and changes will be fairly limited during the design process.
The waterfall model is mostly used for large systems engineering projects where a system is developed at several sites.

✅ UNIT 4 — POSET, LATTICES & BOOLEAN ALGEBRA (DISCRETE MATHEMATICS)

  ✅ UNIT 4 — POSET, LATTICES & BOOLEAN ALGEBRA 1. Poset Partially Ordered Set A pair (A, ≤) where relation is: Reflexive Anti-...