Skip to main content

Posts

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 construc...

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

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.

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 Requirements analysis and definition  System and Software design Implementation and unit testing Integration and system testing  Operation and maintenance 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. Few business systems have stable requirements. The waterfall model is mostly used for large systems engineering projects where a system is developed at several sites.

Question and answer of Software Engineering

Q.1-   Explain various component of Software. Ans-   System Software : Operating System (OS) : The fundamental program that manages computer resources (memory, CPU, storage, etc.) and provides an interface for users to interact with the system. Exampels include linux, macOS and windows. Language processor: converts high-level programming languages(like Java, C++, python) into machine-readable instructions (object code or machine code). Device Driver : Controls externals devices(printers, mice, modems) and enables them to function with the computer system. Application Software : General Purpose Software; Versatile programs used for various task(eg- web browsers, office suites, media players). Customized Software : Tailored solutions for specific business needs or industries. Utiltiy Software: Tools that enhance system performance, security, or maintanance (eg: antivirus, disk cleanup). Software Components Modules : Specific functions or sets of functions (e.g., a...