Showing posts with label lab. Show all posts
Showing posts with label lab. Show all posts

Saturday, 5 January 2013

CS2357 OOAD LAB Manual List Object Oriented Analysis and Design) - IT & CSE - VI Semester

To Download 6th sem ->CS2357 OOAD LAB SYLLABUS CLICK HERE

 
OBJECTIVE: To develop a mini-project following the 12 exercises listed below.


1. To develop a problem statement.
2. Develop an IEEE standard SRS document. Also develop risk management and
project plan (Gantt chart).
3. Identify Use Cases and develop the Use Case model.
4. Identify the business activities and develop an UML Activity diagram.
5. Identity the conceptual classes and develop a domain model with UML Class
diagram.
6. Using the identified scenarios find the interaction between objects and represent
them using UML Interaction diagrams.
7. Draw the State Chart diagram.
8. Identify the User Interface, Domain objects, and Technical services. Draw the
partial layered, logical architecture diagram with UML package diagram notation.
9. Implement the Technical services layer.
10. Implement the Domain objects layer.
11. Implement the User Interface layer.
12. Draw Component and Deployment diagrams.


 

CS2357 OOAD (Object Oriented Analysis and Design) - IT & CSE - VI Semester - Create a use case diagram in Rational Rose


How to use Create a use case diagram in Rational Rose
 
Click link below.

DEMO

Rational software

CS2357 OOAD (Object Oriented Analysis and Design) - IT & CSE - VI Semester - Create a class diagram in Rational Rose

How to  Create a class diagram in Rational Rose ?

Click link below.
DEMO
Rational software

CS2357 OOAD (Object Oriented Analysis and Design) - IT & CSE - VI Semester - Create a Sequence Diagram in Rational Rose

How to Create a Sequence Diagram in Rational Rose.

Click link below.

DEMO

Rational software

CS2357 OOAD (Object Oriented Analysis and Design) - IT & CSE - VI Semester - Create a Collaboration Diagram in Rational Rose

How to Draw a Sequence Diagram using Rational Rose-OOAD LAB

Click link below.

DEMO

Rational software

CS2357 OOAD (Object Oriented Analysis and Design) - IT & CSE - VI Semester - Create a State chart Diagram in Rational Rose

How to use UML Rational Software demo Flash..

Click link below.

DEMO

Rational software




IT2305 Java Programming Lab - B.Tech IT V Semester - Anna University Chennai




JAVA LAB VIVA QUESTIONS

 Object     :    Objects have states and behaviors. Example: A dog has states-color, name, breed as
     well as behaviors -wagging, barking, eating. An object is an instance of a class.
Class        :      A class can be defined as a template/ blue print that describe the behaviors/states  
        that object of its type suppor
Define overloading    :  Two methods may not have the same name and argument list but
different return types.
Output Statement    :      System.out.println(“”)
Input Statement         :       DataInputStream dis = new DataInputStream()
Define Inheritance         :
The properties( variable & methods)  inherited from various class the processes is known as inheritance
Key words:
extends, super class , base class
super class : the properties are inherited from this class
sub class / derived class : which class is inheriting  properties from  base class
Types :
a.       Single inheritance
b.      Multi level inheritance
c.       Hierarchical inheritance

Interface

Methods form the object's interface with the outside world; the buttons on the front of your television set, for example, are the interface between you and the electrical wiring on the other side of its plastic casing. You press the "power" button to turn the television on and off.

Package

              Collection of classes is known as package . A package is a namespace that organizes a set of related classes and interfaces. Conceptually you can think of packages as being similar to different folders on your computer.

Thread

A thread, in the context of Java, is the path followed when executing a program. All Java programs have at least one thread, known as the main thread, which is created by the JVM at the program’s start, when the main() method is invoked with the main thread. In Java, creating a thread is accomplished by implementing an interface and extending a class. Every Java thread is created and controlled by the java.lang.Thread class.

When a thread is created, it is assigned a priority. The thread with higher priority is executed first, followed by lower-priority threads. The JVM stops executing threads under either of the following conditions:
  • If the exit method has been invoked and authorized by the security manager.
  • All the daemon threads of the program have died.
Define Synchronization :
Threads communicate primarily by sharing access to fields and the objects reference fields refer to. This form of communication is extremely efficient, but makes two kinds of errors possible: thread interference and memory consistency errors. The tool needed to prevent these errors is synchronization.
Define RMI : 
  The Java Remote Method Invocation (RMI) system allows an object running in one Java virtual machine to invoke methods on an object running in another Java virtual machine. RMI provides for remote communication between programs written in the Java programming language.
Exceptions:
 The Java programming language uses exceptions to handle errors and other exceptional events. This lesson describes when and how to use exceptions.
Types of Exception :
 Arithmetic Exception()
Interrupted Exception()
Array IndexOutOfBound Exception()
StringIndexOutOfBound Exception()
ClassNotFoundException()
NegativeArraySizeException()
Description of program:
This program establishes the connection between MySQL database and java files with the help of various types of APIs interfaces and methods. If connection is established then it shows "Connected to the database" otherwise it will displays a message "Disconnected from database".
Connection:                   
This is an interface in  java.sql package that specifies connection with specific database like: MySQL, Ms-Access, Oracle etc and java files. The SQL statements are executed within the context of the Connection interface.
Class.forName(String driver):
This method is static. It attempts to load the class and returns class instance and takes string type value (driver) after that matches class with given string.
DriverManager:
It is a class of java.sql package that controls a set of JDBC drivers. Each driver has to be register with this class.
getConnection(String url, String userName, String password):
This method establishes a connection to specified database url. It takes three string types of arguments like: 
    url: - Database url where stored or created your database
  userName: - User name of MySQL
  password: -Password of MySQL 

con.close():
This method is used for disconnecting the connection. It frees all the resources occupied by the database.
printStackTrace():
The method is used to show error messages. If the connection is not established then exception is thrown and print the message.
Define JVM :
        Java Virual Machine
Define Byte Code:                                                                             
                          Interupted Code  ,Java Programs are Converted into Byte Code Before the Executable code.


Layout Manager:

   To arrange the components in Any particular order
 1.FlowLayout manager
 2.Border Layout Manager
 3.Grid Layout manager


Applet :

Applet is java program that can be embedded into HTML pages. Java applets runs on the java enables web browsers such as mozila and internet explorer. Applet is designed to run remotely on the client browser, so there are some restrictions on it. Applet can't access system resources on the local computer. Applets are used to make the web site more dynamic and entertaining. 
Advantages of Applet:
  • Applets are cross platform and can run on Windows, Mac OS and Linux platform
  • Applets can work all the version of Java Plugin
  • Applets runs in a sandbox, so the user does not need to trust the code, so it can work without security approval
  • Applets are supported by most web browsers
  • Applets are cached in most web browsers, so will be quick to load when returning to a web page
  • User can also have full access to the machine if user allows
Disadvantages of Java Applet:
  • Java plug-in is required to run applet
  • Java applet requires JVM so first time it takes significant startup time
  • If applet is not already cached in the machine, it will be downloaded from internet and will take time
  • Its difficult to desing and build good user interface in applets compared to HTML technology



DOWNLOAD AS WORD FILE




Wednesday, 26 December 2012

CS2308 System Software laboratory VIVA QUESTION with ANSWERs (PART 2)

ASSEMBLERS

1. Define the basic functions of assembler.
* Translating mnemonic operation codes to their machine language
equivalents.
* Assigning machine addresses to symbolic labels used by the
programmer.

2. What is meant by assembler directives? Give example.
These are the statements that are not translated into machine instructions, but they provide instructions to assembler itself.
example START,END,BYTE,WORD,RESW and RESB.
3. What are forward references?
It is a reference to a label that is defined later in a program.
Consider the statement
10 1000 STL RETADR
. . . .
. . . .
80 1036 RETADR RESW 1
The first instruction contains a forward reference RETADR. If we attempt to translate the program line by line, we will unable to process the statement in line10 because we do not know the address that will be assigned to RETADR .The address is assigned later(in line 80) in the program.

4. What are the three different records used in object program?
The header record, text record and the end record are the three different records used in object program.
The header record contains the program name, starting address and
length of the program.
Text record contains the translated instructions and data of the program.
End record marks the end of the object program and specifies the address in the program where execution is to begin.

5. What is the need of SYMTAB (symbol table) in assembler?
The symbol table includes the name and value for each symbol in the
source program, together with flags to indicate error conditions. Some times it may contain details about the data area. SYMTAB is usually organized as a hash table for efficiency of insertion and retrieval.

6. What is the need of OPTAB (operation code table) in assembler?
The operation code table contains the mnemonic operation code and its
machine language equivalent. Some assemblers it may also contain information about instruction format and length. OPTAB is usually organized as a hash table, with mnemonic operation code as the key.

7. What are the symbol defining statements generally used in assemblers?
* 'EQU'-it allows the programmer to define symbols and specify their
values directly. The general format is Symbol EQU value
* 'ORG'-it is used to indirectly assign values to symbols. When this
statement is encountered the assembler resets its location counter to the specified value. The general format is ORG value

In the above two statements value is a constant or an expression
involving constants and previously defined symbols.

8. Define relocatable program.
An object program that contains the information necessary to perform
required modification in the object code depends on the starting location of the program during load time is known as relocatable program.

9. Differentiate absolute expression and relative expression.
If the result of the expression is an absolute value (constant) then it is known as absolute expression.
Eg: BUFEND - BUFFER

If the result of the expression is relative to the beginning of the program then it is known as relative expression. label on instructions and data areas and references to the location counter values are relative terms.
Eg: BUFEND + BUFFER

10. Write the steps required to translate the source program to object program.
* Convert mnemonic operation codes to their machine language
equivalents.
* Convert symbolic operands to their equivalent machine addresses
* Build the machine instruction in the proper format.
* Convert the data constants specified in the source program into their internal machine representation
* Write the object program and assembly listing.

11. What is the use of the variable LOCCTR (location counter) in assembler?
This variable is used to assign addresses to the symbols. LOCCTR is
initialized to the beginning address specified in the START statement. After each source statement is processed the length of the assembled instruction or data area to be generated is added to LOCCTR and hence whenever we reach a label in the source program the current value of
LOCCTR gives the address associated with the label.
12. Define load and go assembler.
One pass assembler that generates their object code in memory for
immediate execution is known as load and go assembler. Here no object programmer is written out and hence no need for loader.

13. What are the two different types of jump statements used in MASM assembler?
* Near jump
A near jump is a jump to a target in the same segment and it is
assembled by using a current
code segment CS.
* Far jump
A far jump is a jump to a target in a different code segment and it is
assembled by using different segment registers .

14. What is the use of base register table in AIX assembler?
A base register table is used to remember which of the general purpose
registers are currently available as base registers and also the base addresses they contain.
.USING statement causes entry to the table and .DROP statement
removes the corresponding table entry.
15. Differentiate the assembler directives RESW and RESB.
RESW -It reserves the indicated number of words for data area.
Eg: 10 1003 THREE RESW 1
In this instruction one word area (3 bytes) is reserved for the symbol
THREE. If the memory is byte addressable then the address assigned for the next symbol is 1006.
RESB -It reserves the indicated number of bytes for data area.
Eg: 10 1008 INPUT RESB 1
In this instruction one byte area is reserved for the symbol INPUT .Hence the address assigned for the next symbol is 1009.

16. Define modification record and give its format.
This record contains the information about the modification in the object code during program relocation. the general format is Col 1 M
Col 2-7 Starting location of the address field to be modified relative to the beginning of the program
Col 8-9 length of the address field to be modified in half bytes.

17. Write down the pass numbers (PASS 1/ PASS 2) of the following activities that occur in a two pass assembler:
a. Object code generation
b. Literals added to literal table
c. Listing printed
d. Address location of local symbols
Answer:
a. Object code generation - PASS 2
b. Literals added to literal table - PASS 1
c. Listing printed - PASS2
d. Address location of local symbols - PASS1
18. What is meant by machine independent assembler features?
The assembler features that do not depend upon the machine
architecture are known as machine independent assembler features.
Eg: program blocks, Literals.

19. How the register to register instructions are translated in assembler?
In the case of register to register instructions the operand field contains the register name. During the translation first the object code is converted into its corresponding machine language equivalent with the help of OPTAB. Then the SYMTAB is searched for the
numeric equivalent of register and that value is inserted into the operand field.
Eg: 125 1036 RDREC CLEAR X B410
B4-macine equivalent of the opcode CLEAR
10-numeric equivalent of the register X.

20. What is meant by external references?
Assembler program can be divided into many sections known as control
sections and each control section can be loaded and relocated independently of the others. If the instruction in one control section need to refer instruction or data in another control section.the assembler is unable to process these references in normal way. Such
references between control are called external references.
21. Define control section.
A control section is a part of the program that maintains its identity after assembly; each control section can be loaded and relocated independently of the others. Control sections are most often used for subroutines. The major benefit of using control sections is to increase flexibility.

22. What is the difference between the assembler directive EXTREF and EXTDEF.
EXTDEF names external symbols that are defined in a particular control
section and may be used in other sections. EXTREF names external symbols that are referred in a particular control section and defined in another control section.

23. Give the general format of define record.
This record gives information about external symbols that are defined in a particular control section. The format is
Col 1 D
Col 2-7 name of external symbol defined in this control section
Col 8-13 relative address of the symbol with in this control section
Col 14-73 name and relative address for other external symbols.

24. Give the use of assembler directive CSECT and USE
CSECT - used to divide the program into many control sections
USE - used to divide the program in to many blocks called program blocks

25. What is the use of the assembler directive START?
The assembler directive START gives the name and starting address of
the program.
The format is
PN START 1000
Here
PN - Name of the program
1000 - Starting address of the program.


 MORE>>>

Back To Top