Tuesday, February 28, 2012

The Von Neumann Architecture | Computer architecture and organisation | CAO

All computers more or less based on the same basic design, the Von Neumann Architecture!

Model for designing and building computers, based on the following three characteristics:
1)The computer consists of four main sub-systems:
Memory
ALU (Arithmetic/Logic Unit)
Control Unit
Input/Output System (I/O)
2)Program is stored in memory during execution.
3)Program instructions are executed sequentially.

Read more at http://en.wikipedia.org/wiki/Von_Neumann_architecture

Thursday, February 23, 2012

Vector class example in JAVA | Explanatory code

The Vector class implements a growable array of objects.The size of a Vector can grow or shrink.
You can insert or delete element from the Vector.
Following is a self explanatory program to explain working of Vectors in JAVA


import java.util.*;
class VectorTest{
public static void main(String[] args){
Vector v1 = new Vector(2,3);//size 2 capacity increment by 3 when overflow
Vector v2=new Vector();//size 10 increment (double when overflow)
Vector v3=new Vector(3);//size 3 and increment double when overflow
System.out.println("Capacities:"+v1.capacity()+" "+ v2.capacity()+" "+ v3.capacity());
System.out.println("Sizes:"+v1.size()+" "+ v2.size()+" "+ v3.size());
int i = 101;
Integer wi = new Integer(230);
String str = "Abhas";
v1.addElement(i);
v1.add(wi);//both addElement and add work
//after adding two elements
System.out.println("1.Capacities:"+v1.capacity()+" "+ v2.capacity()+" "+ v3.capacity());
System.out.println("1.Sizes:"+v1.size()+" "+ v2.size()+" "+ v3.size());
v1.add(str);
//when third element is added
System.out.println("2.Capacities:"+v1.capacity()+" "+ v2.capacity()+" "+ v3.capacity());
System.out.println("2.Sizes:"+v1.size()+" "+ v2.size()+" "+ v3.size());
v1.add(new Integer(1));
v1.add(new Integer(1));
v1.add(new Integer(1));
//after adding 3 more elements
System.out.println("3.Capacities:"+v1.capacity()+" "+ v2.capacity()+" "+ v3.capacity());
System.out.println("3.Sizes:"+v1.size()+" "+ v2.size()+" "+ v3.size());
v3.add(new Float(1.3f));v3.add(new Float(1.3f));v3.add(new Float(1.3f));
//after adding 3 elements in v3
System.out.println("4.Capacities:"+v1.capacity()+" "+ v2.capacity()+" "+ v3.capacity());
System.out.println("4.Sizes:"+v1.size()+" "+ v2.size()+" "+ v3.size());
v3.add(new Float(1.3f));
//after adding one more element in v3
System.out.println("5.Capacities:"+v1.capacity()+" "+ v2.capacity()+" "+ v3.capacity());//capacity of v3 doubles (becomes 6)
System.out.println("5.Sizes:"+v1.size()+" "+ v2.size()+" "+ v3.size());//size of v3 4
v3.add(new Float(1.3f));v3.add(new Float(1.3f));v3.add(new Float(1.3f));
//now size of v3 becomes 7
//so capaity doubles again
System.out.println("6.Capacities:"+v1.capacity()+" "+ v2.capacity()+" "+ v3.capacity());//capacity of v3 doubles (becomes 12)
System.out.println("6.Sizes:"+v1.size()+" "+ v2.size()+" "+ v3.size());//size of v3 7
v2.add(new Integer(1));v2.add(new Integer(1));v2.add(new Integer(1));v2.add(new Integer(1));v2.add(new Integer(1));
v2.add(new Integer(1));v2.add(new Integer(1));v2.add(new Integer(1));v2.add(new Integer(1));v2.add(new Integer(1));
v2.add(new Integer(1));
//after adding 11 elements in v2
System.out.println("7.Capacities:"+v1.capacity()+" "+ v2.capacity()+" "+ v3.capacity());//capacity of v3 doubles
System.out.println("7.Sizes:"+v1.size()+" "+ v2.size()+" "+ v3.size());
System.out.println("Manupulating vector v1");
System.out.println("The elements of vector: " + v1);
System.out.println("The elements at position 3 is: " + v1.elementAt(3));
System.out.println("The first element of vector is: " + v1.firstElement());
System.out.println("The last element of vector is: " + v1.lastElement());
v1.removeElementAt(2);
Enumeration e=v1.elements();
System.out.println("The elements of vector: " + v1);
while(e.hasMoreElements()){
System.out.println("The elements are: " + e.nextElement());
}
}
}

Output:
Capacities:2 10 3
Sizes:0 0 0
1.Capacities:2 10 3
1.Sizes:2 0 0
2.Capacities:5 10 3
2.Sizes:3 0 0
3.Capacities:8 10 3
3.Sizes:6 0 0
4.Capacities:8 10 3
4.Sizes:6 0 3
5.Capacities:8 10 6
5.Sizes:6 0 4
6.Capacities:8 10 12
6.Sizes:6 0 7
7.Capacities:8 20 12
7.Sizes:6 11 7
Manupulating vector v1
The elements of vector: [101, 230, Abhas, 1, 1, 1]
The elements at position 3 is: 1
The first element of vector is: 101
The last element of vector is: 1
The elements of vector: [101, 230, 1, 1, 1]
The elements are: 101
The elements are: 230
The elements are: 1
The elements are: 1
The elements are: 1

Why do we make main function static in JAVA ?

main is the first function to be executed when execution of program starts. In JAVA everything that exists is part of object. main function is declared static so that it can act as class method and can be called without creation of any object. As there are no object when execution has just started so it is required to make it static.

It is convention to make main method public so that it can be assessed from anywhere (Outside class).

Arguments passed in main is String args[] which is actually command line argument and can be passed from command prompt when you run your program using syntax java ProgName ListOfArguments

Saturday, February 18, 2012

Michael R Baye: Managerial Economics and Business strategy, Mcgraw Hill International Edition, 2006 | free download

Corporate Economics reference books

1. David Besako, David Dranove, Mark Shanley, Scott Schaefer, Economics Strategy, John Wiley and Sons, 2007.

2. Craig Petersen, Cris Lewis, Managerial Economics, Prentice Hall of India, 2009

3. I.M. Pandey, Financial Management, Tata McGraw Hill, 2009.

Thursday, February 16, 2012

JAVA engineering books | free download

Books For JAVA


1. The Java Programming Language 3e, Ken Arnold, James Gosling, David Holmes, A-W
2. Core Java Vol I – Fundamental, CS. Horstmann, G. Cornell, Sun
3. Beginning Java 2/5, Ivor Horton, Wrox

1. Java The Complete Reference 4e, P. Naughton, H. Schildt, Tata McGraw-Hill
2. http://java.sun.com/docs/books/tutorial
3. Java How to Program, Deitel & Deitel, PH-India
4. Professional Java, Richarson, et al, Wrox
5. Core Swing Advanced Programming, Kim Topley, Pearson

Data Structure books | free download

Data structures books and notes


1. WILLIAM STALLINGS, "Cryptography and Network Security – Principles and
Practice", 4/E, Pearson Education, 2000
2 . B. A. Forouzan, Cryptography and Network Security, McGraw Hill, 1st Ed.
3. Johannes A Buchmann, “Introduction to cryptography,” 2/E,Spiringer–verlag,
2004
4. C. P. Fleeger and S. L. Fleeger, Security in Computing, 3/E, Pearson
Education, 2003.
5. Mano W., Modern Cryptography: Theory & Practice, Pearson Education, 2004

1. Sartaj Sahni, Data structures, Algorithms and Applications in Java, McG-Hill
2. Robert Sedgewick, Algorithms in C++, Third edition, Addison Wesley
3. John R.Hubbard, Schaum’s Outline of Theory and Problems of Data Structure with
C++, McGraw-Hill, New Delhi, 2000

B. Tech. IT / CS Books | Free download

1. Tay Vaughan “Multimedia, Making IT Work” Osborne McGraw Hill.
2. Buford “Multimedia Systems” Addison Wesley.
3. Agrawal & Tiwari “Multimedia Systems” Excel.
4. David Hillman “Multimedia technology and Applications” Galgotia Publications.
5. Rosch “Multimedia Bible” Sams Publishing.
6. Sleinreitz “Multimedia System” Addison Wesley.
________________________________________________
1. Mark Burgess, "Principles of Network and System Administration", John Wiley &
Sons, 2004
2. Mani Subramanian, “Network Management – Principles & Practice”, Pearson
Education, 2003.
3. Behrouz A Forouzan, Data Communications and Networking, Tata Mc-grawhill,
2007.
4. J.Walrand and P.Varaiya, High Performance Communication Networks, Harcourt
Asia (Morgan Kaufmann), 2000.
5. J.F.Kurose and K.W.Ross, Computer Networking: A Top-Down Approach Featuring
the Internet, Pearson Education, 2001.
________________________________________________

1. Ben Schneiderman, “Designing the User Interface ", Addison Wesley, 2000.
2. Jacob Nielsen, “Usability Engineering ", Academic Press, 1993.
3. Alan Dix et al, “Human - Computer Interaction ", Prentice Hall, 1993.
4. Alan Cooper, “The Essentials of User Interface Design ", IDG Books, 1995.
________________________________________________

1. “Wireless Communication and Networks” by William Stallings, 1st edition.
2. “Wireless and Mobile Network Architectures” by Yi-Bing Lin and Imrich Chlamtac
3. Principles of mobile computing Hansmann & Merk., Springer.
4. Mobile Communications Handbook by Jerry D. Gybson.
5. Mobile Communications Handbook by Raymond Steel.
________________________________________________
1. WILLIAM STALLINGS, "Cryptography and Network Security – Principles and
Practice", 4/E, Pearson Education, 2000
2 . B. A. Forouzan, Cryptography and Network Security, McGraw Hill, 1st Ed.
3. Johannes A Buchmann, “Introduction to cryptography,” 2/E,Spiringer–verlag,
2004
4. C. P. Fleeger and S. L. Fleeger, Security in Computing, 3/E, Pearson
Education, 2003.
5. Mano W., Modern Cryptography: Theory & Practice, Pearson Education, 2004
________________________________________________