Skip to main content

Posts

Showing posts with the label Bca Notes

Java Runtime Environment

The Java Runtime Environment (JRE) provides the libraries, the Java Virtual Machine, and other components to run applets and applications written in the Java programming language. In addition, two key deployment technologies are part of the JRE: Java Plug-in, which enables applets to run in popular browsers; and Java Web Start, which deploys standalone applications over a network. (a) Java Plug-in : Java Plug-in technology, included as part of the Java Runtime Environment, Standard Edition (Java SE), establishes a connection between popular browsers and the Java platform. This connection enables applets on Web sites to be run within a browser on the desktop. (b) Java Web Start : Using Java Web Start technology, standalone Java software applications can be deployed with a single click over the network. Java Web Start ensures the most current version of the application will be deployed, as well as the correct version of the Java Runtime Environment (JRE).

Applications and Applets In Java

Java is a general-purpose, object-oriented programming language. We can  develop two types of Java programs : Stand alone Applications : Programs written in Java to carry out certain  tasks on a stand alone local computer.  Executing stand alone java  programs involves two steps : (a) Compiling through javac compiler. (b) Executing the byte code using java interpreter.  Web Applets : Programs that are developed for Internet based   applications. An applet located on a distant computer (Server) can be   downloaded via Internet and executed on a local computer (Client) using   a java capable browser. From the user‟s point of view, Java applications can be compared to   compiled C programs since they are started from a command line just like   any compiled program would be started. However, there is a major  difference: Java applications, as well as applets, are interpreted.  Applications are started on the command-...

Exception Handling in Java

The term exception is shorthand for the phrase "exceptional event." Definition : An exception is an event, which occurs during the execution of a program that disrupts the normal flow of the program's instructions.  When an error occurs within a method, the method creates an object and hands it off to the runtime system. The object, called an exception object, contains information about the error, including its type and the state of the program when the error occurred. Creating an exception object and handing it to the runtime system is called throwing an exception. After a method throws an exception, the runtime system attempts to find something to handle it.  Some of the predefined exception classes are :  ArithmeticException, ArrayIndexOutOfBoundException, IOException etc.

What are Abstract Methods and Classes

Abstract Methods and Classes : An abstract class is a class that is declared abstract—it may or may not include abstract methods. Abstract classes cannot be instantiated, but they can be subclassed. An abstract method is a method that is declared without an implementation (without braces, and followed by a semicolon), like this : abstract void moveTo(double deltaX, double deltaY); If a class includes abstract methods, the class itself must be declared abstract, as in: public abstract class GraphicObject { // declare fields // declare non-abstract methods abstract void draw(); } When an abstract class is subclassed, the subclass usually provides implementations for all of the abstract methods in its parent class. However, if it does not, the subclass must also be declared abstract. When an Abstract Class Implements an Interface : A class that implements an interface must implement all of the interface's methods. It is possible, however, to define a class that does not implement al...

Packages and Interfaces

Packages Many times when we get a chance to work on a small project, one thing we intend to do is to put all java files into one single directory. It is quick, easy and harmless. However if our small project gets bigger, and the number of files is increasing, putting all these files into the same directory would be a problematic for us. In java we can avoid this sort of problem by using Packages. Packages are nothing more than the way we organize files into different directories according to their functionality, usability as well as category they should belong to. Packaging also help us to avoid class name collision when we use the same class name as that of others. For example, if we have a class name called "Vector", its name would crash with the Vector class from JDK. However, this never happens because JDK use java.util as a package name for the Vector class (java.util.Vector). So our Vector class can be named as "Vector" or we can put it into another packa...

Wrapper Classes

Wrapper classes are used to represent primitive values when an Object is required. The wrapper classes are used extensively with Collection classes in the java.util package and with the classes in the java.lang.reflect reflection package. Wrapper classes has the following features :  One for each primitive type: Boolean, Byte, Character, Double, Float, Integer, Long, and Short. Byte, Double, Float, Integer and Short extend the abstract Number class. All are public final i.e. cannot be extended. Get around limitations of primitive types. Allow objects to be created from primitive types.  All the classes have two constructor forms :  a constructor that takes the primitive type and creates an object eg Character(char), Integer(int).  a constructor that converts a String into an object eg Integer("1"). Throws a NumberFormatException if the String cannot be converted to a number.

What is Garbage Collection

The name "garbage collection" implies that objects no longer needed by the program are "garbage" and can be thrown away. A more accurate and up-to-date metaphor might be "memory recycling." When an object is no longer referenced by the program, the heap space it occupies can be recycled so that the space is made available for subsequent new objects. The garbage collector must somehow determine which objects are no longer referenced by the program and make available the heap space occupied by such unreferenced objects. In the process of freeing unreferenced objects, the garbage collector must run any finalizers of objects being freed. In addition to freeing unreferenced objects, a garbage collector may also combat heap fragmentation. Heap fragmentation occurs through the course of normal program execution.  New objects are allocated, and unreferenced objects are freed such that free portions of heap memory are left in between portions occupied by live ob...

Explaining data types in Java

The Java programming language is strongly-typed, which means that all variables must first be declared before they can be used. This involves stating the variable's type and name: int gear = 1; Doing so tells your program that a field named "gear" exists, holds numerical data, and has an initial value of "1". A variable's data type determines the values it may contain, plus the operations that may be performed on it. In addition to int, the Java programming language supports seven other primitive data types. A primitive type is predefined by the language and is named by a reserved keyword. Primitive values do not share state with other primitive values.  The eight primitive data types supported by the Java programming language are :  Byte : The byte data type is an 8-bit signed two's complement integer. It has a minimum value of -128 and a maximum value of 127 (inclusive).  Short : The short data type is a 16-bit signed two's complement intege...

Elaborating JVM

Java Virtual Machine : A Java Virtual Machine (JVM) is a set of computer software programs and data structures which use a virtual machine model for the execution of other computer programs and scripts. The model used by a JVM accepts a form of computer intermediate language commonly referred to as Java bytecode. This language conceptually represents the instruction set of a stack-oriented, capability architecture. Java Virtual Machines operate on Java bytecode, which is normally (but not necessarily) generated from Java source code; a JVM can also be used to implement programming languages other than Java. For example, Ada source code can be compiled to Java bytecode, which may then be executed by a JVM. JVMs can also be released by other companies besides Sun (the developer of Java) -- JVMs using the "Java" trademark may be developed by other companies as long as they adhere to the JVM specification published by Sun (and related contractual obligations).

Connecting Java and World Wide Web

Java and the World Wide Web : A significant advance in Web technology was Sun Microsystems' Java platform. It enables Web pages to embed small programs (called applets) directly into the view. These applets run on the end-user's computer, providing a richer user interface than simple Web pages. Java client-side applets never gained the popularity that Sun had hoped for a variety of reasons, including lack of integration with other content (applets were confined to small boxes within the rendered page) and the fact that many computers at the time were supplied to end users without a suitably installed Java Virtual Machine, and so required a download by the user before applets would appear. Adobe Flash now performs many of the functions that were originally envisioned for Java applets, including the playing of video content, animation, and some rich UI features. Java itself has become more widely used as a platform and language for server-side and other programming.

Logic Gates & Flip Flops

A digital computer uses binary number system for its operation. In the binary system there are only 2 digits, 0 and 1. The manipulation of binary information is done by logic circuit known as logic gates. The important logical operations which are frequently performed in the design of a digital system are: (1) AND (2) OR (3) NOT (4) NAND (5) NOR and EXCLUSIVE OR. An electronic circuit which performs a logical operation is called a logic gate. Digital multiplexer A digital multiplexer has N inputs & only one output. By applying control signals any one input can be made, available at the output terminal. It‟s called data sector.  Combinational & Sequential Circuits There are two types of logic circuits, Combinational & Sequential. A combinational circuit is one in which the state of the O/P at any instant is entirely determined by the states of the I/P‟s at that time. Combinational circuits are those logic circuits whose operation can be completely des...

Web Accessibility

All Web pages are created in a standard format called hypertext markup language, or HTML for short. When you create or save a document as a web page, it is given a filename ending with .htm or .html, indicating that it is an HTML file. An HTML document actually contains nothing but plain text—images, sounds and other non-text elements are stored in separate files. You can look at the HTML code of any web page in your web browser : In Netscape Navigator, choose the View > Page Source command. In Internet Explorer, choose View > Source. The ATRC(Adaptive Technology Resource Centre) played an active consultation role in the design of an accessible HTML authoring tool. Recently, SoftQuad announced the release of version 4.0 of their HoTMetaL HTML authoring package. For the first time in a commercial HTML authoring tool, this package includes features to encourage and aid Web authors in the production of accessible HTML documents. The ATRC played an active consultation role in the...

Incorporating Horizontal Rule In HTML

Horizontal Rule (HR) : The HR element is a divider between sections of text; typically a full width horizontal rule or equivalent graphic. For example : <HR> <ADDRESS>February 8, 1995, CERN</ADDRESS> </BODY> Image (IMG) : The IMG element refers to an image or icon via a hyperlink. HTML user agents may process the value of the ALT attribute as an alternative to processing the image resource indicated by the SRC attribute. Attributes of the IMG element : ALIGN : Alignment of the image with respect to the text baseline. `TOP' specifies that the top of the image aligns with the tallest item on the line containing the image. `MIDDLE' specifies that the center of the image aligns with the baseline of the line containing the image. `BOTTOM' specifies that the bottom of the image aligns with the baseline of the line containing the image. ALT : Text to use in place of the referenced image resource, for example due to processing constraints or user pref...

Creating HTML Page

Elements are the basic structure for HTML markup. Elements have two basic properties: attributes and content. Each attribute and each element's content has certain restrictions that must be followed for an HTML document to be considered valid. An element usually has a start tag (e.g. <element-name>) and an end tag (e.g. </element-name>). The element's attributes are contained in the start tag and content is located between the tags (e.g. <element-name attribute="value">Content</element-name>). Some elements, such as <br>, do not have any content and must not have a closing tag. Listed below are several types of markup elements used in HTML. Structural markup describes the purpose of text.  For example, <h2>Golf</h2> establishes "Golf" as a second-level heading, which would be rendered in a browser in a manner similar to the "HTML markup" title at the start of this section. Structural markup does not den...

Understanding HTML

HTML, an abriviation of HyperText Markup Language, is the predominant markup language for web pages. It provides a means to describe the structure of text-based information in a document — by denoting certain text as links, headings, paragraphs, lists, and so on — and to supplement that text with interactive forms, embedded images, and other objects. HTML is written in the form of tags, surrounded by angle brackets. HTML can also describe, to some degree, the appearance and semantics of a document, and can include embedded scripting language code (such as JavaScript) which can affect the behavior of Web browsers and other HTML processors. Definition : The Hyper Text Markup Language (HTML) is a simple data format used to create hypertext documents that are portable from one platform to another. HTML documents are SGML documents with generic semantics that are appropriate for representing information from a wide range of domains. HTML is also often used to refer to content in speci...

List Of Subjects In Course 327- B. C. A. - Bachelor in Computer Applications Offered By St. Peter's University

Sr. No. Subject Name Syllabus Sem./Sess./Year 1 Language - I Not Available 1 2 English - I Not Available 1 3 Digital Computer Fundamentals Syllabus 1 4 Programming Language COBOL Syllabus 1 5 Allied – I Allied  Mathematics Syllabus 1 6 Practical – I Programming in COBOL Record Syllabus 1 7 System Analysis and Design Syllabus 2 8 Relational Data  Base Management System Syllabus 2 9 Programming Language C and Data Structure Syllabus 2 10 Object Oriented Programming with C++ Syllabus 2 11 Allied –II Management Accounting Syllabus 2 12 Practical – II Programming in C and C++ Using Data Syllabus 2 13 E-Commerce Syllabus 3 14 Operating System Syllabus 3 15 Programming Language VISUAL BASIC Syllabus 3 16 Programming Language JAVA and JAVA SCRIPT Syllabus 3 17 Practical – III Programming in VISUAL BASIC Record Syllabus 3 18 Practical – IV Programming in JAVA and JAVA SCRIPT Syllabus 3

Explained Embedded SQL

Embedded SQL is a method of combining the computing power of a programming language and the database manipulation capabilities of SQL. It allows programmers to embed SQL statements in programs written in C/C++, Fortran, COBOL, Pascal, etc. Embedded SQL statements are SQL statements written within application programming languages and preprocessed by a SQL preprocessor before the application program is compiled. There are two types of embedded SQL: static and dynamic. The SQL standard defines embedding of SQL as embedded SQL and the language in which SQL queries are embedded is referred to as the host language. A popular host language is C. The mixed C and embedded SQL is called Pro*C in Oracle and Sybase database management systems. Other embedded SQL precompilers are Pro*COBOL, Pro*FORTRAN, Pro*PL/I, Pro*Pascal, and SQL*Module (for Ada).

Distributed Databases is different from Centralized Databases

A database which resides all of its data centralized and on one machine or some machines which are connected together but looks one for the users looking from outside. And whoever wants to use data, he picks data from there and uses and saves again there. While Distributed databases can be defined as a collection of multiple, logically interrelated databases distributed over a computer network. And distributed database management system (DDBMS) manages the distributed databases and makes this distribution transparent to the user. All the database must be logically related that are managed by DDBMS (distributed database management system). The distributed databases are not just the ‗collection of files‘ stored individually at different network nodes. Rather to form DDBS (distributed databases) all the files should be logically related and there should be structures among those files. In the case of distributed databases, data must be physically distributed across the network nodes ot...

Centralized Databases

Centralized Databases A "centralized DBMS"is a DBMS where all the data within the database is stored on a single computer, usually the secondary storage device of the computer. In a centralized DBMS, as the number of transactions executing on the DBMS increases, performance of the DBMS significantly decreases and becomes a drain on the overall performance of the computer

Understanding different database

There is mainly 2 database   ORDBMS and OODBMS An Object-Relational Database (ORD) or Object-Relational Database Management System (ORDBMS) is a database management system similar to a relational database, but with an object-oriented database model: objects, classes and inheritance are directly supported in database schemas and in the query language. In addition, it supports extension of the data model with custom data-types and methods. One aim for this type of system is to bridge the gap between conceptual datamodeling techniques such as ERD and ORM, which often use classes and inheritance, and relational databases, which do not directly support them.