Tuesday 2 October 2012

Interactive Programming (OOP) In Java

Object Oriented Programming Language – Java


Object orientation means that everything in the program is an object.

Class - A class describes a particular kind of object. It can contain related methods and data members (variables). A class must have the same name as the file it is contained in.

Example 1:
public class myClass(){   // class name – same as file name
     //data members
     //constructors
     //methods
}


Example 2: Car is a class and object of this class can be a wheel or a seat etc.

Object - The principal code building block of Java programs. Each object in a program consists of both variables (data) and methods (functionality).

An object like a car is composed of methods, like driving, braking, opening and locking a door, yelling at you when your seatbelt's off, etc, and data like the colour, make, model, etc.

Difference between Class and object in Java

In Java, Class is a blue print used to create objects. In other words, a Class is a template that defines the methods (Functions) and Members (variables) to be included in a particular kind of Object.

Here, “Student” is a class. And “Jenna” is an object of the class “Student”. And “John” is another object of the class “Student”. A Class is a template for an object, a user-defined datatype that contains the variables and methods in it.

A class defines the abstract characteristics of a thing (object), including its characteristics (its attributes, fields or properties) and the thing’s behaviours (the things it can do, or methods, operations or features). That is, Class is a blue print used to create objects. In other words, each object is an instance of a class. One class can have multiple number of instances. (There can be Number of instances of the class “Student”, like “Jenna”, “John” etc).

A class is a predefined frame of an object, in which its mentioning what all variables and methods an object (object of that class) can have.
The methods (seen in the code as methodName()) contain actions, like openDoor(), drive(), and inside each method are instructions on how to do that.

Encapsulation

Encapsulation is one of the four fundamental OOP concepts. The other three are inheritance, polymorphism, and abstraction.

Encapsulation is the technique of making the fields in a class private and providing access to the fields via public methods. If a field is declared private, it cannot be accessed by anyone outside the class, thereby hiding the fields within the class. For this reason, encapsulation is also referred to as data hiding.
Encapsulation can be described as a protective barrier that prevents the code and data being randomly accessed by other code defined outside the class. Access to the data and code is tightly controlled by an interface.

The main benefit of encapsulation is the ability to modify our implemented code without breaking the code of others who use our code. With this feature Encapsulation gives maintainability, flexibility and extensibility to our code.

Abstraction

Abstraction means to show only the necessary details without including the background details. Class uses the concept of abstraction. Example of abstraction is class.

Simple words:
When we create the class we include methods inside the class which will perform some complex operations as per our requirements so whenever we would like to do those operations we simple call the methods by passing necessary arguments if required and it does all the work for us, now this we all know but this is abstraction.



Saturday 7 May 2011

Is your Internet Explorer running slow?

5 things you could try...

Is your surfing the internet slowing down or grinding to a halt? If so try our latest help article:
Is Internet Explorer slow? 5 things to try - Help & How-to- Microsoft Windows

Which covers:
  1. Upgrading to the latest version of Internet Explorer 8
  2. Resetting your Internet Explorer settings (Reset Internet Explorer 8 settings or Reset Internet Explorer 7 settings.)
  3. Checking your Internet connection (Windows 7, Windows Vista, Windows XP)
  4. Disabling add-ons in Internet Explorer
  5. And further Tips for solving problems with Internet Explorer.
Hope you find it useful

Monday 2 May 2011

How to download torrents without a torrent client?

You usually have to install a torrent client on your PC to download files shared with BitTorrent. You’ll do perfectly well without the client if you use BitLet.org.


BitLet.org is a web service that lets you download torrents without installing a torrent client in your computer. BitLet takes advantage of the Java Virtual Machine plugin for browsers to run a torrent client inside your browser.

Thursday 28 April 2011

Windows System Control Center (WSCC)

WSCC is a free, portable program that allows you to install, update, execute and organize the utilities from various system utility suites. WSCC is only an interface, you need to download and install the utilities separately. Alternatively, WSCC can use the http protocol to download and run the programs.


The included Update Manager can check for newer versions of the utilities already installed and can download and install the missing items.

Price: Free

Windows Access Panel (WAP) - Best Control Panel for Windows Vista and 7

The Control Panel for Windows Vista and 7 is so complex that it's difficult to find the controls or settings you are looking for. Often it requires multiple clicks to arrive at any tools. If you find the control panel a bit overwhelming, here is one program for you.


Windows Access Panel is a simple Control Panel for Windows Vista and 7 meant to minimise the trouble in accessing programs. Windows Access Panel displays shortcuts to commonly used tools of the control panel distributed into two sections - Basic and Advanced, though the demarcation between the two is pretty vague, almost random. As an example, “Group Policy Editor”, “Registry Editor” and “Computer Management” is under Basic, whereas petty tools like “Sound Recorder”, “Onscreen keyboard” and “Character map” is under Advanced.

Despite the odd grouping of the tools, WAP is very handy and will save you a couple of clicks. At present 48 programs are included in WAP.

NB.: Some functions may work with Windows XP and not all.

I hope you find this useful :)