southcity.thelps.edu.insouthcity.thelps.edu.in/uploadedfiles...  · web viewoops: object oriented...

21
Viva/Exam. Based question 1) What is an event? Ans: Event is an occurrence of any activity like click, drag, etc Example: Action Event, MouseEvent, ItemEvent etc 2) Integrated Development Environment (IDE): It is a software tool to help programmer to edit, compile, interpret and debug the program in the same environment. i.e Eclipse, NetBeans, VB etc. 3) Give two examples of listener Interface: i)ActionListener ii)WindowListener 4) Give one examples of listener interface handler methods: i) jButton1ActionPerformed(java.awt.e vent.ActionEvent evt){ } ii)jList1ValueChanged(javax.swing. event.ListSelectionEvent evt){ } 5) Define JFC. Java foundation classes is aet of libraries to create enterprise application programs.java swing is part of JFC 6) RAD: Rapid Application Development is software programming technique that allows quick development of software application. Netbeans represents RAD tool. 7) What is event driven programming? Ans: This programming style responds to the user events and is driven by the occurrence of user events. 8) Give two examples of child components or controls. JTextField, JButton etc 9) What are container controls? Give examples. Ans: Containers are those controls which can hold other control inside them e.g., frame (JFrame), Panel (JPanel) etc. are containers. 10) Define class and object. Ans. Class is a group of objects having similar characteristics and behavior. Where data variables represent the characteristics and methods represents behavior. Object: Object is any identifiable entity having characteristics and behavior. 11) What is temporary instance? Ans: instance or object without any name, which remains till the statement is executed. Example: new frm1().setVisible(true); 12) Give difference between java and Netbeans. Ans: java is an example of high level language used to create programs, where as Netbeans is an IDE(integrated development environment) for rapid application development using language like java etc. 13) OOPS: object oriented programming implements programs using classes and objects.it is based on principles of data encapsulation,data abstraction,polymorphism,inheritance. It model real world working into programming. In OOP programming object represents an entity that can store data and has its interface through functions/methods. 14) List features of object oriented programming: Ans: i. Data encapsulation ii.) Data hiding iii) Inheritance iv) Polymorphism v) Data abstraction. 15) Define inheritance

Upload: others

Post on 10-Mar-2020

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: southcity.thelps.edu.insouthcity.thelps.edu.in/UploadedFiles...  · Web viewOOPS: object oriented programming implements programs using classes and objects.it is based on principles

Viva/Exam. Based question

1) What is an event?Ans: Event is an occurrence of any activity like click, drag, etcExample: Action Event, MouseEvent, ItemEvent etc

2) Integrated Development Environment (IDE): It is a software tool to help programmer to edit, compile, interpret and debug the program in the same environment. i.e Eclipse, NetBeans, VB etc.

3) Give two examples of listener Interface:i)ActionListener ii)WindowListener

4) Give one examples of listener interface handler methods:i) jButton1ActionPerformed(java.awt.event.ActionEvent evt){ } ii)jList1ValueChanged(javax.swing.event.ListSelectionEvent evt){ }

5) Define JFC.Java foundation classes is aet of libraries to create enterprise application programs.java swing is part of JFC

6) RAD: Rapid Application Development is software programming technique that allows quick development of software application. Netbeans represents RAD tool.

7) What is event driven programming?Ans: This programming style responds to the user events and is driven by the occurrence of user events.

8) Give two examples of child components or controls.JTextField, JButton etc

9) What are container controls? Give examples.Ans: Containers are those controls which can hold other control inside them e.g., frame (JFrame), Panel (JPanel) etc. are containers.

10) Define class and object.Ans. Class is a group of objects having similar characteristics and behavior.Where data variables represent the characteristics and methods represents behavior.Object: Object is any identifiable entity having characteristics and behavior.

11) What is temporary instance?Ans: instance or object without any name, which remains till the statement is executed.Example: new frm1().setVisible(true);

12) Give difference between java and Netbeans.

Ans: java is an example of high level language used to create programs, where as Netbeans is an IDE(integrated development environment) for rapid application development using language like java etc.

13) OOPS: object oriented programming implements programs using classes and objects.it is based on principles of data encapsulation,data abstraction,polymorphism,inheritance. It model real world working into programming.In OOP programming object represents an entity that can store data and has its interface through functions/methods.

14) List features of object oriented programming:Ans:

i. Data encapsulation ii.) Data hiding iii) Inheritance iv) Polymorphism v) Data abstraction.

15) Define inheritanceAns: inheritance is an important feature of OOPs by which features of class can be inherited by another class.Base class: whose features are inheritedDerived class: which inherit features of base class.In java single and multilevel inheritance is done.extends keyword is used to inherit a class.Example: class abc extends pqr{} , where abc is derive class and pqr is base class

16) Define Data Encapsulation and Data Hiding.Ans : wrapping up of data and functions together into one unit called class.Data hiding hides the data from outside world.Private keyword hides the data, private data cannot be accessed from outside of class.Example:class ABC{int a,b;// instance variablesvoid input(int s,int t){a=t;b=s;}}

17) Define polymorphism:The processing of message in more than one form by objects of class. Method overloading is used to represent polymorphism in java.void change(int d);int change(int n,int f);

18) Data abstraction: feature of oops by which a class represents the essential features of an object and hiding the unnecessary background details.It is automatically implemented when a class is defined.

19) Define package.

Page 2: southcity.thelps.edu.insouthcity.thelps.edu.in/UploadedFiles...  · Web viewOOPS: object oriented programming implements programs using classes and objects.it is based on principles

Ans: Package is collection of classes, interfaces. Import keyword is used to include a package in a programExample import javax.swing.JOptionPane

20) Define the term interface.Interface is collection of abstract methods and constant data members. Interface can be used to provide common interface between objects of different classes.implements keyword is used to implement interface by any classExample: class ABC implements d1{} where d1 is any interface.

21) Define abstract class.Ans: Abstract class is a class whose objects are not created. Abstract classes are inherited.

22) Define java swing.Ans : java swing collection of library classes which provide numerous graphical controls to create a GUI based application.Packages use for swing: import javax.swing.*;

23) Define function or method overloading:When same name function is defined more than once with different signatures(number and type of parameters passed), then function is said to be overloaded. Method overloading implements polymorphism.Example void area(int l,int b);

void area(int side);24) Define method or function overriding.

Ans: When same function is defined in base class or super class, and derived class or sub class, then same name function defined in derived class overrides the base class method.To call or unhide base class method in derived class super keyword is used

25) Name any four method of jTableAns: jTable1.getRowCount(),

jTable1.getColumnCount()Example: int n= jTable1.getRowCount(); int n1= jTable1.getColumnCount();String k=jTable1.getColumnName(0);// to get the column name String k1=jTable1.getValueAt(n1-1, n-1).toString();// value at last cell of last row jTable1.setValueAt("tom", 0, 0);// to change value of first cell in a JTable

26) Name methods to add and remove record in a JTable(using DefaultTableModel)Ans: addRow(Object[]), removeRow(int)Example:DefaultTableModel t=(DefaultTableModel)jTable1.getModel();

t.addRow(new Object[]{"ll","aa","ss","ssss"}); t.removeRow(0);

27) Name the property of jRadioButton or JCheckBox to make them mutually exclusive.Ans: Buttongroup

28) Write the method to make a textfield uneditable.jTextField1.setEditable(false)

29) Write themethod to make the swing control disabled.jButton1.setEnabled(false)

30) Write the method to make the swing control invisible.setVisible(false)

31) Write the method to display image in a label.jLabel1.setIcon(new ImageIcon(“path of file”);

32) Write the method to make the radiobutton or checkbox selected.setSelected(true)

33) Write a statement to close the current form.this.dispose();

34) Write the method to access and store password from a jPasswordFiled1.String pass=new String(jPasswordField1.getPassword());

35) Write the method to change the masked character of JPasswordField control.jPassowrdField1.setEchoChar(‘@’);

36) Write the method to access the masked character of JPasswordField controlChar p= jPassowrdField1.getEchoChar()

37) Write a statement to read and store the selected item from a listbox.String p=jList1.getSelectedValue();

38) Write a statement to read and store the selected item from a comboBox.String p=jList1.getSelectedItem();

39) Write a statement to check for first item of listbox is selected or not.boolean p=jList1.isSelectedIndex(0);if(p==true)JOptionPane.showMesageDialog(null,”yes selected”);elseJOptionPane.showMesageDialog(null,”not selected”);

40) What is the difference between setModel() and getModel()?getModel():Returns the data model that holds the list of items displayed by the JList/JComboBox component. DefaultListModel d=(DefaultListModel)jList1.getModel();setmodel():Sets the model that represents the contents or "value" of the JList/ JComboBox. jList1.setModel(d);

41) What is the role of Model property of jList/jComboBox.Model property represents the object that contains the data to be drawn for JList /JComboBox.

42) What is the use of toolTipText property?It displays the tool tip when mouse is placed over a control.

43) Which property is used to display title for any form or frame?

Page 3: southcity.thelps.edu.insouthcity.thelps.edu.in/UploadedFiles...  · Web viewOOPS: object oriented programming implements programs using classes and objects.it is based on principles

Title property.44) Which property of Jpanel is used to give a titled border?

Border property.45) Name the property of jList to set the selection mode.

Ans: Selection mode: SINGLE, SINGLE_INTERVAL, MULTIPLE_SELECTION

46) Which property of JTextArea is used to wrap text to next line on reaching boundaries.Ans:Linewrap property.

47) What is the use of WrapStyleWord of JTextArea?Ans: It is used to set whether wrapping is required at word boundaries.

48) Which method of WindowEvent is used to execute any statement as form is opened?Ans: WindowOpened().

49) What is the use of valueChanged method of ListSelecttion Event of JList.Ans: it will execute a statement as an item selection is changed in a JList control.

50) Name the method used to add and remove items from a JCOmboBox(without using DefaultComboBoxModel)jComboBox1.addItem(“pop”)jComBoBox1.removeItem(“pop”);

51) Name the method to add and remove elements in JList during runtime(using DefaultListModel)Ans: (i)add(int,Object) or addElement(Object) (end of list) ii)remove(int) or removeElement(Object)

52) The JDBC API - software used to provide RDBMS access and execute SQL statements within java code.

The JDBC Driver for MySQL - software component enabling a java application to interact with a MySQL database.53) Classes used for Database Connectivity Driver Manager Class Connection Class Statement Class Resultset Class54) Prerequisites for connecting to MySQL from JavaMySQL

provides connectivity for client applications developed in the Java Programming language via a JDBC driver known as MySQL Connector/J

55) Connection: A connection is the session between the application program and the database. To do anything with database, one must have a connection object.

Connecting to MySQL from Java :Steps for Creating Database Connectivity Application There are mainly six steps:Step1 : Import the Packages Required for Database Programming.( import java.sql.*)Step2 : Register the JDBC Driver (Class.Forname(“java.sql.Driver”);)Step3 : Open a Connection (Connection cn=DriverManager.getConnection(“path”,userid,password);Step4 : Execute a Query . (Statement st=cn.createStatement();), ResultSet rs=st.executeQuery(“query”);Step5 : Extract Data from Result set ( rs.next();

String p=rs.getString(1);)

Step6 : Clean up the Environment(rs.close();cn.close();st.close();

Now to connect to a database, you need to know database’s complete URL, the user’s Id and password

Example:jdbc:mysql://localhost:3306/cbse", "root", "abcd1234"In the above command:jdbc:mysql : is the Database Driver Connection3306 : is the Default Port no on which MySQL runscbse : is the Database Nameroot : is the User Nameabcd1234 : is the PasswordResultSet Methods

A result set (represented by a ResultSet object) refers to a logical set records that are fetched from the database by executing a query and made available to the application program.There are various ResultSet methods such as:_ next() : moves the cursor forward on row. first() : moves the cursor to the first row in the ResultSet Object. last() : moves the cursor to the last row in the ResultSet object. relative(in rows) :moves the cursor relative to its current position. absolute(int rno) :positions the cursor on the rnothrow of the ResultSet object. getRow() : Retrieves the current row number the cursor is pointing at.That is if cursor is at first row the getRow() will return 1.

56) Which method is used when we simply want to retrieve data from a table without modifying the contents of the table.Ans: executeQuery()

57) Which method is used to instantiate a statement object using the connection object?Ans: createStatement()

58) Name the 4 essential class libraries that we need to import for setting up the connection with the database and retrieve data from the database.Ans: DriverManager, Connection, Statement, ResultSet

59) Name methods to access elements from comboBox.Ans: getSelectedItem()

60) Name some examples of operating systems.Ans: Windows, Linux, Unix.

61) Name examples of web browsers.Ans: google chrome, Internet explorer, firefox

62) Name some examples of object oriented computer languages.Ans c++, java, Phython

63) Name example of wordprocessor.Ans Ms-Word

64) Name examples of RdBMS.Ans : Ms-access,Oracle,MySQL, postgreSQL.

65) Name examples of opensource software.Ans: MySQL, Apache http server, Mozilla firefox

66) Give examples of antivirus.

Page 4: southcity.thelps.edu.insouthcity.thelps.edu.in/UploadedFiles...  · Web viewOOPS: object oriented programming implements programs using classes and objects.it is based on principles

Ans: quickheal, Norton, kaspersky etc.67) Name methods to secure network security.

Ans: passwords, antivirus, firewall68) Name threats to computer security.

Ans: snooping, spam,cracking,spyware,Trojans,virus etc.69) Give difference between primary key and foreign key.

Ans: There is only one primary key, whereas foreign key can be more than one.

70) Give examples of DDL (data definition language commands).Ans: CREATE TABLE, DROP TABLE, ALTER TABLE.

71) Give examples of DML (data manipulation language commands).Ans: INSERT INTO, SELECT, UPDATE, DELETE FROM.

72) Give example of Transaction control language ) commandsAns: ROLLBACK, COMMIT, START TRANSACTION, SAVEPOINT

73) Which tag is used to create hyperlinks?Ans: <A HREF=””>..</a>

74) Give difference between <OL> and <UL>Ans: <ul> is used to create unordered list using <LI> tags

<OL> is used to create ordered list using <LI> tags.75) Give difference between <TD> and<TR>

Ans: <TD> is used to place data for cell in a row where as <TR> includes a row in a table

76) Define XML.Ans: XML is extensible markup language to describe data or hold data in an organized manner.

77) Give difference between UNICODE and ASCII.Ans: UNICODE is 2 byte character coding that is platform and language independent where ASCII is 7-bit coding that mainly works with English alphabets.

78) What do you mean by constructor?Ans: constructor is a special member method having same name that of class to initialize data members when object is created.Class student{

int a;Student(int b) //contructor{a=b;}}

79)Tokens: The smallest individual unit of the program is known as Token.

Keywords : Words reserved by the language with a special meaning. Like int, float, switch, case etc

Identifiers : Long sequence of letters & digits to identify a memory block(variable), program unit or program objects. Like name, a, x, A, X, date, file1, file2 etc. Literals : Constants that never changes their value during the execution of a program. Punctuators [ ] ( ) { } , ; : * = #

Operators : +, -, *, /, % , ++, --,

Arithmetic Operator : - +, * , / , % Increment/Decrement Operator : ++, --

Relational or Comparison Operators: >, >= , <, <= , ==, != Logical Operators : &&, ||, ! Assignment Operators =, +=, -=, *= , /=, %= Other Operators . , new, type etc.

80) Define JVM.Ans: java virtual machine is the interpreter which is used to interpret the java program after compilation (Byte code).

81) Bytecode: the machine independent code created after compilation of java source program.

82) Give any important features of java.Ans: i) java is a object oriented high level language which uses both compiler and interpreter.

ii) Write once read anywhere(WORA):java programs are once compiled and then interpreted anywhere.

ii) Java is platform independent; only one compiler is used for various platforms (OS). iv) java is case sensitive language i.e same lowercase and uppercase character are treated differently.

83) What is the use of this keyword?Ans. this is used to represent current calling object.it is also used to unhide a instance variable

Eg. this.a=12;84) Why final keyword is used?

final is used to make a constant, whose value cannot be modified. Class or method declared as final cannot be inherited .Example final int r=10;final class abc{}

85) Why new keyword is used?new keyword creates a new object by allocating space i.e used to create instance of a class.Example: ABC ob1=new ABC();Here ABC is a class.

86) What is the use of static keyword?Ans: static keyword is used to create class variable having only one copy shared by number of objects.Class variable or method can be called outside the class without creating object.Example: static int a=10;public static void main(String args[]){}

87) Give difference between public,private,protected access specifiers.Ans: public variables or method can be accessed outside a class or any where elseprotected variable or method can be accessed in derive class where it is inherited.private variable or method can be accessed only inside the class not outside the class.

88) Define package.Ans: package is collection of classes, interfaces. Import keyword is used to include a package in a programExample java.io.*;Java.util.*

89) Define function or method overloading:

Page 5: southcity.thelps.edu.insouthcity.thelps.edu.in/UploadedFiles...  · Web viewOOPS: object oriented programming implements programs using classes and objects.it is based on principles

When same name function is defined more than once with different signatures(number and type of parameters passed), then function is said to be overloaded.Example void area(int l,int b);

void area(int side);90) What do you mean by constructor?

Ans: constructor is a special member method having same name that of class.It is used to initialize data members when object is created.Class student{

int a;Student(int b) //contructor{a=b;}

}91) What is the role of main()?

Every program execution starts from main().92) What are wrapper classes?

The predefined classes which wraps up the primitive data as a object.it provides ready made methods like conversion functions Integer.parseInt(), Double.parseDouble() etc.

93) What is impure function or method?The methods which changes the value of the parameter passed or instance variable.

94) What is pure function or method?The methods which does not changes the value of the of the parameter passed or instance variable.

95) Give difference between exit control and entry control loop.Exit controlled loops:The loops where the loop body is executed before a test expression. These loops always run at least once.Like: do { //Body of loop }while( condition);Entry controlled loop: the loop statement where the loop body is executed after the test expression.Entry controlled loop may or may not run once.Example: while( ), for( )

96) What is infinite loop? Give an example.The loop or iteration which never stops automatically.Example: for(int j=100;j>10;j++){System.out.println(j);}

97) Explain the types of errors in java.There are three main types of error in java:Syntax errors: the error which occurs because of violation of the rules to form a statement. These errors are easy to find out.Like Float =12;Logical error: the errors which occur because of wrong logic used in a program. These error are difficult to find out.Like : adding in place of division.Runtime errors(Exceptions): the errors which occur during the execution of programs.Example: dividing by zero, entering name instead of number

98) Difference between type promotion and type casting.Type promotion or implicit conversion: Automatic conversion of one type of data type into another automatically.Normally lower data type gets automatically gets converted into higher.Type casting or explicit data conversion: Conversion of one type of data into another by writing typed expression.Higher data type are type casted into lower data type.Example: int h=(float)45.6;

99) Give difference between == and =.==: it is a relational operator. It results an Boolean value.if(a==b)=: it is an assignment operator. It assigns a value to a variable on left side.Int v=s+10;

100) Actual parameters: Parameters that appears in the calling statement of the function are known as actual parameters.

Formal Parameters: Parameters that appears in the function prototype or header statement of the function definition are known as formal parameters. Example : int addition (int a, int b) //here a,b are formal parameters{ int r; r=a+b; return (r); } void main () { int x=5,y=3,z=0; z = addition (x,y); // here x,y are actual parameterscout << "The result is " << z; }101) Call by value / Pass by value When we call a function by passing parameters by value, the values of actual parameters get copied into the formal parameters but not the variables themselves. The changes made in the values of formal parameters will not reflected back to the actual parameters. int addition ( int x , int y );// primitive data types are passed by valueCall by reference / Pass by referenceWhen we call a function by passing parameters by reference, formal parameters create a reference directly to the actual parameters. Passing objects to function.The changes made in the values of formal parameters will be reflected back to the actual parameters. int addition ( abc ob1 );//objects are passed by reference

102) switch() and if()switch() is a multiple branch statement that can be used with equal to condition only or when one value is compared with set of options.switch(ch){

Page 6: southcity.thelps.edu.insouthcity.thelps.edu.in/UploadedFiles...  · Web viewOOPS: object oriented programming implements programs using classes and objects.it is based on principles

case 0: System.out.println(“ok”);break;case 1: :System.out.println(“ok”);break;default:System.out.println(“ok”);}if(): it is versatile branching statement which can be used for any condition.if(ch==0)System.out.println(“ok”);else if(ch==1)System.out.println(“ok”);elseSystem.out.println(“ok”);

103) Continue and breakContinue : it is jump statement used to transfer the control to next iteration step after skipping some statement.It is used with a loop or iteration.Break: it breaks or terminate a loopit is used with branching or looping statements.104) return : Return is used to return value from the

method .it is a jump statementSyntax: return <value>;

105) What is the purpose of default clause in a switch statement?

Ans: The default statement gets executed when no match is found in switch.106) Differentiate ‘A’ and “A”‘A’: it is character constant. Arithmetic operation can be done.“A”: it is a string constant. Arithmetic operation cannot be done.107) Primitive data types and non –primitive data

types:Primitive data types: the fundamental data types in java. There are 8 primitive datatypes in java:Example: char,byte,short,int, long,float,double,BooleanNon-primitive data types: the derived or reference data types in java. Non-primitive data types are created from primitive data types.Example: class, array108) Give the size of data types:char: 2 bytebyte : 1 byteshort: 2 byteint: 4 byteslong : 8 bytesfloat: 4 bytedouble: 8 byteboolean: 1 byte109) Variable and constants:

Variable is a named storage location in computer memory whose contents can change

during a program run.Constants: Items having fixed data values are referred to as Literals or constants.110) Operators:

Operators are special symbols that perform specific operations on one, two, or three operands.Binary operators: the operators that operates on two operands at a time:Example: +, -,/,%,*,&&,||Unary operators: The operators which operates on single operand at a time:Example: !, ++,--Ternary or conditional operator: the operator which operate on three operand.(condition)?true part: false partInt a=7>5?12:10;Increment operator : ++ is called as increment operator. It increase sthe value by one.++a and a++++a: change and use . Here the value of a is increased by 1 and then used.a++: use and change. Here the current value is used and then the value is incrementedDecrement operator: -- is called as decrement operator. It decreases the value by one.111) Give difference between:

equals ()and compareTo()equals() compares two strings and returns a Boolean value wheas compareTo() also compares two string and return a integer value

Method and contructor:Method do not have same name as that of class whereas constructor name is same as that of a class.Method are called by objects where as constructor are called automatically.

112) Local variable and global variable:Local variable is declared inside any method body.it cannot be used outside method.Global variable: the public instance variable declared outside body of all the methods in a class. It can be accessed by all the methods.

class abc{int a;//instance variablevoid pqr(){int y=12;//local variable}}

113) What are data types? Name the types.Data types represent the type of data and set of associated operations that can be done on the data.Example:Primitive or fundamental data types: char, boolean,int,long double etc.Non-primitive or reference data types:data types that ate derived from primitive data type, like class, array.

Page 7: southcity.thelps.edu.insouthcity.thelps.edu.in/UploadedFiles...  · Web viewOOPS: object oriented programming implements programs using classes and objects.it is based on principles

114)

115) NIC(Network Interface Card / Unit) :An NIC (Network Interface Card) is a device that enables a computer to connect to a network and communicate. Any computer which has to be a part of a computer network must have an NIC.Hub: A Hub is an electronic device that connects several nodes to form a network and redirects the received information to all the connected nodes in broadcast mode.Hub is a device that allows us to connect multiple computers/devices together in a network. A hub has ports into which the cables from individual computers' NICs are inserted.Switch: A Switch is an intelligent device that connects several nodes to form a network and redirects the received information only to the intended node(s).A switch is an intelligent hub.Repeater: A Repeater is a device that is used to regenerate a signal which is on its way through a communication channel. A repeater regenerates the received signal and re-transmits it to its destination.Gateway: A Gateway is a device, which is used to connect different types of networks and perform the necessary translation so that the connected networks can communicate properly.A Node is a device, which is directly connected to a computer network. It can be a computer or any other device like printer, scanner etc.Network Topologies:A Topology is an arrangement of physical connections among nodes in a network. Example :star,bus,ring116) Identification of computers and users over a network:MAC (Media Access Control) address: A MAC (Media Access Control) address is a unique 12 digit (6 digits for manufacturer code and 6 digits for serial number) hexadecimal number assigned to each NIC. MAC address of an NIC never changes.MAC addresses are 12-digit hexadecimal (or 48 bit) numbers. By convention, MAC addresses are usually written in one of the following two formats:MM:MM:MM:SS:SS:SS or MM-MM-MM-SS-SS-SS

For example, in the following MAC address: 00:A0:C9 : 14:C8:35IP Address: An IP (Internet Protocol) address is a unique 4 digit hexadecimal number assigned to each node on a network. IP address settings of a node can be changed by the user. Every machine in a network has another unique identifying number, called its IP Address.

An IP (IPv4)address is a group of four bytes (or 32 bits) each of which can be a number from 0 to 255. A typical IP address looks like this: 59.177.134.72There are two versions of IP addresses: version 4 (IPv4) and version 6 (IPv6). IPv6 32 uses 128 bits (IPv4 uses 32 bits) for an IP address.IP Address Vs MAC Address:

The IP address is assigned by the network administrator or the internet service provider while the MAC address is assigned by the manufacturer.

If a computer is transferred from one network to another, its IP address gets changed where as the MAC address remains the same.

117) URL: Uniform Resource Locator is the character based name of file or location on internet.URL has three parts. Format of URL: server type//domain name/file pathExample: http://www.cbse.nic.in/welcome.htmDomain Name: Domain names are character based names used in URLs to identify particular Web servers. A Domain Name is a name assigned to a server through Domain Name System (DNS). For example, in the URL http://www.cbse.nic.in/welcome.htm, the domain name is www.cbse.nic.in.A domain name usually has more than one parts: top level domain name or primary domain name and sub-domain name(s). For example, in the domain name , in is the primary domain name; nic is the sub-domain of in; cbse is the sub-domain of nic.118) ISCII - Indian Script Code for Information InterchangeGNU: GNU’S is not Unix OSS : (Open source software)GPL: General Public LicenseTTF: True Type FontGPS: Global System For Mobile CommunicationGPRS: General Packet Radio ServiceEDGE: Enhanced Data GIF: Graphical Interchange File FormatTIFF: Tagged Interchanged FormatBMP: BITMAP IMAGE.JPEG: Joint Photograph Expert GroupMPEG: MOTION PICTURES EXPERT GROUPPNG: Portable Network Graphics.SVG: Scalar Vector GraphicsWIFI: WIRELESS FIDELITY WIFI IS WIRELESS LAN(1Mbps to 20 Mbps)WIMAX: Wordwide operability through microwave access is wireless internet service to entire city(50Mbps to 70Mbps)MPEG-1 or MPEG-2 Audio Layer III, more commonly referred to as MP3, is an encoding format for digital audio which uses a form of lossy data compression.Advanced Audio Coding (AAC) is a standardized, lossy compression and encoding scheme for digital audio.LAMP: LINUX APACHE MYSQL PHPPHP: HYPERTEXT PREPROCESSORFLOSS: FREE LIBRE OPEN SOURCE SOFTWAREUNICODE : UNIOVERSAL CODINGRDBMS: RELATIONAL DATABASE MANAGEMENT SYSTEMHTTP: HYPERTEXT TRANSFER PROTOCOLTCP/ IP: TRANSMISSIOM CONTROL PROTOCOL/ INTERNET PROTOCOLFSF : FREE SOFTWARE FOUNDATION.

Page 8: southcity.thelps.edu.insouthcity.thelps.edu.in/UploadedFiles...  · Web viewOOPS: object oriented programming implements programs using classes and objects.it is based on principles

ASCII: AMERICAN STANDARD CODE FOR INFORMATION INTERCHANGE.NRCFOSS : National Resource Centre for Free and Open Source Software.ODF : Open Document format ICT: INFORMATION AND COMMUNICATION TOOLSBOSS Bharat Operating Systems SolutionsURL: Uniform Resource LocatorMAC (Media Access Control)SMTP: Simple mail transfer protocol) is used to send e-mail.POP (post office protocol) is used to access or receive e-mail from servers.UDP: User datagram protocol is used to send data like IP.FTP: File transfer protocol is used to upload and download filesNIC: Network Interface Card / UnitWIFI: WIRELESS FIDELITY119) Database: A database is an organised collection of data. Software used to manage databases is called

Data Base Management System (DBMS).2. Relational Database: A database in which the data is stored in the form of relations (also called tables) is called a Relational Database. In other words a Relational Database is a collection of one or more tables.3. RDBMS: A DBMS used to manage Relational

Databases is called an RDBMS (Relational Data Base Management System). Some popular

RDBMS software available are: Oracle, MySQL, Sybase, Ingress.ISION TOUR4. Benefits of using a DBMS are:

a. Redundancy can be controlledb. Inconsistence can be avoidedc. Data can be sharedd. Security restrictions can be applied.

5. MySQL: It is an Open Source RDBMS Software. It is available free of cost.6. Relation/Table: A table refers to a two dimensional representation of data arranged in columns (also called fields or attributes) and rows (also called records or tuples). The tables in a database are generally related to each other to facilitate efficient

management of the database. Interrelated tables also reduce the chances of errorsin the database.7. Key: A column or a combination of columns which can be used to identify one or more rows (tuples) in a table is called a key of the table.8. Primary Key: The group of one or more columns used to uniquely identify each row of a relation is called its Primary Key.

9. Candidate Key: A column or a group of columns which can be used as the primary key of a relation is

called a candidate key because it is one of the candidates available to be the primary key of the

relation10. Alternate Key: A candidate key of a table which is not made its primary key is called its Alternate Key.

SQL COMMANDS:

1. SQL (Structured Query Language): It is the language used to manipulate and manage databases and tables within them using an RDBMS.2. DDL (Data Definition Language): This is a category of SQL commands. All the commands which are used to create, destroy, or restructure databases and tables come under this category. Examples of DDL commands are - CREATE, DROP, ALTER.3. DML (Data Manipulation Language): This is a category of SQL commands. All the commands which are used to manipulate data within tables come under this category. Examples of DML commands are - INSERT, UPDATE, DELETE,SELECT.4. DCL (Data Control Language): This is a category of SQL commands. All the commands which are used to control the access to databases and tables fall under this category. Examples of DCL commands are - GRANT, REVOKE.

5.Transaction control language(TCL):set of commands used to control a transaction like saving changes in a transaction, undo changes in a transaction etc. ROLLBACK,COMMIT, SAVEPOINT,START TRANSACTION

Page 9: southcity.thelps.edu.insouthcity.thelps.edu.in/UploadedFiles...  · Web viewOOPS: object oriented programming implements programs using classes and objects.it is based on principles
Page 10: southcity.thelps.edu.insouthcity.thelps.edu.in/UploadedFiles...  · Web viewOOPS: object oriented programming implements programs using classes and objects.it is based on principles
Page 11: southcity.thelps.edu.insouthcity.thelps.edu.in/UploadedFiles...  · Web viewOOPS: object oriented programming implements programs using classes and objects.it is based on principles
Page 12: southcity.thelps.edu.insouthcity.thelps.edu.in/UploadedFiles...  · Web viewOOPS: object oriented programming implements programs using classes and objects.it is based on principles
Page 13: southcity.thelps.edu.insouthcity.thelps.edu.in/UploadedFiles...  · Web viewOOPS: object oriented programming implements programs using classes and objects.it is based on principles
Page 14: southcity.thelps.edu.insouthcity.thelps.edu.in/UploadedFiles...  · Web viewOOPS: object oriented programming implements programs using classes and objects.it is based on principles
Page 15: southcity.thelps.edu.insouthcity.thelps.edu.in/UploadedFiles...  · Web viewOOPS: object oriented programming implements programs using classes and objects.it is based on principles
Page 16: southcity.thelps.edu.insouthcity.thelps.edu.in/UploadedFiles...  · Web viewOOPS: object oriented programming implements programs using classes and objects.it is based on principles

TRANSACTION:A transaction is a unit of work that must be done in logical order and successfully as a group or not done at all.START TRANSACTION Statement :START TRANSACTION statement commits the current transaction and starts a new transaction. It tells MySQL that the transaction is beginning and the statements that follow should be treated as a unit, until the transaction ends. It is written like this:START TRANSACTION;The START TRANSACTION statement has no clauses.

COMMIT Statement :START TRANSACTION statement commits the current transaction and starts a new transaction. It tells MySQL that the transaction is beginning and the statements that follow should be treated as a unit, until the transaction ends. It is written like this:START TRANSACTION;The START TRANSACTION statement has no clauses.The COMMIT statement is used to save all changes made to the database during the transaction to the database. Commit statement is issued at a time when the transaction is complete- all the changes have been successful and the changes should be saved to the database. COMMIT ends the current transaction.COMMIT statement is used like this:COMMIT;OrCOMMIT WORK;

ROLLBACK Statement :The ROLLBACK statement cancels the entire transaction i.e. It rolls the transaction to the beginning.

ROLLBACK statement is used like this:ROLLBACK;OrROLLBACK WORK;Here WORK is a keyword and is optional.Inserting SavePoints :The SAVEPOINT statement defines a marker in a transaction. These markers are useful in rolling back a transaction till the marker. save point is to partial roll back to a marker.SAVEPOINT <savepoint-name>;

SAVEPOINT Mark1;In the above statement a marker (savepoint) with the name Mark1 is defined. It becomesa bookmark in the transaction. Now we can write the following statement:ROLLBACK TO SAVEPOINT Mark1;to rollback the transaction till the bookmark named Mark1.Setting Autocommit :By default, Autocommit mode is on in MySQL. It means that MySQL does a COMMIT after every SQL statement that does not return an error.

The following statement sets the autocommit mode to off. It also starts a new transactionSET AUTOCOMMIT=0;The following statement sets the autocommit mode to ON. It also commits andterminates the current transaction.SET AUTOCOMMIT=1;If autocommit is set to ON. we can still perform a multiple-statement transaction by starting it with an explicit START TRANSACTION statement and ending it with COMMIT or ROLLBACK.(DDL commands are always commit if there is no error)