• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer
projectsgeek

ProjectsGeek

Download Mini projects with Source Code, Java projects with Source Codes

  • Home
  • Java Projects
  • C++ Projects
  • VB Projects
  • PHP projects
  • .Net Projects
  • NodeJs Projects
  • Android Projects
    • Project Ideas
      • Final Year Project Ideas
      • JSP Projects
  • Assignment Codes
    • Fundamentals of Programming Language
    • Software Design Laboratory
    • Data Structure and Files Lab
    • Computer Graphics Lab
    • Object Oriented Programming Lab
    • Assembly Codes
  • School Projects
  • Forum

ProjectsGeek

Design an applet that displays the string “Hello College Name” moving from left to right. When it reaches to right, it scrolls back to left.

July 1, 2012 by ProjectsGeek Leave a Comment

Assignment No 03


AIM:


A) Design an applet that displays the string “Hello AIT” moving from left to right. When it reaches to right, it scrolls back to left.


B) Design an applet that displays circle which grows outwards  (up to certain value) and finally it reduces to 0.


THEORY:


The abstract Windowing toolkit(AWT) is an API that is responsible for building the GUI. It is a part of JFC. Java programs are classified into two groups namely applications and applets. An applet is a dynamic and interactive program that can run inside a web page displayed by Java capable browser. This can be also executed using applet viewer application.

Some of the important tags used inside an applet .html file are


Major Applet activities are :


init() method gets called as soon as applet is started. Initialization of all variables, creation of objects, setting of parameters can be done in this method.  start() method is executed  after the init() method where the applet is started. stop() method is used to halt the running of an applet. destroy() method is used to free the memory occupied by the variables and objects initialized in the applet. Any cleaning up activity that needs to be performed can be done in this method. paint() method helps in drawing, writing and creating a colored background or an image onto the applet. It takes an argument, which is an instance of Graphics class. repaint() method is used in case an applet is to be repainted. The repaint() calls the update() method to clear the screen of any existing contents. The update() method in turn calls paint() method that then draws the contents of the current frame.


Methods in Graphics class are


g.drawBytes(byte[ ] data, int offset, int length, int x, int y)

g.drawChars(char[ ] data, int offset, int length, int x, int y)

g.drawString(String str, int x, int y)

g.drawLine( int x1, int y1, int x2, int y2)

g.drawRect( int x1, int y2, int width, int height)

g.fillRect( int x1, int y2, int width, int height)

g.drawRoundRect( int x1, int y2, int width, int height, int width1, int height1)

g.fillRoundRect( int x1, int y2, int width, int height, int width1, int height1)

g.drawOval( int x1, int y2, int width, int height)

g.fillOval( int x1, int y2, int width, int height)

g.draw3DRect( int x1, int y2, int width, int height, true/false)

g.drawPolygon( int xs[ ], int ys [ ] )

g.fillPolygon( int xs[ ], int ys [ ] )

g.drawArc(int x1, int y1, int width, int height, angle1, angle2)

g.fillArc(int x1, int y1, int width, int height, angle1, angle2)

g.drawImage(image img, int x, int y, int width, int height,  imageObserver)


Font class represents Fonts. Text can be written inside an applet using different fonts.

Constructor:

          Font f = new Font (string name, int style, int size);


Name: The logical name of the font.

Style: The style of the font as Font.BOLD, Font.ITALIC, Font.PLAIN

Size: The size of the font

For setting the font setFont(f) method present in a graphics class can be used.


Color class represents color. Color is represented as a combination of red, blue and green. Each component can have a number between 0 and 255. 0,0,0 is black and 255,255,255 is white.

Constructor:         

Color c = new Color(0,0,0);

Method:      

                   g.setColor( c)                 //can be used present in Graphics class.


Animation is the technique by which an object is moved on the screen. The object to be moved can be simple drawing or a complex image loaded from an image file. This object, in animation region is called a frame of animation.


CONCLUSION


Both applets are successfully implemented. 


PROGRAM CODE


import java.awt.*;
import java.applet.Applet;
public classmovingBall extends Applet implements Runnable {
Thread mythread = null;
int position =0;

public void start( )
{
mythread =new mythread (this); // this refers to current object
mythread.start( );
}

public void run( )
{
while(true)
{
for(position=o; position {
repaint();
try{ mythread.sleep(100); }
catch(InterruptedException e) { };
}
}
}

public void stop( )
{
mythread.stop( );
mythread=null;
}

public void paint(graphics g)
{
g.setColor(Color.gray);
g.fillOval(position,50,30,30);
g.setColor(Color.black);
g.fillOval(position+6,58,5,5);
g.drawLine(position,58,10,12);
}
}


Design an applet that displays the string “Hello College Name” moving from left to right. When it reaches to right, it scrolls back to left. 1

Download Code Here

Other Projects to Try:

  1. Java Applet Tutorial for Beginners
  2. Communication between applet and servlet Java Code
  3. How to convert String to int using Java
  4. To Perform various String Operation in Java
  5. Moving Balls mini project using Java Applet

Filed Under: Java Assignments

To Perform File Handling in Java

July 1, 2012 by ProjectsGeek Leave a Comment

                                      Assignment No 02

AIM: 


To perform file handling in Java. Take two filenames from user, check the file is present in c:\java folder, if not present, display the message “file not present” , else display the size and file name. Also display the file contents.

THEORY: 


Objects of the File class can be created using File Constructors.

Constructors:

File f1=new File(“c:/java/temp.txt “);
File f1 = new File( “c:/java”, “temp.txt “);
File f1 = new File( “java”, “temp.txt “);

Methods are : f.getName( );f.getPath( );f.getAbsolutPath( );f.getParent( );f.exists( ); f.isFile( ); f.isDirectory( );f.canRead( );f.canWrite( );f.lastModified( );f.length( );f.delete( ); f.renameTo(f1); f.list( ); f.mkdir( );

A stream is a path of communication between the source of information and the destination. Methods of InputStream/Reader are : read( );skip( );available( );close( );mark( );reset( ); Methods of OutputStream/ Writer are : write( );flush( );close( );

ByteArrayInputStream class uses a byte array as its input source.
ByteArrayInputStream b = new ByteArrayInputStream(buf [ ]);
ByteArrayOutputStream class implements a buffer, which can be used as an OutputStream
ByteArrayOutputStream o =new ByteArrayOutputStream( );

This creates a buffer of 32 bytes to store the data.
ByteArrayOutputStream o =new ByteArrayOutputStream( int );


RandomAccessFile class can be used for both input and output to a single file.

// rw for read & write mode while r for read only mode.

RandomAccessFile    rd = new RandomAccessFile (“      “,”rw”);

The seek ( ) method specifies the byte-offset from the beginning of the file.

Reader and write classes are used to read/write characters instead of bytes.

CONCLUSION:

File handling is successfully done in Java.



PROGRAM CODE



import java.io.*;
class prg {
public static void main( String arg [ ] ) throws IOException {
FileInputStream fi = new FileInputStream(“ “);
FileOutputStream fo = new FileOutputStream (“ “);
int size = fi.available( );
for( int i =0; i < size; i++ )
{
int m =fi.read( );
System.out.println( (char) m);
fo.write( m );
}
fo.close( );
fi.close( );
}

// using BuffredInputstream and BuffredOutputstream.
BuffredInputstream bi = new BuffredInputstream (fi);
BuffredOutputstream bo = new BuffredOutputStream( fo);
bo.flush( );

//using DataInputStream and DataOutputStream.
DataInputStream di = new DataInputStream( fi );
DataOutputStream do = new DataOutputStream( fo );

String line;
while( line =di.readLine( ) != null )
{
System.out.println(line);
do.writeBytes(line);
}

//using BufferedReader and BufferdWriter
BufferedReader br =new BufferedReader (new InputStreamReader (fi));
BufferedWriter bw =new BuffredOutputStream (new OutputStreamWriter (fo));

// using BuffredInputstream and BuffredOutputstream.
while (int a = System.in.read ()! = 13)
{
fo.write (a);
}

//using BufferedReader and DataOutputStream.
while (line=br.readLine! = null)
{
if (line. equals (“end”))
break;
else
{
String z;
do.writeBytes (z);
}
}

To Perform File Handling in Java 2

Download Code Here

Other Projects to Try:

  1. Socket programming in Java
  2. File Handling and IO Handling in Java Programming
  3. File Handling program using Java
  4. Implement Conflation Algorithm using File Handling in Java
  5. To Perform various String Operation in Java

Filed Under: Java Assignments

To Perform various String Operation in Java

July 1, 2012 by ProjectsGeek Leave a Comment

Assignment No 01

 

 AIM:

To perform String operations using java such as calculating length of string, lowercase and uppercase conversions, concatenation of strings, reverse the string etc. Accept the String from user.

THEORY:

 

Features Of Java

 

Java is an object-oriented, multi-threaded programming language developed by Sun Microsystems in 1991. Java Development Environment consists of Java complier and a Java interpreter. Java complier generates byte code instead of machine code and Java interpreter executes the Java program. The disadvantage of using byte code is the execution speed. In order to write Java program, an editor, a java complier and a java runtime Environment are needed.

 

The important features of java are

 

  • Simple and powerful
  • Secure and Portable
  • Robust
  • Multithreaded
  • Distributed and dynamic
  • Object-oriented

String Operations

 

A combination of characters is a string. Strings are instances of the class String. The addition operator(+) can be used to create and concate the strings.

 

String names[ ] ={“anand”, ”Rahul”, ”sachin”};

 

Calling the default constructor with no parameters can create an empty string.

 

String s= new String( );

 

In order to create a string initialized with characters, we need to pass an array of char to the constructor.

 

char chars [ ] ={‘a’, ’b’, ’c’);

 

String s= new String (chars);

 

System.out.println(s);

 

Some String methods are :

Method

 

Use

 

s.Length( )

 

Length of the string

 

s.charAt( index)

 

Character at a location given by index

 

s.equals(s1), s.equalsIgnoreCase(s1 )

 

An equality checking for two strings

 

s.compareTo(s1)

 

Result is negative, positive or zero depending on the lexicographical ordering

 

s.indexOf(char c), s.lastIndexOf(char c )

 

Returns the index or –1 if the character not found.

 

s.substring( )

 

Returns a new string object containing the required character set.

 

s.concat( )

 

Returns a new string object  with the concatenation done.

 

s.replace( )

 

Returns a new string object  with the replacement done.

 

s.toLowercase( ), s.toUpperCase( )

 

Returns a new string object with the

 

Lowercase case or uppercase change.

 

s.trim( )

 

Returns a new string object  with the white spaces removed from each end.

 

Strings represent fixed length character sequences and StringBuffer represents variable length character sequences.

 

StringBuffer sb=new StringBuffer(“abc”);

 

sb.append (“xyz”);

 

//the argument gets appended to the end of the current StringBuffer.

 

Casting is used to convert the value of an object or primitive type into another type. Conversion of primitive types cannot be done explicitly.

 

CONCLUSION

 

 

Various String operations such as calculating the length of the string, reverse the string, palindrome, concatenation of the string, finding the substring are successfully created.

 

 

PROGRAM

 

import java.io.*; 
public class Main {

    public Main() {
    }
    public static void main(String[] args) throws Exception{
        BufferedReader ss=new BufferedReader (new InputStreamReader(System.in));
        System.out.println("enter the desired string:\t");
        String str=ss.readLine(); 
        BufferedReader b= new BufferedReader(new InputStreamReader (System.in));
        int choice,temp;
        String c1,c2;
        do{
          System.out.println("select desired option:\n1.length \n2.character At.\n3.equality\n4.compare\n5.index of char.\n6.last index of char.\n7.substring\n8.concat\n9.replace\n10.to lowercase\n11.trim \n12. Reverse");
          choice=Integer.parseInt (b.readLine());
        switch(choice)
        {
            case 1:
                 System.out.println("String length is "+str.length()+"\n\n");
                 break;
            case 2:
                System.out.println("select index to determine character: ");
                temp=Integer.parseInt (b.readLine());
                System.out.println("CHARACTER AT INDEX " +temp+ " is "+ str.charAt(temp-1));
                break;
            case 3:
                System.out.println("ENTER SECOND STRING: ");
                String str2= ss.readLine();
                System.out.println("the condition that strings "+str+" and "+ str2+" are equal is: "+ str.equalsIgnoreCase(str2));
                break;
            case 4:
                System.out.println("ENTER SECOND STRING: ");
                str2= ss.readLine();
                temp=str.compareTo(str2);
                if(temp==0)
                    System.out.println("THE STRINGS ARE EQUAL ");
                else if(temp>0)
                    System.out.println("THE STRING "+str+" is greater than the string "+str2);
                else
                    System.out.println("THE STRING "+str2+" is greater than the string "+str);
                break;
            case 5:
                System.out.println("ENTER CHAR: ");
                str2=ss.readLine();
                System.out.println(str.indexOf(str2));
                break;
            case 6:
                System.out.println("ENTER CHAR: ");
                str2=ss.readLine();
                System.out.println(str.lastIndexOf(str2));
                break;
            case 7:
                System.out.println("ENTER SUBSTRINGs STARTING AND ENDING INDEX : ");
                int start=Integer.parseInt(ss.readLine());
                int end=Integer.parseInt(ss.readLine());
                System.out.println(str.substring(start,end));
                break;
            case 8:
                System.out.println("ENTER SECOND STRING: ");
                str2= ss.readLine();
                System.out.println(str.concat(str2));
                break;
            case 9:
                System.out.println("ENTER CHAR TO BE REPLACED: ");
                c1= ss.readLine();
                System.out.println("ENTER CHAR TO REPLACE: ");
                c2= ss.readLine();
                System.out.println(str.replace(c1,c2));
                break;
            case 10:
                System.out.println(str.toLowerCase());
                break;
            case 11:
                System.out.println(str.trim());
                break;
            case 12:
        StringBuffer sb = new StringBuffer(str);
        System.out.println(sb.reverse());
break;        
            default:
System.out.println(“Invalid Choice”);
        }
        }while(choice!=12);
    } 
}

 

To Perform various String Operation in Java 3
Download Code Here
 
 

Other Projects to Try:

  1. string operations such as Copy, Length, Reversing, Palindrome, Concatenation
  2. String Operations in C Program
  3. Implement using Socket Programming (TCP/UDP) in Java
  4. How to append two strings in PHP | Simple ways
  5. To Perform File Handling in Java

Filed Under: Software Development Tools Lab

Configuration of Static Routing Table and Routing Information Protocol (RIP) using Packet Tracer

June 6, 2012 by ProjectsGeek Leave a Comment


Year: B.E (Information Technology)

Subject: Advanced Computer Network – Lab (ACN)
    AIM:Configuration of Static Routing Table and Routing Information Protocol (RIP) using Packet     Tracer.

THEORY:
     Router:  Network router can be defined as network device with interfaces multiple networks whose task is to copy packets from one network to another usingthe routing tables stored in the memory.  Router utilizes one or more routing protocols( i.e RIP,BGP, OSPF. Routers also accept routes which are configured manually by a network administrator. Those routes can be called as static routes. The router use this information to make routing tables. The network router will then use these routing table to make decisions about which packets to copy to which of its interfaces. This process is known as routing.
    Router has four components: input ports, output ports, the routing processor and the switching fabric.
a)    Input port performs the physical and data link layer functions of the router. The bits are constructed from the received signal, packet is de-capsulated from the frame, errors are detected and corrected. The packet is ready to be forwarded by the network layer. Input ports has buffers (queues) to hold the packets before they are directed to the switching fabric.
b)    An output port performs the same function as the input port, but in the reverse order.
c)    Routing Processor: The destination address is used to find the address of the next hop. Routing processor searches routing tables.

     
    Switching Fabrics: It moves the packet from the input queue to the output queue. In the past, memory of the computer or a bus was used as the switching fabric. The simplest type of switching fabric is the crossbar switch which connects n inputs to n outputs in a grid, using electronics micro-switches at each cross point. 

Configuration of Static Routing Table and Routing Information Protocol (RIP) using Packet Tracer 4
                                                   Download Full Assignment 

Other Projects to Try:

  1. BE-IT Advanced Computer Networking Notes
  2. Detecting SNMP service on a network Final Year Project
  3. Computer Network Technology
  4. Active Source Routing Protocol Mobile Networks project
  5. Networking Projects for Computer Science

Filed Under: Uncategorized

Installation of NS-2 and Test network animation on Network Simulator2 (NS2).

June 6, 2012 by ProjectsGeek Leave a Comment


Year: B.E (Information Technology)

Subject: Advanced Computer Network – Lab (ACN)

AIM:Installation of NS2 and Test network Animation on Network Simulator (NS2).
  
THEORY:
NS2 is Known to be popular open source discrete event simulator for computer networks. It is often used by some researches to help evaluate the performance of these  protocols or validate analytical models. ns2 allows you to setup a computer network, consisting of nodes/routers and links. You can then send packets over the network using a variety of different protocols at different layers. You can use ns2, for example, if we have designed new protocol to replace  TCP. We can Use ns2 to  implement  new protocol and compare its performance issues to TCP. This will allows us to test ideas before trying real-world experiments.


Network simulator 2 (ns2) is  popular open source event simulator for computer networks. It is sometimes used by researches to evaluate the performance of new protocols or validate analytical models. ns2 allows you to setup a computer network, consisting of nodes/routers and links. You can then send data (packets) over the network using a variety of different protocols at different layers. You can use ns2, for example, if you have designed a new protocol to replace or augment TCP. You can use NS2 to implement your new protocol and compare its performance issues to TCP. This allows you to test ideas before trying real-world experiments. NS2 stands for Network Simulator. Used in the simulation of routing protocols and also for networking research. It can also used for wireless and wired networks. NS2 is build from C++ and Python. 

Installation of NS-2 and Test network animation on Network Simulator2 (NS2). 5

Download Full Assignment 

Other Projects to Try:

  1. Computer Network Technology
  2. BE-IT Advanced Computer Networking Notes
  3. Network security projects
  4. Configuration of Static Routing Table and Routing Information Protocol (RIP) using Packet Tracer
  5. Active Source Routing Protocol Mobile Networks project

Filed Under: Uncategorized

BE-IT Advanced Computer Networking Notes

June 3, 2012 by ProjectsGeek 1 Comment

Topics to be Covered :


Unit I
Requirements,  Networking principles, Network architecture,Network services and Layered architecture, Future
networks (Cable TV, Internet , ATM , Wireless – Bluetooth, Wi-Fi, Cell phone, Wi-Max).

BE-IT Advanced Computer Networking Notes 6
Download Now   



Unit II
Virtual circuits, small size packets , fixed size packets , integrated service, History, Challenges, ATM Network , IP over ATM, Ad-hoc networks Basic concepts, routing protocols.
Wireless networks: Wireless communication basics, wireless network protocols architecture, mobility management. 
Bluetooth (802.15.1),  Optical paths and networks ,  Optical Network: links, WDM system, Wi-Fi (802.11),Optical LANs , WiMAX (802.16) .

BE-IT Advanced Computer Networking Notes 6
Download Now   

Unit III
Control of networks: Objectives , methods of control,  Datagram and ATM ,Circuit Switched networks,
networks, Datagram and ATM networks ,Circuits Switched networks,  Mathematical background for control of networks like .

BE-IT Advanced Computer Networking Notes 6
Download Now   



Unit IV
Advanced Routing – I:
Routing architecture, , IP switching , Routing between peers (BGP) and Multi- Protocol
Label Switching , MPLS Architecture , related protocols, CIDR –Introduction, CIDR addressing, CIDR address blocks and Bit masks Traffic Engineering  , TE with MPLS, NAT and VPN (L2, L3, and Hybrid).

BE-IT Advanced Computer Networking Notes 6
Download Now   



Unit V
Advanced Routing – II:
Voice and Video over IP, RTP, RSVP, QoS , neighbor discovery, auto-configuration,  IPv6: Why IPv6, basic protocol, extensions and options, routing. Changes to other protocols,Support for QoS, security, etc. Application Programming Interface for IPv6.
Mobile IP- characteristics, Mobile IP operation, Security related issues. Mobility in
networks.

BE-IT Advanced Computer Networking Notes 6
Download Now   



Unit VI
DoD Perspective on Mobile Ad Hoc Networks, Cluster-Based Networks, DSDV: Routing over a Multihop Wireless Network of Mobile Computers, DSR: Dynamic Source Routing Protocol for
Multihop Wireless Ad Hoc Networks .

BE-IT Advanced Computer Networking Notes 6
Download Now   

Other Projects to Try:

  1. Computer Network Technology
  2. Installation of NS-2 and Test network animation on Network Simulator2 (NS2).
  3. Active Source Routing Protocol Mobile Networks project
  4. Final Year Project-Multicast DNS Resolver project
  5. Configuration of Static Routing Table and Routing Information Protocol (RIP) using Packet Tracer

Filed Under: Uncategorized

  • « Go to Previous Page
  • Page 1
  • Interim pages omitted …
  • Page 98
  • Page 99
  • Page 100
  • Page 101
  • Page 102
  • Interim pages omitted …
  • Page 135
  • Go to Next Page »

Primary Sidebar

Tags

.Net Projects Download Android Project Ideas Android Projects Angular 2 Assembly Codes C # Projects C & C++ Projects C++ Projects Class Diagrams Computer Graphics Database Project Data Mining Projects DataScience Projects Datastructure Assignments Download Visual Basic Projects Electronics project Hadoop Projects Installation Guides Internet of Things Project IOS Projects Java Java Interview Questions Java Projects JavaScript JavaScript Projects java tutorial JSON JSP Projects Mechanical Projects Mongodb Networking Projects Node JS Projects OS Problems php Projects Placement Papers Project Ideas Python Projects seminar and presentation Struts

Search this Website


Footer

Download Java Project
Download Visual Basic Projects
Download .Net Projects
Download VB Projects
Download C++ Projects
Download NodeJs Projects
Download School Projects
Download School Projects
Ask Questions - Forum
Latest Projects Ideas
Assembly Codes
Datastructure Assignments
Computer Graphics Lab
Operating system Lab
australia-and-India-flag
  • Home
  • About me
  • Contact Form
  • Submit Your Work
  • Site Map
  • Privacy Policy