You are on page 1of 3

Assignment of CH-5(Advanced Programming concepts)

Class-XII
Informatics Practices

1. Define
a. relation between Class and Object.
a class is used to encapsulate data and methods together in a single unit. An object is
an instance of a class that is capable of holding actual data in memory locations. Class
and objects are related to each other in the same way as data type and variables.
Math Class and its functions

b. String class & its functions


The String class includes methods for examining individual characters of a string
sequence. When using most of the String class's methods, it should be kept in mind
that a string is just a series of individual characters and that each character has a
position or index, a little like a queue.
 for converting strings to uppercase or lowercase,
 for extracting substrings, for joining two strings together,
 for calculating the length of a string
 for creating a new string by omitting the leading and trailing whitespaces.

c. Four native class of Java


Maths
String
(only 2 are there in your syllabus)

d. Advantages of using In-built methods over creating user defined methods.


 They are well tested and optimized.
 They run faster as they are pre-compiled.

DATABASE CONNECTIVITY(Ch-6)
1. Define:
a. Front-End
A front end is the graphical user interface of a computer that makes it easier to use. It
is specifically used by user. The window available to the public to use the services
available through browser or an application is Front end.

b. Back End
Back-end refers to the server-side development. It is the term used for the behind-
the-scenes activities that happen when performing any action on a database. It can
be solving any query by the programmer. Backend developer focuses on databases,
scripting, and the architecture of Front end. Code written by back-end developers
helps to communicate the database information to the browser.
c. Database Connectivity
A Database connection is a facility in computer science that allows client software to
talk to database server software, whether on the same machine or not.
A connection is required to send commands and receive answers, usually in the form
of a result set. Connections are a key concept in data-centric programming. Its
basically a connection between Front End and Back End.

d. Basic libraries required for data connectivity


import java.sql.DriverManager;
import com.mysql.jdbc.Connection;
import com.mysql.jdbc.Statement;

e. Features of GUI
 attractive and pleasing to the eye
 They are much easier to use for beginners.
 They enable you to easily exchange information between software using cut
and paste or 'drag and drop'.
 They use a lot of memory and processing power.
 It can be slower to use than a command-line interface if you are an expert user.
 They can be irritating to experienced users when simple tasks require a
number of operations.
 allow the user to try out different options easily
 use suitable colours for key areas
 use words that are easy to understand aimed at the type of user

f. Database
A database is a collection of information that is organized so that it can be easily
accessed, managed and updated. Computer databases typically contain aggregations
of data records or files.

g. JDBC driver manager


The JDBC DriverManager class defines objects which can connect Java applications to
a JDBC driver. DriverManager is considered the backbone of JDBC architecture.
DriverManager class manages the JDBC drivers that are installed on the system.

h. JDBC connection
A JDBC Connection represents a session/connection with a specific database.
Connection interface defines methods for interacting with the database via the
established connection. An application can have one or more connections with a
single database, or it can have many connections with different databases.

i. Get connection method


getConnection() method is used to establish a connection to a database. It uses a
username, password, and a jdbc url to establish a connection to the database and
returns a connection object.
j. Get message method
The getMessage() method is used to retrieve the error message string.

k. Execute update method


The executeUpdate() method of the Statement class is used to update the database
with the values given as an argument.

l. Execute query method


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

m. Next method
The next() method of the result set is used to move to the next record of the
database.

n. Get model method


The getModel() method is used to retrieve the model of a table.

o. Getrowcount method
The getRowCount() method is used to retrieve the total number of rows in a table.

p. Remove row method


The removeRow() method is used to delete a row from a table.

q. Forname method
forName() method is used to load the class specified as its argument at runtime.

r. JDBC
The JDBC (Java Database Connectivity) API is a software for executing SQL
statements. It provides RDBMS access by allowing you to embed SQL inside Java
code. We can create a table, insert values into it, query the table, retrieve results,
and update the table with the help of JDBC.

s. Result set
Result Set method used to store the records returned by the SQL query.

You might also like