Friday, February 26, 2016

Waterfall Model and Software Process

HI Techs! Here we are going to discuss Software development process in Information Technology.This is the post to get knowledge how to develop
software development process in IT industry and what type of models used while developing software in IT industry, what type of problems they might have meet while developing software projects. I have posted already SDLC. You can visit this link and aware of the steps how to develop software development life cycle.

Software engineering is defined as the systematic approach to the development, operation, maintenance, and retirement of software.the systematic approach must help achieve a high quality and productivity (Q&P).

Process and Project:

A Process is a sequence of Steps performed for a given purpose. While developing  software, the purpose is to develop software to satisfy the needs of some users or clients.

  A software project is one instance of this problem,and the development process is what is used to achieve this purpose.




A process model is essentially a compilation of best practices into a ―recipe‖ for success in the project.A process is often specified at a high level as a sequence of stages. The sequence of steps for a stage is the process for that stage, and is often referred to as a subprocess of the process.

Component Software Process:

As we defined above, A process is Sequence of steps executed to achieve a goal. While developing software multiple process are needed. Many of these do not concern software engineering, though they do impact software development.
These could be considered non software process. Business processes, social processes, and training processes are all examples of processes that come under this.

Software Process:

The processes that deals with  the technical and management issues of Software development are collectively called the software process.

There are two major components in a software process.

a) Development process
b) Project management process

Development Process

The Development process specifies all the engineering activities that need to be performed.

Project Management process

The management process specifies how to plan and control the activities so that cost, schedule, quality, and other objectives are met.

Software Configuration Management Process
During the project many products are produced which are typically com-posed of many items (for example, the final source code may be composed of many source files). These items keep evolving as the project proceeds, creating many versions on the way. As development processes generally do not focus on evolution and changes, to handle them another process called software configuration control process is often used. The objective of this component process is to primarily deal with managing change, so that the integrity of the products is not violated despite changes.

Process Management Process


The basic objective of the process management process is to improve the software process. By improvement, we mean that the capability of the process to produce quality goods at low cost is improved.


software process

Software Development process Model
For the software development process, the goal is to produce a high-quality software product.It therefore focuses on activities directly related to production of the software, for example, design, coding, and testing. As the development process specifies the major development and quality control activities that need to be performed in the project, it forms the core of the software process. The management process is often decided based on the development process.

A project’s development process defines the tasks the project should per-form, and the order in which they should be done.Due to the importance of the development process, various models have been proposed. In this Post we will discuss Waterfall model.

waterfall Model
The simplest process model is the waterfall model, which states that the phases are organized in a linear order. The model was originally proposed by Royce.

In this model, a project begins with feasibility analysis. Upon successfully demonstrating the feasibility of a project, the requirements analysis and project planning begins. The design starts after the requirements analysis is complete, and coding begins after the design is complete. Once the programming is completed, the code is integrated and testing is done. Upon successful completion of testing, the system is in-stalled. After this, the regular operation and maintenance of the system takes place.



By doing this, the large and complex task of building the software is broken into smaller tasks (which, by themselves, are still quite complex) of specifying requirements, doing design, etc. Separating the concerns and focusing on a select few in a phase gives a better handle to the engineers and managers in dealing with the complexity of the problem.
The requirements analysis.

The requirements analysis phase is mentioned as "analysis and planning". Planning is a critical activity in software development. A good plan is based on the requirements of the system and should be done before later phases begin. However, in practice, detailed requirements are not necessary for planning. Consequently, planning usually overlaps with the requirements analysis, and a plan is ready before the later phases begin. This plan is an additional input to all the later phases.

The following documents generally form a reasonable set that should be produced in each project:
– Requirements document
– Project plan
– Design documents (architecture, system, detailed)
– Test plan and test reports
– Final code
– Software manuals (e.g., user, installation, etc.)

Advantages
One of the main advantages of the waterfall model is its simplicity. It is conceptually straightforward and divides the large task of building a software system into a series of cleanly divided phases, each phase dealing with a separate logical concern.

Limitations


The waterfall model, although widely used, has some strong limitations. Some of the key limitations are:

1. It assumes that the requirements of a system can be frozen (i.e., baselined) before the design begins. This is possible for systems designed to automate an existing manual system. But for new systems, determining the require-ments is difficult as the user does not even know the requirements. Hence, having unchanging requirements is unrealistic for such projects.

2. Freezing the requirements usually requires choosing the hardware .A large project might take a few years to complete. If the hardware is selected early, then due to the speed at which hardware technology is changing, it is likely that the final software will use a hardware technology on the verge of becoming obsolete.

3. It encourages ―requirements bloating‖. Since all requirements must be specified at the start and only what is specified will be delivered.

4. It is a document-driven process that requires formal documents at the end of each phase.






Saturday, February 20, 2016

File IO in java with Examples

In this Post we will discuss Java IO(input/output) API that comes with Java. That means which is reading and writing data(Input and Output).Generally,to readdata from a file or over network and write to a file or write a response back over the network.These Input and output are located in the package java.io.


The following is the list methods going to cover in File I/O Concept.

1) File
2 )FileWriter
3) FileReader
4) BufferedWriter
5 )BufferedReader
6) printWriter


File

A java file object represent just name of the file/directory.

File f = new File(“abc.txt”);
If ‘abc.txt’ is already available then ‘f’ will represent that physical file.
If it is not already available, It won’t create any new file and ‘f’ simply represents the name of the file.

Ex:

import java.io.*;
class test
{
public static void main(String[] args)
{
File f = new File("cba.txt");
System.out.println(f.exists()); // false at first time.
f.createNewFile();
System.out.println(f.exists()); //true
}
}

I Run:

false
true

II Run:
true

true

A java file Object can represent directories also

Ex:

File f = new File("bbc");
System.out.println(f.exists());
f.mkdir();
System.out.println(f.exists());

I Run:
false
true

II Run:
true

true

The constructors of the file class

1) File f = new File(String name)
Here name may be file or directory name.
Creates a java file object that represents a file or directory name.

2) File f = new File(String subdirec, String name)
Creates a java file object that represents file or directory name present in specified
subdirectory.

3) File f = new File(File subdir, String name)

Important methods of File Class

1) boolean exists():
returns true if the physical file/directory presents other wise false.

2) boolean createNewFile():
returns ture if it creates a new file, if the required file is already available then
it won’t create any new file and returns false.

3) booelan mkdir()
For creation of directory.

4) boolean isFile():
returns true if the java file object represents a file.

5) boolean isDirectory():
returns true if the java file object represents a directory.

6) String [] list():
returns the names of files and directories present in the directories represented
by the file object.
If the java file object represents a file instead of directory this method returns
null.


7) Boolean delete():

for deleting the file or directory represented by java file object.

Write a program to create a directory ‘lucky87’ in the current working directory and create a file ‘file1.txt’ in that directory.

File f = new File(“lucky87”);
f.mkdir();
// File f1 = new File(“lucky87”,”file1.txt”);
File f1 = new File(f,”file1.txt”);
F1.createNewFile();

Write a program to list the names of files and directories in ‘jdk’ directory.

File f = new File(“jdk”);
String [] s = f.list();
for(String s1: s)
{
System.out.println(s1);

}

FileWriter:

This class can be used for writing character data to the file.

Constructors

1) FileWriter fw = new FileWriter(String fname)
2) FileWriter fw = new FileWriter(File f);

The above 2 constructors creates a file object to write character data to the file.
If the file already contains some data it will overwrite with the new data.
Instead of overriding if u have to perform append then we have to use the following constructors.

FileWriter fw = new FileWriter(String name, boolean append);
FileWriter fw = new FileWriter(File f, boolean append);

If the underlying physical file is not already available then the above constructors will create the required file also.

Important methods of FileWriter Class

1) void write(int ch) throws IOException
for writing single character to the file.
2) void write(String s)throws IOException.
3) void write(char [] ch) throws IOException.
4) void flush():-To guaranteed that the last character of the data should be required to the file.

Ex:-

class test
{
public static void main(String arg[])throws Exception
{
File f = new File("pongal.txt");
System.out.println(f.exists());
FileWriter fw = new FileWriter(f,true);
System.out.println(f.exists());
fw.write(97);
fw.write("run\nsoftware\n");
char [] ch1 = {'a','b','c'};
fw.write(ch1);
fw.flush();
fw.close();
}
}

FileReader

This class can be used for reading character data from the file.
Constructors

1) FileReader fr = new FileReader(String name);
2) FileReader fr = new FileReader(File f);

Important methods of FileReader Class

1) int read():
for reading next character from the file. If there is no next character this method
returns -1

2) int read(char[] ch):
to read data from the file into char array.

3) void close():
to close FileReader

Ex:

class test
{
public static void main(String arg[])throws Exception
{
File f = new File("pongal.txt");
FileReader fr = new FileReader(f);
System.out.println(fr.read());
char [] ch2 = new char[(int) (f.length())];
System.out.println(ch2.length);
fr.read(ch2);
for(char ch1: ch2)
{
System.out.print(ch1);
}
}
}

The usage of FileReader and FileWriter is in efficient because
---> While writing the data by using FileWriter, program is responsible to insert line separators manually.
----> We can read the data character by character only by using FileReader. If increases the number of I/O
operations and effect performance.
To overcome these problems sun people has introduced BufferedReader and BufferedWriter classes.





BufferedWriter

This can be used for writing character data to the file.
Constructors

1) BufferedWriter bw = new BufferedWriter(writer w)
2) BufferedWriter bw = new BufferedWriter(writer r, int size)

BufferedWriter never communicates directly with the file. It should Communicate through some writer object only.

Q) Which of the following are valid declarations

1) BufferedWriter bw = new BufferedWriter(“abc.txt”); X
2) BufferedWriter bw = new BufferedWriter(new File(“abc.txt”)); X
3) BufferedWriter bw = new BufferedWriter(new FileWriter(“abc.txt”));
4) BufferedWriter bw = new BufferedWriter(new BufferedWriter(new
FileWriter(“abc.txt”)));


Important methods of BufferedWriter Class

1) void write(int ch) thorows IOException
2) void write(String s) throws IOException
3) void write(char[] ch) throws IOException
4) void newLine()
for inserting a new line character.
5) void flush()
6) void close()

Which method is available in BufferedWriter and not available in FileWriter

Ans: newLine() method


Ex:-

class test
{
public static void main(String arg[])throws Exception
{
File f = new File("pongal.txt");
System.out.println(f.exists());
FileWriter fw = new FileWriter(f);
BufferedWriter bw = new BufferedWriter(fw);
bw.write(97);
bw.newLine();
char [] ch1 = {'a','b','c','d'};
bw.write(ch1);
bw.newLine();
bw.write("raju");
bw.newLine();
bw.write("software");
bw.flush();
bw.close();
}
}

Note:- 
When ever we r closing BufferedWriter ,automatically underlying FileWriter object will be closed.

BufferedReader

By using this class we can read character data from the file.
Constructors

1) BufferedReader br = new BufferedReader(Reader r)
2) BufferedReader br = new BufferedReader(Reader r, int buffersize)

BufferedReader never communicates directly with the file. It should Communicate through some reader object only.

Important methods of BufferedReader Class

BufferedWriter
FileWriter

1) int read()
2) int read(char [] ch)
3) String readLine();

Reads the next line present in the file. If there is no nextline this method returns null.

4) void close()

Ex:

class test
{
public static void main(String arg[])throws Exception
{
FileReader fr = new FileReader("pongal.txt");
BufferedReader br = new BufferedReader(fr);
String s = br.readLine();
while(s != null)
{
System.out.println(s);
s = br.readLine();
}
br.close();
}
}

Note:-
When ever we r closing BufferedReader ,automatically underlying FileReader object will be closed.

PrintWriter

The most enhanced writer for writing character data to the file is PrintWriter()
Constructors

1) PrintWriter pw = new PrintWriter(String fname)
2) PrintWriter pw = new PrintWriter(File f);
3) PrintWriter pw = new PrintWriter(Writer w);

Important methods

1) write(int ch)
2) write(char [] ch)
3) write(String s)
4) print(int i)
print(double d)
print(char ch)
print(Boolean b)
print(char ch[])
5) void flush()
6) close()

Ex:

class test
{
public static void main(String arg[])throws Exception
{
FileWriter fw = new FileWriter("pongal.txt");
PrintWriter out = new PrintWriter(fw);
out.write(97);
out.println(100);
out.println(true);
out.println('c');
out.println("FDGH");
out.flush();
out.close();
}
}

I hope you enjoy this post and share this to your friends and also in social websites,keep follow me for latest updates.

Thursday, February 18, 2016

HR INTERVIEW QUESTIONS FOR OFF CAMPUS

In This Post we will discuss HR Interview Questions for freshers purely(off campus). Frequently asks in off campus hr interview questions before attending interview brush up these questions to clear your HR Round easily. Earlier i posted HR interview
questions for Experienced candidates.


1) Tell me about Yourself?

Ans:  This question is frequently asked in any interview and this is first question which you face in interview.You can tell answer to this question briefly like this. Good Morning sir,This is XXXX pursuing final year Btech from XXXX Engineering College. I am a person with a lot of enthusiasm to learn new things. I have maintained consistency in academic since my schooling and i used to be in the top of the batch. I continued this performance even in Graduation. I am in the top 10 in the class. I like to participate in talent events,as such i participated in district science fair and i bagged second prize, then i understood importance of practical in our life. At the same time i learned tech information such as programming languages,resolving computer software problems,virus coding,hacking many tips.Finally you should say thank you giving this opportunity sir.


2) What are your hobby?

Ans: My hobbies are solving puzzles specially sudoku,computer gaming,surfing the internet,drawing and i read books in my sparing time.







3) Tell me about Your college days?

Ans:  I did my XXXX in PG College from Hyderabad, i was one of the toppers in my college and regular to college. I represented my class for 3 years, i also involved in co-curricular activities,charity events,youth festivals,job fairs and educational fairs. I was good sports and cultural activities. I participated many in  competitions in district level and won prizes.lots of fun,silly fights,cracking jokes and at the same time seriousness on exams as well. we had a farewell party at the end of the college days and i feel most happiest cum saddest moment of my college days.I can tell i have experienced  some of the my highest highs and lowest lows in my college.From college i taught life lessons i could never read in a book or learn elsewhere. Thank you for giving me this opportunity to remind my college days.

4) who is your role model?

Ans: You can tell your role model as your choice...but my role model is my dad because i did not see up to now who worked so hard and still having time for his family.He always assist me like a friend, he used to share his experience and mistakes he did in his life so that we will not repeat them.Even though he had many problem he keeps his face smiley and never showed his odd behavior to our family. He put his whole life in working and never made us to look down.So, my dad is the world best father.

5) Why did you apply for this job?

Ans:  This is very important question. The interview want to know how much you have interest to apply this job. Do not say placement officer forced to sit in the selection process, and big wrong answer are include good salary,big company in Asia etc.. 

                      In my opinion the best answer is i checked the job  description and found that requirements are matching with what i studied at college , so i felt i will be fit for the job will be able to start working on company projects with confidence.

6) Why do you want at our Company?

Ans: I am a fresher, i want to start my career in reputed company like your company and i will prove myself by the help of your company. I have visit your company website and seen the best servicing and products providing in Asia.

7) What is your favorite color? Why?

Ans: This question used to ask to test your communication skills and how to able explore on topic.
My favorite color is BLUE, I am confident in my choice of color blue.Because blue is calm and smooth color.Blue color represents nurturing a person that others look for spiritual or mental healing. A natural color from the blue of the sky. Blue is often sign of intelligence. Darker blue symbolize authority and higher  power. Hence the blue power suit of the corporate world and blue uniforms of the police officers.

8) "Take over" means?

Ans: Take over means acquisition of business of small or failed by big or successful company to expand its business in way of finance,share capital,security or combination of either friendly or unfriendly.

Tuesday, February 16, 2016

SQL Functions with examples

In this post we will learn about Introduction of SQL and What are the functions available in SQl with example.Earlier,i have written a post about How joins used in SQL with examples
 go through this following link Joins in Sql with example. Here we will discuss about
built-in Functions in SQL.

SQL has provides many built-in functions to operations on data.All these built-in functions are useful while performing mathematical  calculations,String concatenations etc..

These functions are divided into two types. They are

1)Aggregate functions
2)Scalar functions


1) Aggregate Functions:

These functions are perform on set of values and returns single value, Except for COUNT
aggregate functions ignore null values.These functions are frequently used with Group by clause of the SELECT statement.

Most useful Aggregate functions has given below:

avg():

This function returns a average values.

Syntax:

Select avg(column name)from table_name;

Ex:

Consider the following is EMP table:

emp_id      name age                salary
   
  100      mahi          34                     9000
  101       laks           45                       9000
  102      pavn          22                     7000
  104      sree           45                     10000
  105      raju           29                       8000


Ex:

Select avg(salary) from emp;

Result:

8200


Count():

This functions returns no of rows present in the table.

Syntax:

Select count(column_name)from table_name;

Ex:

Consider above emp table and write query for Count function like below

Select count(salary)from emp;

Result:

5 (since in emp table there are 5 rows present)


First()

This functions returns the first value of selected column

Syntax:

Select first(column_name) from table_name;


Ex:

Select first(salary)from emp;

Result:

9000


Last()

This function returns the last value of the select column

Syntax:

Select last(column_name)from table_name;

Ex:

Select last(salary)from emp;

Result:

8000

max()

This functions returns the maximum value of the select column of the table.That means largest value.

Syntax:

Select max(Column_name)from table_name;

Ex:

select max(salary)from emp;

Result:

10000

min()

This functions returns the minimum value of the select column of the table.That means lowest value.

Syntax:

Select min(column_name)from table_name;

Ex:

Select min(salary)from emp;

Result:

7000

Sum()

This function returns total sum of select columns

Syntax:

select sum(column_name)from table_name;

Ex:

select sum(salary)from emp;

Result:

43000


2) Scalar Functions:

These functions returns a single value based on input values. I will provide frequently use scalar functions here.

UCASE():

This is used to covert a value of string column to upper case.

Syntax:

select UCASE(column_name)from table_name;

Ex:

select UCASE(name)from emp;


Result:

MAHI
LAKS
PAVAN
SREE
RAJU







LCASE()

This functions is used to convert filed into lower case character


Syntax:

select LCASE(column_name)from table_name;

Ex:

Select LCASE(name)from emp;

Result:

mahi
laks
pavan
sree
raju

len()

This function return the length of the text filed

Syntax:

Select len(column_name)from table_name;

Ex:

Select len(name) from emp;

MID()

This function is used to extract from substrings from column values of string type in table

Syntax:

Select mid(column_name,start,length)from emp_table;

Ex:

select mid(name,3,3) from emp;

Result:

hi
ks
va
ee
ju


ROUND()

This function is used to round of numeric value of nearest integer.  

Syntax:

select round(coulumn_name,decimals)from table_name;

Ex:

select round(salary)from emp;

Result:

suppose salary 9000.67 then the result will display 9001 , Likewise remain salary also will display.


Real also this post: 
Best SQL QUERIES Interview Questions with answers
TOP 20 SQL Query interview Questions
Views in SQL with examples
SQL Subquery with examples










High Paying Jobs after Learning Python

Everyone knows Python is one of the most demand Programming Language. It is a computer programming language to build web applications and sc...