Bsc It 4th Sem Assignment Of Mortgage

On By In 1
 

1.Why is Java known as platform-neutral language & how is Java more secured than other languages?

Java Programming

contain no implementation – dependent aspects so the result of executinga series of 

 java

byte codes should always be the same no matter on what system they areexecuted.

Java

’s executable files are composed of byte codes that are instructions and datarelating to a hypothetical computer called

Java Virtual Machine

. This helps in executingprograms on any platform therefore it is known as

Platform Independent Language

.

2.

What is the task of the

main

method in a Java program?Link in

C

and

C++

environment the programs written in

Java

are executed with a call to

 main()

method. The

 main ()

method is guides the interpreter in determining the position fromwhich byte code should be interpreted. A program can contain any number of classes but one of them needs to contain the

main method

.3.List the eight basic data types used in Java. Give examples.The eight basics data types used in

Java

are

Integer, Floating point, Character and Booleanwhich are primitive and classes, Interfaces, Arrays

which are derived or non – primitive.

4.What is type casting? Why is it required in programming?The process of converting one data type to another is called

type casting

. If operations areneeded to be performed on two operands of different data types then type casting required.

5.

In what ways does a

switch

statement differ from an

if 

statement?

If 

statement uses the result of a conditional statement to enter the loop and executes all thestatements inside the loop whereas the

switch

statement uses the result of the conditionalstatement to jump to some location within the switch statement. The positions it can jump towhen the expression evaluates to the given constant are marked with case labels that take theform :

‘case constants’

. In the if statement all the statements inside the loop are executedwhere as on the switch statement only the resultant case labels are executed.6.Compare in terms of their functions, the following pairs of statements:a.While and do……….whileb.While and for c.Break and continue

a.

The

‘while’

loop contains a condition and a loop body. The control enters the looponly after the condition is evaluated and returns the result as true. Therefore the

‘while loop’

is called as the top – tested loop. Whereas in the

’do.. While’

loop, theloop is executed at least once regardless of whether the condition evaluates to trueor false. Only after the loop is executed once the condition is evaluated, thereforethe

‘do.. While’

is called as the bottom tested loop.Syntax :

while(test condition) do{{ loop bodybody of the loop; }} while(condition);

b.

The

‘while’

loop contains a condition and a loop body. The control enters the looponly after the condition is evaluated and it returns the result as true. Therefore the

‘while loop’

is called as the top – tested loop. The

‘for’

statement is used tomanage iterative actions as an efficient alternative to the while statement. The

‘for’

statement creates a loop in which a set of statements is repeatedly executed untilthe specified condition becomes false.Syntax :

while(test condition){body of the loop;

 

Solutions to Chapter One Questions1.

Why does a computer require an operating system?

Ans.

A computer requires an operating system to control the various hardware devices and manage its own resources. Theoperating system also allows users to create and manage files and run various applications. The operating systemperforms the following basic tasks:1.Peripheral Management2.Memory Management3.Process Management4.Filesystem Management5.Command Interpretation

2.

How is UNIX different from other operating systems?

Ans.

The differences between UNIX and other operating systems are:

UNIX is a multi-user operating system. Unlike DOS and Windows, a number of users canaccess the UNIX operating system simultaneously.

UNIX has better scalability than Windows OS.

UNIX is stable and can be operated continuously without being rebooted compared toWindows OS.

3.

What is the function of the UNIX kernel?

Ans.

The kernel, collection of programs written in C language, is the core of the UNIX operating system. The kernel managesthe hardware and the executing processes. The kernel acts as an interface between the applications and the systemhardware. The application programs communicate with the hardware by using the services of the kernel.

4.

What is the meaning of multitasking?

Ans.

A multitasking operating system allows a computer to run several programs at the same time. The multitasking operatingsystem divides the CPU time among various processes and gives an impression of doing many tasks at the same time.The concept of dividing CPU time is known as time-sharing.

5.

What is the importance of a user name and a password?

Ans.

A user needs to logon with the user name and password in order to start a UNIX session on a system. The user name,which is also known as login name or login, and the password are provided by the system administrator. If a user does nottype his user name and password or types them incorrect, the system does not starts the session..

Solutions to Chapter Two Questions1.

How are commands located in Unix?

Ans.

The commands can be located using the type command in Unix.

1

|

P a g e

0 comments

Leave a Reply

Your email address will not be published. Required fields are marked *