Programming
This page is opened for people who loves coding it's main purpose is educating high school students so that they will have good background in programming.
06/05/2017
Hi folks, its been a while huh...
We are here anyway, we will post new info soon
For the time being check out our new website (www.gizebits.com)
It's good to be back, take it easy.
Home | GizeBits Computing we give you the very best products and services qualifing standard testing criterias. we make sure products are up to the requirements of our clients.
Programming Challenge
Write a C++ program that tells whether a number is a perfect number or not.
A perfect number is a positive number which the sum of all positive divisors excluding that number.
for example 6 is perfect number since the divisor of 6 are 1,2 and 3. Sum of its divisor is
1+2+3=6
28 is also a perfect number since 1+2+4+7+14=28
Happy Coding
Have a nice day!!!
31/12/2015
HI folks today we will introduce about Servlets
Servlets are java technology's answer to common gateway interface(CGI) programming. They are basically programs that run on a web server acting as a middle layer between a request coming from web browser or other http client and databases or applications on the HTTP server.
Their job is to
Read any data sent by the user
Look up any other information about the request that is embedded in the HTTP request.
Generate the results. (this process may require talking to a DB involving RMI )
Format the results inside a document
set the appropriate HTTP response parameters(telling the browser what type of document is being returned)
Send the document back to the client (this document may be sent in text format), binary format (images)
Servlets Architecture
09/12/2015
Hi Folks today we will tell you about Remote Method Invocation
RMI (Remote Method Invocation) is a way that a programmer, using the Java programming language and development environment, can write object-oriented programming in which objects on different computers can interact in a distributed network. The object can include information that will change the service that is performed in the remote computer.
For example, when a user at a remote computer fills out an expense account, the Java program interacting with the user could communicate, using RMI, with a Java program in another computer that always had the latest policy about expense reporting. In reply, that program would send back an object and associated method information that would enable the remote computer program to screen the user's expense account data in a way that was consistent with the latest policy. The user and the company both would save time by catching mistakes early. Whenever the company policy changed, it would require a change to a program in only one computer.
Programming Challenge
Can a static function/method access non-static member variables of class? Please state your reason.
02/11/2015
How Many of you know about Object Serialization/Deserialization
Serialization is usually used When the need arises to send your data over network or stored in files. By data I mean objects and not text.
Java provides a mechanism, called object serialization where an object can be represented as a sequence of bytes that includes the object's data as well as information about the object's type and the types of data stored in the object.
After a serialized object has been written into a file, it can be read from the file and deserialized that is, the type information and bytes that represent the object and its data can be used to recreate the object in memory.
Most impressive is that the entire process is JVM independent, meaning an object can be serialized on one platform and deserialized on an entirely different platform.
Classes ObjectInputStream and ObjectOutputStream are high-level streams that contain the methods for serializing and deserializing an object.
Cheers
Hi folks, today we will see about Java Applets.
An applet is a Java program that runs in a Web browser. An applet can be a fully functional Java application because it has the entire Java API at its disposal. Java applets are programs that are designed to be embedded in an HTML document. Java applications are standalone programs. Java applications can be console programs that only support text output to the screen, or they can be windowed applications with a GUI.
There are some important differences between an applet and a standalone Java application, including the following:
• An applet is a Java class that extends the java.applet.Applet class.
• A main() method is not invoked on an applet, and an applet class will not define main().
• Applets are designed to be embedded within an HTML page.
• When a user views an HTML page that contains an applet, the code for the applet is downloaded to the user's machine.
• A JVM is required to view an applet. The JVM can be either a plug-in of the Web browser or a separate runtime environment.
• The JVM on the user's machine creates an instance of the applet class and invokes various methods during the applet's lifetime.
• Applets have strict security rules that are enforced by the Web browser. The security of an applet is often referred to as sandbox security, comparing the applet to a child playing in a sandbox with various rules that must be followed.
• Other classes that the applet needs can be downloaded in a single Java Archive (JAR) file.
Cheers Have a nice day!
hi guys, today we will tell you a little about Interfaces.
An interface is a reference type in Java, it is similar to class, it is a collection of abstract methods. A class implements an interface, thereby inheriting the abstract methods of the interface.
An interface is similar to a class in the following ways:
• An interface can contain any number of methods.
• An interface is written in a file with a .java extension, with the name of the interface matching the name of the file.
• The byte code of an interface appears in a .class file.
• Interfaces appear in packages, and their corresponding bytecode file must be in a directory structure that matches the package name.
However, an interface is different from a class in several ways, including:
• You cannot instantiate an interface.
• An interface does not contain any constructors.
• All of the methods in an interface are abstract.
• An interface cannot contain instance fields. The only fields that can appear in an interface must be declared both static and final.
• An interface is not extended by a class; it is implemented by a class.
• An interface can extend multiple interfaces.
12/10/2015
Hey Guys it is time for programming music
We code hard (https://www.youtube.com/watch?v=KC8lt--rEEo)
Enjoy.
Users .vs. Programmers
Users see computers as a set of tools- word processors, spreadsheet, map, etc.
Programmers learn the computer "ways" and the computer language.
Programmers have some tools that allow them to build new tools.
Programmers sometimes write tools for lots of users and sometimes programmers write little "helpers" for themselves to automate a task.
Constructor
A class constructor is a special member function of a class that is executed whenever we create new objects of that class.
A constructor will have exact same name as the class and it does not have any return type at all, not even void. Constructors can be very useful for setting initial values for certain member variables.
Destructor
A destructor is a special member function of a class that is executed whenever an object of it's class goes out of scope or whenever the delete expression is applied to a pointer to the object of that class.
A destructor will have exact same name as the class prefixed with a tilde (~) and it can neither return a value nor can it take any parameters. Destructor can be very useful for releasing resources before coming out of the program like closing files, releasing memories etc.
Click here to claim your Sponsored Listing.
Category
Telephone
Website
Address
Addis Ababa