Monday, March 11, 2024
Spiral model in Software Engineering
ᚢpiral model-:
Tuesday, February 27, 2024
Java Constructor
what is constructor?
- 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.
➤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
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
Sunday, February 4, 2024
Differentiate between the top down and the bottom up approach in designing software
S.No. | ||
|---|---|---|
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
✅ 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-...
-
1. Raster Scan Display How It Works : A raster scan display works by painting an image on the screen pixel by pixel, row by row. It follow...
-
*■ Inheritance * • Inheritance is a concept in OOP that allows a class to inherit properties and behaviors (methods) from another class. •...
-
What is Image Processing? Image processing is a method to perform operations on an image to enhance it or extract useful information. It ...