Monday, 11 December 2017

ADVANCED JAVA AND J2EE
FAQ

MODULE - 1

1. Define an Enumeration?Explain with a program how to define and access an enumeration?
2. Explain the following methods with an example
     1. values() 2. valueOf() 3. ordinal() 4. compareTo() 5. equals()
3. Construct and explain with an example how an enumeration will be used in
constructors, instance variables and methods?
4. Define type Wrapper? Explain the different types of type Wrappers?
5. Design and demonstrate with an example how autoboxing and auto unboxing will be used in java?
6. Explain how to declare and define an annotation with an example?
7. Explain the different types of retention policies in annotation? 
8. Define and construct Reflection with an example?
9. Write a java program to obtain all annotations using reflection?
10.Demonstrate the use of Default values in reflection using java program?
11. Explain the marker annotations with an example? 
12. Explain marker annotations, Single member annotation and built in annotations with an example.

MODULE -2
 1.List and explain collection interfaces 
2.Design a program using ArrayList<string> which has following elements (A, C, D, E, B,F) and display the content using Iterator, List Iterator and for each loop.
3.write a java program to obtain an array from an arraylist?
4. Explain the following collection classes with a simple program?
 1) LinkedList 2) HashSet 3) LinkedHashSet 4)TreeSet 5)PriorityQueue 6)ArrayDeque
5.Explain storing userdefined classes in collections.
6.Describe HashMap class. Write a program to enter the following pair of elements into a Hashmap<string,double>
NAME SALARY
John 345.26
Nike 4458.9
Todd 7523.23
Jerry 2658.3
Display the contents and then modify To add salary to 6700 using get() and put() function.
7.Explain the following Map classes with simple program
   1) TreeMap 2) LinkedHashMap 3) IdentityHashMap 4)EnumMap 
8. What is Comparator? Write a program to reverse the order of TreeSet<string> using Comparator( use [q,w,e,r,t,y] as elements to TreeSet).
9.Write a brief note on legacy classes and interfaces.(list all classes and briefly illustrate)

MODULE -3

1. Explain String Constructors with an example.(list and brief each constructor) 
2. Explain String Conversion and toString() with an example.
3. Design a program to override toString() (which displays an object using SOP, append to string and display string)
4. Explain the following string methods with a program
  1. charAt() 2. getChars() 3. getBytes() 4. toCharArray() 5. equals() and equalsIgnoreCase() 
  6. regionMatches() 7. startsWith() and endsWith() 8. equals() versus == 9. compareto() 
5. How do you use the following(illustrate with a code snippet)
a. LastIndexOf(String Str, int StartIndex)
b. equalsIgnoreCase(String str)
c. replace()
d. trim()
e. reverse()
6. Explain the difference between String and StringBuffer. Explain following methods
under StringBuffer 1) delete 2) deleteCharAt 3)replaceFirst 4)split 5)replaceAll 
7. Explain how to change the case of characters within a string with an example.
 
                                                                                                              MODULE -4
1. Explain the life cycle of servlets.
2. List and explain core classes and interfaces in javax.servlet package.
3. Write a short note on handling HTTP Requests and Responses.
4. What is a Cookie? List out the methods defined by Cookie. Write a java program to add
Cookie.
5. Define JSP. Explain different types of JSP tags by taking suitable example.
6. Discuss about Session management and session tracking techniques of java servlets.
7. List and explain classes and interfaces in javax.servlet.http package.

8. Explain how to read servlet parameters with an example.

                                                                                                         MODULE -5

1. Explain the four types of JDBC drivers.
2. Describe the various steps of JDBC with code snippet.
3. Write a program to execute a database transaction.
4. Write a program using savepoints in a transaction.
5. Explain the Statement objects with program.
6. List and explain the ResultSet with program.
7. Explain the database connection.

8. Explain the types of exception occurred in JDBC.



Tuesday, 5 September 2017

PROGRAMMING THE WEB

PROGRAMMING THE WEB MANUAL

XHTML (EXtensible HyperText Markup Language):
Introduction:
XHTML is almost identical to HTML 4.01. XHTML is a stricter and cleaner version of HTML. XHTML is a combination of HTML and XML (EXtensible Markup Language). XHTML consists of all the elements in HTML 4.01 combined with the syntax of XML. XML is a markup language where everything has to be marked up correctly, which results in "well-formed" documents. XML was designed to describe data and HTML was designed to display data. All new browsers have support for XHTML.
The Most Important Differences:
* XHTML elements must be properly nested
* XHTML elements must always be closed
* XHTML elements must be in lowercase
* XHTML documents must have one root element
The basic document structure is:
<html>
<head> ... </head>
<body> ... </body>
</html>
Some More XHTML Syntax Rules:
* Attribute names must be in lowercase
* Attribute values must be quoted
* Attribute minimization is forbidden
* The id attribute replaces the name attribute
Tags: <!--...--> - Defines a comment
<html> - Defines an html document
<head> - Defines information about the document
<title> - Defines the document title
<body> - Defines the body element
<p> - Defines a paragraph
<h1>..<h6> - Defines header 1 to header 6
<font> - Defines text font, size, and color
<a> - Defines an anchor
<b> - Defines bold text
<big> - Defines big text
<br> - Inserts a single line break
<div> - Defines a section in a document
<hr> - Defines a horizontal rule
<i> - Defines italic text
<img> - Defines an image
<ol> - Defines an ordered list
<ul> - Defines an unordered list
<li> - Defines a list item
<span> - Defines a section in a document
<table> - Defines a table
<th> - Defines a table header
<td> - Defines a table cell
<u> - Defines underlined text
<input> - Defines an input field
CSS (Cascading Style Sheets):
Styles define how to display HTML elements
Styles are normally stored in Style Sheets
Styles were added to HTML 4.0 to solve a problem
External Style Sheets can save you a lot of work
External Style Sheets are stored in CSS files as ".css"
Multiple style definitions will cascade into one
XHTML with Javascript:
JavaScript is used in millions of Web pages to improve the design, validate forms, detect browsers, create cookies, and much more. JavaScript is the most popular scripting language on the internet, and works in all major browsers, such as Internet Explorer, Firefox, and Opera. A scripting language is a lightweight programming language. JavaScript is usually embedded directly into HTML pages. JavaScript is an interpreted language (means that scripts execute without preliminary compilation)
JavaScript gives HTML designers a programming tool - HTML authors are normally not programmers, but JavaScript is a scripting language with a very simple syntax! Almost anyone can put small "snippets" of code into their HTML pages
JavaScript can put dynamic text into an HTML page - A JavaScript statement like this : document.write("<h1>" + name + "</h1>") can write a variable text into an HTML page
JavaScript can react to events - A JavaScript can be set to execute when something happens, like when a page has finished loading or when a user clicks on an HTML element
JavaScript can read and write HTML elements - A JavaScript can read and change the content of an HTML element
JavaScript can be used to validate data - A JavaScript can be used to validate form data before it is submitted to a server. This saves the server from extra processing
JavaScript can be used to detect the visitor's browser - A JavaScript can be used to detect the visitor's browser, and - depending on the browser - load another page specifically designed for that browser
JavaScript can be used to create cookies - A JavaScript can be used to store and retrieve information on the visitor's computer.

The programming the web manual is available please click the below link to download.
1.Download Manual in .docx Format

2. Download Manual in .odt Format
 









Friday, 1 September 2017

COMPUTER ORGANIZATION

COMPUTER ORGANIZATION NOTES

Computer Organization material is available. Click the below link to access the material.

1. Click here to download

Thursday, 8 June 2017

MATLAB

MATLAB TUTORIAL


MATLAB (MATrix LABoratory) is a fourth-generation high-level programming language and 
interactive environment for numerical computation, visualization and programming. 
 MATLAB is used in every facet of computational mathematics. Following are some commonly used mathematical calculations where it is used most commonly:
  1. Dealing with Matrices and Arrays
  2.  2-D and 3-D Plotting and graphics
  3.  Linear Algebra
  4. Algebraic Equations
  5. Non-linear Functions
  6. Statistics
  7. Data Analysis
  8. Calculus and Differential Equations
  9. Numerical Calculations
  10.  Integration
  11. Transforms
  12. Curve Fitting
  13. Various other special functions
For detailed descriptions of MATLAB available in the following links.

1. MATLAB DOCUMENT
   Download

2. MATLAB TUTORIAL 
    Download

3. MATLAB
    Download

Monday, 22 May 2017

ARM HARDWARE PROGRAMS

ARM HARDWARE PROGRAMS

LAB PROGRAM 12: 

To interface LCD with ARM Processor-ARM7TDMI/LPC2148. Write and execute program in C language for displaying the text messages and numbers on LCD.

#include <LPC21xx.H>

char disp1[] = "EWIT 2017"; 

void delay()

{

            int i;

  for(i = 0; i < 0x50000; i ++);

 }


/* Function to display the character  */

void Disp_Key(unsigned long c)

{

  unsigned long l;

  l = c << 16;

  IOCLR1 = 0x00FF0000;        /*Instruction IOCLR1 = 0x00FF0000 instructs the CPU to write a Digital LOW logic on pin number 16 to 23 of PORT1. (IOCLR => Input Output Port CLEAR Register). */                                     

  IOSET1 = l;

  IOCLR0 = 0x003F8000;                                                        /* E      R/W* RS */                 

  IOSET0 = 0xfa << 15;                                                           /* 0      1          0  */

  IOCLR0 = 0x003F8000;

  IOSET0 = 0xf9 << 15;                                                           /* 0    0    1  */

  IOCLR0 = 0x003F8000;

  IOSET0 = 0xfd << 15;                                                           /* 1      0          1  */

  IOCLR0 = 0x003F8000;

  IOSET0 = 0xf9 << 15;                                                           /* 0    0    1  */

  IOCLR0 = 0x003F8000;

  delay();

}  


/* Function to issue the series of commands to the LCD module */

void Command_Write(unsigned long com_word)

{ 

  IOCLR1 = 0x00FF0000;

  IOSET1 = com_word;                                                            /* Send commands to the LCD through GPIO1 */

  IOCLR0 = 0x003F8000;                                                        /* E      R/W* RS */

  IOSET0 = 0xfb << 15;                                                           /* 0    1    1  */

  IOCLR0 = 0x003F8000;

  IOSET0 = 0xf8 << 15;                                                           /* 0    0    0  */

  IOCLR0 = 0x003F8000;

  IOSET0 = 0xfc << 15;                                                           /* 1    0    0  */

  IOCLR0 = 0x003F8000;

  IOSET0 = 0xf8 << 15;                                                           /* 0    0    0  */

  IOCLR0 = 0x003F8000;

  delay();

}


/* Function to read characters from a string and displaying the same by calling the

   Disp_key fucntion */

void Disp_String(char * c)

{

  int i=0;

  while(c[i] != 0x00)

  {

    Disp_Key(c[i]);

    i ++;

  }

}


/* Function to initialize the LCD module */

void LCD_init(void)

{

  unsigned long command;

  command = 0x38 << 16;                                            /* Function set 8-bit, 1 line 5*7 font*/

  Command_Write(command);

  command = 0x0c << 16;                                /* Display on off control. Diplay on, cursor off, */

  Command_Write(command);                                                /* blink off */

  command = 0x01 << 16;                                                        /* Clear the LCD display */

  Command_Write(command);

}     

int main()

{

  unsigned long com_word;

            IODIR0 = 0x007F8000;              /* Configure the GPIO0 (P0.15 TO P0.22) Port B as output } */

            IODIR1 = 0x00FF0000;           /*GPIO1 (P1.16 to P1.22)Port A as O/P */

  LCD_init();                    /* Initialize LCD module */

 

            com_word = 0x80 << 16;         /* displaying on the first line*/

  Command_Write(com_word);

  Disp_String(disp1);                                           /* Displays the message on LCD */

}



LAB PROGRAM 13:


To interface stepper motor with ARM processor ARM7TDMI/LPC2148. Write a program to rotate stepper motor.


Clockwise rotation


#include <LPC214X.H> //header for LPC2148 header files

void delay(unsigned int count)
{
  unsigned int i ,j= 0;
  for(i = 0; i <= count; i ++)
  for(j = 0; j <= 5; j ++);
}
//unsigned long i;
int main()
{
  IODIR1 = 0x00FF0000; //making the port1 as output port
 // i = 0x00110000;
  while(1)
  {
    IOSET1 = 0x00880000; //send the sequence 10001000 to port1
      delay(10000);
      IOCLR1 = 0x00FF0000; //clear the pins of port 1
      IOSET1 = 0x00440000; //send the sequence 01000100 to port1
      delay(10000);
      IOCLR1 = 0x00FF0000; ; //clear the pins of port 1
      IOSET1 = 0x00220000; //send the sequence 00100010 to port1
      delay(10000);
      IOCLR1 = 0x00FF0000; //clear the pins of port 1
      IOSET1 = 0x00110000; //send the sequence 00010001 to port1
      delay(10000);
      IOCLR1 = 0x00FF0000; //clear the pins of port 1
  }
}

Counter Clockwise rotation

#include <LPC214X.H>

void delay(unsigned int count)
{
  unsigned int i,j = 0;
  for(i = 0; i <= count; i ++){
  for(j=0;j<=5;j++);
  }
}
int main()
{
  IODIR1 = 0x00FF0000; //making the port1 as output port

  while(1)
  {
    IOSET1 = 0x00110000; //send the sequence 00010001 to port1
      delay(10000);
      IOCLR1 = 0x00FF0000; //clear the pins of port 1
      IOSET1 = 0x00220000; //send the sequence 00100010 to port1
      delay(10000);
      IOCLR1 = 0x00FF0000; //clear the pins of port 1
      IOSET1 = 0x00440000; //send the sequence 01000100 to port1
      delay(10000);
      IOCLR1 = 0x00FF0000; //clear the pins of port 1
      IOSET1 = 0x00880000; //send the sequence 10001000 to port1
      delay(10000);
      IOCLR1 = 0x00FF0000; //clear the pins of port 1
  }
}


Download Text Books

Download All TextBooks from 1st to 10th standard Click Here to Download http://www.ktbs.kar.nic.in/New/index.html#!/textbook