Wednesday 4 March 2015

Diff between String,StringBuffer & Stringbuilder

String




String is immutable  ( once created can not be changed )object  . The object created as a String is stored in the  Constant String Pool  . 
Every immutable object in Java is thread safe ,that implies String is also thread safe . String can not be used by two threads simultaneously.
String  once assigned can not be changed.
String  demo = " hello " ;
// The above object is stored in constant string pool and its value can not be modified.

demo="Bye" ;     //new "Bye" string is created in constant pool and referenced by the demo variable            
 // "hello" string still exists in string constant pool and its value is not overrided but we lost reference to the  "hello"string  

StringBuffer


StringBuffer is mutable means one can change the value of the object . The object created through StringBuffer is stored in the heap . StringBuffer  has the same methods as the StringBuilder , but each method in StringBuffer is synchronizedthat is StringBuffer is thread safe . 
Due to this it does not allow  two threads to simultaneously access the same method . Each method can be accessed by one thread at a time .
But being thread safe has disadvantages too as the performance of the StringBuffer hits due to thread safe property . Thus  StringBuilder is faster than the StringBuffer when calling the same methods of each class.
StringBuffer value can be changed , it means it can be assigned to the new value . Nowadays its a most common interview question ,the differences between the above classes .
String Buffer can be converted to the string by using 
toString() method.
StringBuffer demo1 = new StringBuffer("Hello") ;
// The above object stored in heap and its value can be changed .
// Above statement is right as it modifies the value which is allowed in the StringBuffer

StringBuilder


StringBuilder  is same as the StringBuffer , that is it stores the object in heap and it can also be modified . The main difference between the StringBuffer and StringBuilder is that StringBuilder is also not thread safe. 
StringBuilder is fast as it is not thread safe .  

StringBuilder demo2= new StringBuilder("Hello");
// The above object too is stored in the heap and its value can be modified
demo2=new StringBuilder("Bye"); 
// Above statement is right as it modifies the value which is allowed in the StringBuilder.
 complete overview on above three.
----------------------------------------------------------------------------------
                                    String                    StringBuffer         StringBuilder
----------------------------------------------------------------------------------                 
Storage Area | Constant String Pool           Heap                       Heap 
Modifiable     |  No (immutable)            Yes( mutable )          Yes( mutable )
Thread Safe   |           Yes                                  Yes                              No
 Performance |         Fast                                Very slow                    Fast


demo1=new StringBuffer("Bye");

Tuesday 20 January 2015

Abstarct of Examination system

                                                                                                                                                              All systems in today’s world is being computerized, since there is no wonder that even the management of the examinations and  their related functions is being  computerized. Examination is core activity of any educational institution. In Colleges the examinations are carried in the semester method that takes place once in a six months.ThusExamination Management System automates the activities carried around the Examination processes. Examination Management System is software developed for the students who give exams in colleges and institutes. It facilitates to access the examination information of a particular student in a particular class. The information is sorted by the operators, which will be provided by the teacher for a particular class.

Purpose:-                                                        
                       The purpose of developing examination management system is to computerize the traditional way of taking exams.  Another purpose for developing this software is to generate the report automatically about the   seating arrangement and invigilator allocation  during exams at the end of the session or in the between of the session.
Existing  System:-
                       Current system is manual so all the record keeping is done manually.   So we cannot determine the sitting arrangement of student if updation is not done. So keeping in mind the above problems the new system will automate the manual system and will generate the sitting plan.  This system is efficient, fast and accurate in comparison to the manual system.The data objects of the system encompass the records of the students which include Semester wise and branch wise sitting arrangement during  the conduct of external exams.
 
DISADVANTAGES OF PRESENT WORKING SYSTEM:-
 
‡ Not User Friendly:-
                         The existing system is not user friendly because the retrieval of data is very slow and data is not maintained efficiently.
‡ Difficulty in report generation:-
                                                             We require more calculations to generate the report so it is generated at the end of the session. And the student not able to know in which class they will sit for exam.
 
‡ Manual control:-
                         All calculations for generating report are done manually which may lead to errors.
 
‡ Lots of paperwork:-
                                     Existing system requires lots of paper work. Loss of  even a single record can lead to difficult situation because all the papers are needed to generate the reports.
 
‡ Time consuming:-
                         Every work is done manually so we cannot generate report in the middle of the session or as per the requirement because it is very time consuming.
Proposed System:-
        Seating Arrangement details takes care of the seating  problem of the students those are being to write the examination.  This contains two separate modules, one for acknowledging the  details of the students being to write the exam and the other is to assign the students to the respective halls is a semiautomated  system. A separate option is given here such that a particular student’s Hall and examination for an approaching date can be viewed.
        students are allocated to each room based on     
        Constraint on set number
        Number of students per room
        Selection of department
        faculty are  allocated to each room based on
        Invigilation count
        Work burden.
        Experience.
 
  CHARECTERISTICS OF THE  PROPOSED SYSTEM:-
 
 User Friendly:-
                         The proposed system is user friendly because the retrieval  and storing of data is fast and data is maintained efficiently.
atractive GUI interface:-
                              Moreover thegraphical user interface is provided in the  proposed system, which provides user to deal with the system very easily.
 Reports are easily generated:-
                                                 Reports can be easily generated in the proposed system so user can generate the report as per the requirement (monthly) or in the middle of the session.
 Very less paper work: -
                                    The proposed system requires very less paper work. All the data is feted into the computer immediately and reports can be generated through computers. Moreover work becomes very easy because   there is no need to keep data on papers.
 Computer operator control:-
                                                 Computer operator control will be there so no chance of errors. Moreover storing and retrieving of information is easy. So work can be done speedily and in time.
Advantages:-
         less effort.
         Data Consistency.
         Better data Accessbility.
         less Man Power.