java project on io simulator

Upload: soyeb-shaikh

Post on 03-Jun-2018

240 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/12/2019 Java Project on IO Simulator

    1/24

    Project Report OnIO Simulation

    This project demonstrates graphically how an the input and output in acomputer is processed internally using a conceptual diagram of acomputer.

    Java

    Developed ySoye! Shai"h#ishant Patel

    Department of $omputer Science%

    &aculty of Technology ' (ngineering

    )aharja Sayajirao *niversity

  • 8/12/2019 Java Project on IO Simulator

    2/24

    ACKNOWLEDGEMENT

    At this point, we would like to take this opportunity to express our sincere thanks and

    gratitude to all those who have guided us and motivated us to accomplish this project and

    makes it see the light of the day. This project wouldnt have been materialized without

    their help.

    irst and foremost we would like to thank Mrs. Mamta Padole who provided us the

    opportunity to work with the prestigious !.".#niversity, aculty of Technology $

    %ngineering and provided us all the facilities that helped us to complete our project.

    &e are again greatly thankful to !rs. Mamta Padole ,our internal guide, who gave us

    their valuable time, much needed advice, encouragement and moral support right from

    the conception to the maturity of this project.

    &e are thankful to all the staff members of Computer Engineering Department,

    Faculty of Technology & Engineering, the M.S.Uniersity for their valuable guidance

    at the right time which was 'uite useful in project work.

    Thanking you all.

    "oyeb "haikh

    (ishant )atel

  • 8/12/2019 Java Project on IO Simulator

    3/24

    Contents

    (o. *escription+. ntroduction

    +. ntroduction of "ystem

    -. *evelopment anguage

    /. eatures ncorporated in our )roject

    0. mportant )ackages and classes used to accomplish the project

    -. )roject )rofile

    / !odule *escription

    0 easibility "tudy

    a. Technical easibility

    b. %conomical easibility

    c. 1perational easibility

    2. 3%4#3%!%(T A(A5""

    a. 6ardware 3e'uirement

    b. "oftware 3e'uirement

    7. 8lass *iagram

    9. nterface :"creen "hots;

    ibliography

    +?. 8oding

  • 8/12/2019 Java Project on IO Simulator

    4/24

    Introduction to the System

    Project Summary

    The best way to understand a thing is by visualising how it works, this also applies for

    the 1 operation that takes place when we provide input to the computer or waiting for

    some result to be displayed. 1 functions internally and for a computer science students it

    is really important to know the internal working of the 1 !odule. To simplify the

    learning process and to make it more interesting we have come up with this simulation

    project.

    The project developed is a simulator that simulates how an 1 nstruction executes in acomputer internally and by showing the intermediate steps taking place before the data is

    processed to or from the external world.

    Pur!ose

    The main purpose of developing the system is to help the students learn the concepts of

    1 1perations and how they are handled by the processor.

    The best way to learn this process is by means of graphics and simulation does this job at

    its best by showing the real time functioning of processor and 1 ports.

    This is done by reducing the complexity and mapping the time constraint

  • 8/12/2019 Java Project on IO Simulator

    5/24

    "A#A

    @ )latform ndependent

    @ 1bject 1riented

    @ )rovides Awt and "wings for developing desktop application

    @ %asy

    P$at%orm Inde!endent

    A java source file is first compiled. The output of compilation is not an executable that would work only

    on the platform on which it is compiled, but it is the java byte code. The java byte is similar to an

    executable, and is that used by the java virtual machine. This java byte code can run on any platform for

    which the B! is available. At the run time, the java byte code is interpreted from B! instructions toplatformCspecific instructions and is executed by a B! interpreter.

    O&ject'Oriented

    (ow, lets look at the features of object oriented programming language.

    Data Enca!su$ation

    *ata encapsulation is the ability to hide the data structures used by a data type. 6ere, for instance, the

    florist uses a diary to maintain the list of addresses of florists in other towns. This diary is not accessible

    to other directly. &hat would happen if this diary were directly accessible to allD 6ere, the danger is not

    about the information being available to all from the diary, but there is a bigger danger since anyonewould also be able to make entries into this diary, and the diary would lose its meaning. nstead, if it is

    accessible to only the florist then the florist can always answer any 'ueries we have by looking up into

    the diary. n data encapsulation, the data structure is encapsulated by some code. The data structure is

    not directly accessible, but instead the data are accessed instance which would involve, invoking some

    code on the instance to fetch the data.

    %ach message re'uires some set of inputs :which may be empty;, thus defining a contract for using the

    message.

    Inheritance

    Again here we have more kinds of interaction with E F loristG, not simply because he is a EloristG,

    but because he is a shopkeeper. &e know, for example, that we will be asked for money as part of the

    transaction and in return for payment we will be given a receipt .i.e. he will be able to understand the

    message like Eaccept )aymentG and Eissue receiptG. These messages are understood by grocers,

    stationers, toy sellers and other shopkeepers. "ince the class EloristG is a more specialized form of the

    class E"hopkeeperG, all messages that can be given to shopkeeper can also be given to all florists.

    >ecause all florists are shop keepers, whatever is true of E"hopkeeperG is also true of EloristG and

    hence of E loristG.

    Po$ymor!hism

    &hat is polymorphismD There are many forms. There are different types of polymorphismH what we

    commonly understand in programming are overloading and overriding. &hat are the typical interactions

    with a plotterD A plotter would have interaction to draw various kinds of shapes. There would be an

    interaction to draw a circle, a message called draw8ircle. &hat will be the inputs given to the plotter in

  • 8/12/2019 Java Project on IO Simulator

    6/24

    order to draw a circleD The radius and the center point. "o, the draw8ircle message re'uires two inputs.

    (ow, we have another re'uirementH we have got three points in a plane, and there is uni'ue circle that

    passes through it. "o to ask the plotter to draw a circle we may have to compute the radius and center

    point of the circle from these three points and which can do the task of converting the three points into

    the raids and the center point and also support another way of using draw8ircle. t can support amessage, such that, if we give it interaction with the plotter for drawing a circleI we can either provide

    the radius and a center point or we may provide three points in a plane. This is overloading.

    Another form of polymorphism is found in case of overriding. 1verriding involves inheritance.

    1verriding is a case of exception to the general rule. n case of inheritance the subCclass inherits all the

    contracts of the superCclass. t even inherits the implements of the contracts. "ometimes there are cases

    where the subCclass wants to have a different implementation of the contract, compared to the

    implementation as available from the superCclass. This is where overriding of the contract is done. Also

    there is a concept of abstract data types, having abstract class. 6ere different subCclass will have

    different implementations of the same contract. The abstract method is being implemented in differentways by different subCclass, e.g. we have a class called "hape. This area method would be implemented

    differently for differently for different subCclass of the "hape, 3ectangle, Triangle, 8ircle, )entagon,

    6exagon and other subCclass of "hape each implementations of the area method for "hape in its various

    subCclasses.

    Provides Awt and Swings for developing desktop application:

    Easy

    ava is an easy programming language. t has syntax similar to c language. t has removed pointers and

    follows the object reference model. n case of java, the programmer does not have to bother about

    deallocation. *eallocation is taken care of by the garbage collector within the B!. ava is easy in

    terms of programming for network applications and multiCthreaded applications. An average java

    programmer can easily write network applications and even use multiCthreaded features in the B!,

    which is difficult in most of the other programming language. &riting multiCthreaded applications

    normally re'uires high skill and experience in other language.

  • 8/12/2019 Java Project on IO Simulator

    7/24

    (eatures o% ja)a incor!orated in the !roject

    Multithreading

    !"#ect !riented

    o Encapsulation

    o Polymorphism

    o $nheritance

    Synchroni%ation to resole concurrency issues

    aa Collection Frame'or(

  • 8/12/2019 Java Project on IO Simulator

    8/24

    Pac*a+es and c$asses used %or de)e$o!ment

    avax.swing

    o Applet

    o magecon

    o >utton

    o rame

    o

    )anel

    ava.awt

    o 8olor

    o Jraphics

    o Jraphics-*

    o 3endering6ints

    o mage

    o Toolkit

    o nsets

    ava.awt.event

    o Action%vent

    o Actionistener

    ava.awt.geom

    o AffineTransform

    o %llipse-*

  • 8/12/2019 Java Project on IO Simulator

    9/24

    ava.awt.image

    o >ufferedmage

    ava.util

    o Bector

    o !ap

    o *ate

    ava.swing.border

    o >order

    ava.net

    o #3

    ava.applet

    o Applet

    ava.text

    *ateormat

  • 8/12/2019 Java Project on IO Simulator

    10/24

  • 8/12/2019 Java Project on IO Simulator

    11/24

    , Project Pro%i$e

    )ame $! Simulation

    ront %nd Tool ava:"wing;

    1perating "ystem &indows K) and Above

    *ocumentation !icrosoft &ord -??9

    nternal Juide !rs. !amta )adole

  • 8/12/2019 Java Project on IO Simulator

    12/24

    - Modu$e Descri!tion

    ($o. Contro$ Modu$e

    n this module the control panel for the simulator is defined.

    This module defines how the flow of the simulation can be controlled or altered to an

    extent.

    Apart from controlling the flow of the simulation this module also includes the codesand specification to start, stop or pause the ongoing simulation.

    This module also has the feature to add more statement at runtime that will automatically

    added to the instruction 'ueue to be executed. 5ou can also remove the existing

    statement.

    Gra!hica$ Simu$ation

    The whole simulation is designed in a conceptual manner depicting the computer

    components connected to the external world via 1 nterface modules.

    The *iagram for the simulation is designed in third party software and then integrated in

    the ABA Applet.

    All the parts necessary to show how an 1 nstruction executes and how the processor

    sends and receives data to and from the external world is shown in the diagram.

    "imulation depicted in a graphical way makes it easy for the learner to comprehend.

    Lo+ica$ Simu$ation

    The simple looking simulation depicted in the graphic board is backed up by a strong

    logical module.

    Though both the module has the same task to perform but the logical module provides

    the base for the graphic module and even though they both are interconnected it lets them

    to be independent and the example for it is that the statement can be added and removed

    dynamically, the main reason to separate module was to not make the project hard coded.

    The graphical module just renders what is specified by the logical module.

  • 8/12/2019 Java Project on IO Simulator

    13/24

    / (EASI0ILIT1 ST2D1

    The %easi&i$ity study is needed to

    Answer the 'uestion whether a new system is to be installed or notD

    *etermine the potential of the existing system.

    mprove the existing system.

    Fnow what should be embedded in the new system.

    *efine the problems and objective involved in a project.

    Avoid costly repairs at a later stage when the system is implemented.

    Avoid crash implementation of a new system.

    Avoid the L6ardware Approach i.e. getting a computer first and then deciding how to

    use it.

    There are three aspects in feasibility study portion of the preliminary investigation.

    :+; Technical feasibility.

    :-; %conomic feasibility and

    :/; 1perational feasibility of the project.

    Technica$ (easi&i$ity

    Technical easibility determines whether the work for the project be done with the

    present e'uipment, current procedures, existing softwares technology and available

    personnelD

    f new technology is needed what alternatives will be needed in the present structure

    and work ethosD

    This will re'uire a close examination of the present system.

    The technical feasibility should ask 'uestions related toH

    +; Ade'uacy of available technology.

    -; Ade'uacy of hardware.

    /; Available of computer.

    0; 1perating time and support facilities, etc.

  • 8/12/2019 Java Project on IO Simulator

    14/24

    Technical feasibility determines whether the technology needed for the proposed system

    is available and how it can be integrated within the organization. Technical evaluation must also assess

    whether the existing system can be upgraded to use the new technology and whether the organization

    has the expertise to use it.

    The technical feasibility in the proposed system deals with the technology used in the

    system. t deals with the hardware and software used in the system whether they are of latest technology

    or not. t happens that after a system is prepared a new technology arises and the user wants the system

    based on that technology. Thus it is important to check the system to be technically feasible.

    The minimum memory re'uirement is -27!> of 3A! while +J> is better to have for

    better performance. As far as software is concerned, 1racle =i and ava should be installed on the server.

    There should be printer attached to the network for printing of >ills, purchase receipt, sales receipts and

    other reports.

    Economic feasibility

    %conomic feasibility looks at the financial aspects of the project. %conomic feasibility

    concerns with the returns from the investments in a project. t determines whether it is worthwhile to

    invest the money in the proposed system. t is not worthwhile spending a lot of money on a project for

    no returns.

    To carry out an economic feasibility for a system, it is necessary to place actual money

    value against any purchases or activities needed to implement the project.

    The organization plans to ac'uire the necessary hardware and software re'uires for the

    system and there is no hindrance whether economical or otherwise towards its purchase. A brief

    description of the hardware and software re'uired in the system is given later in the report.

    O!erationa$ %easi&i$ity

    1perational feasibility covers two aspects. 1ne is the technical performance aspect and

    other is the acceptance within the organization. 1perational feasibility determines how the proposed

    system will fit in the current operations and what, if any job restructuring and retraining may be needed

    to implement the system.

    n the system operational feasibility checks, whether the user who is going to use the

    system is able to work with the software with which the system is coded and also the mind of the user

    going to use the system. f the user does not understand or is able to work on the system further

    development is of waste.

  • 8/12/2019 Java Project on IO Simulator

    15/24

    / 3e4uirement Ana$ysis

    5ard.are re4uirements o% the system

    This phase of the software development process deals with a brief study of

    different hardware used in the computerized system. There is a list of hardware materials

    used during the making and also during the use of the proposed system. As the new

    system to be made into a computerized functional system, re'uirement of a computer is

    must. A list of the hardware re'uirement used in the system given belowH

    To run the application software of the system in the computer system in the

    minimum configuration re'uired is as belowH

    &indows K) or &indows 9

    -27 !> 3A!.

    +?C+- J> 6ardC*isk.

    0x compact *isc drive or faster.

    8olor !onitor.M7?? x

  • 8/12/2019 Java Project on IO Simulator

    16/24

  • 8/12/2019 Java Project on IO Simulator

    17/24

    6 C$ass Dia+ram

  • 8/12/2019 Java Project on IO Simulator

    18/24

    7 Screen Shots

    89Initia$ Screen

  • 8/12/2019 Java Project on IO Simulator

    19/24

    ,9A%ter E:ecution

    :etching nstruction *ata;

  • 8/12/2019 Java Project on IO Simulator

    20/24

    Mu$ti!$e IO De)ice Wor*in+ to+ether

  • 8/12/2019 Java Project on IO Simulator

    21/24

    Simu$taneous (unctionin+ o% Processor and IO Modu$e

  • 8/12/2019 Java Project on IO Simulator

    22/24

    ;< S1STEM TESTING"ystem testing is a critical process that can take as much as 2?O of the system

    development time. The common view of testing held by users is that it is performed to

    prove that there are no errors in a program. 6owever, as indicated earlier, this is virtually

    impossible, since the analyst cannot prove that software is free and clear of errors.

    Therefore, the most useful and practical approach is with the understanding that

    testing is the process of executing a program with the explicit intention of finding errors

    that is, making the program fail. The tester, who may be an analyst, a programmer, or a

    specialist trained in software testing, is actually trying to make a program fail. A

    successful test, then, is one that finds an error.

    Testin+ Strate+y

    There are few types of system testing listed belowH

    a. #nit Testing

    b. "ystem Testing

    c. )arallel Testing

    d. 8ode Testing

    e. 1utput Testing

    2nit Testin+

    n this testing individual program are checked to the extent of desired output i.e.

    program specification. &hile checking boundary condition, exceptional handling,

    error handling etc.

  • 8/12/2019 Java Project on IO Simulator

    23/24

    System Testin+

    These are used to test all programs, which together constitute the system. The

    system testing is conducted using synthetic data both valid and invalid transaction

    are used in this test.

    Para$$e$ Testin+

    n this both manual and computer based system are run simultaneously for a period

    of time and the result from the two systems are compared. This is good method for

    complex system. eeding test data carried out for system and data was subjected to

    various systems functioning.

    Code Testin+

    This strategy examines the logic of the program. To follow this testing method, the

    analyst develops test cases that result in executing every instruction in the program

    or module, that is, every path through the program is tested.

    E< Out!ut Testin+

    n this testing strategy check the output, if the output is generated by system is

    proper or not i.e. we get output what we want or not. This strategy is useful for

    checking reliability of system.

  • 8/12/2019 Java Project on IO Simulator

    24/24

    = 0i&$io+ra!hy

    0oo*s

    8omplete 3eference ava by 6erbert "childt

    We& 3esources

    httpHPPdocs.oracle.com

    httpHPPstackoverflow.com

    http://docs.oracle.com/http://stackoverflow.com/http://docs.oracle.com/http://stackoverflow.com/