Top Banner
*APPLICATION OF LIMITS IN SOFTWARE ENGINEERING. Group members: *Moneeba Anwar. *Romaisa waheed. *aimal khan.
18
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Moneeba Anwar

*APPLICATION OF LIMITS IN SOFTWARE ENGINEERING.

Group members:*Moneeba Anwar.*Romaisa waheed.*aimal khan.

Page 2: Moneeba Anwar

KEY POINTS IN PRESENTATION limits in switch statement. limits in loops. limits in if else statement. limits in arrays. limits in classes. memory limits in windows. pc time limits and algorithm stability.

limits in over flow under flow .

Page 3: Moneeba Anwar

INTRODUCTION TO LIMITS.

definition:A point or a level beyond which something does not exceed .

0r limit of f(x) is such that x approaches a is l.

limitx->af(x)=l.

The limit of f(x) as x approaches a is L

Page 4: Moneeba Anwar

EXPLANATION OF LIMITS.

• The limit of the function shows the behavior of the function when the value in domain f(x) either become very small or very large.

• A limit describes the behavior of a dependent variable when its independent variable takes extreme values.

Page 5: Moneeba Anwar

EXAMPLES OF LIMITS.

• lets consider this function : y = 1/x. As you know, this typical function is not defined at x = 0 because the division by zero is not admitted in real numbers. Therefore we cannot compute the value of y when x = 0. However, we can observe how the function behaves near x = 0 : this is the concept of limit. Lets see how this function behaves when x approaches zero from the right: limx->0+ 1/x = infinity.

• we uses limit in speed as time approaches to zero .the formula is shown as

v t0 = distance /time.Which is called “instantaneous velocity” .

Page 6: Moneeba Anwar

+

Applications of limits

Page 7: Moneeba Anwar

LIMITS IN SWITCH STATEMENT.

• In switch we use cases which limitize the user to use either one of any case.

Page 8: Moneeba Anwar

A

so in this way we can use limits in switch statements to solve programing problems.

Page 9: Moneeba Anwar

LIMITS IN LOOP.• The use of limits in for loop• for(i=0;i<=10;i++)

{ cout<<“.”;}• It limitize the value of i to 10. Reaching

the 7th iteration the loop wont execute.

Page 10: Moneeba Anwar

LIMITS IN IF ELSE STATEMENT.IN IF ELSE STATEMENTS WE USE THE CODING IN SUCH A LIMITING MANNER THAT BEFORE THE EXECUTION THE COMPILER CHECKS THE

GIVEN LIMIT ACCORDING TO WHICH IT EXECUTES THE RELEVANT CODE.

Page 11: Moneeba Anwar

LIMITS IN ARRAYS.IN PROGRAMMING ARRAYS ALSO USES LIMITS.

THE LIMITS IN ARRAYS IS DECLARED AT THE TIME OF ITS DECLARATION.

THE ARRAY DO NOT EXCEPT ANY FURTHER VALUE THAT EXCEEDS ITS INDEX AND THE

COMPILER SHOWS IT AS AN ERROR .

Page 12: Moneeba Anwar

LIMITS IN CLASSES• In classes the data is classified in two types.”

• “Private data” and “public data”.

• The private data is limited for its access only for the data and all types of functions with in the class , no data from outside the class can access the private data.

• While public data and functions are accessible for all types of data inside as well as outside the class.

Page 13: Moneeba Anwar

MEMORY LIMITS IN WINDOWS.

• When building and running an application under Windows*, you need to be aware of the limitations on the size of code and data your program can declare and use. 

• 64-bit applications will not run on a 32-bit variant of Windows.

• This process happens according to the limited space which the window has occupied data types used in the application for example an integer can store up to “2 bytes” ,float “4 bytes” and char “1byte”.

Page 14: Moneeba Anwar

PC TIME LIMIT.

• By putting the time limit on pc you can prevent a child from excessive use of computer.

• PC Time Limit Pro, lets you specify when exactly and how long the computer can be used and define users which will be allowed to use the computer within that specific time limit.

Page 15: Moneeba Anwar

ALGORITHM STABILITY• A finite sequence of rules for performing computation in a computer such that at each instant the rules determine what a program has to do next.

• These rules include a “stopping rule” that makes the computer stop so it cannot run on indefinitely

• Stability:• An algorithm should be stable.that is small change in the initial data should give small change in the final result. If it doesn’t the program is unstable.

Page 16: Moneeba Anwar

OVER FLOW UNDER FLOW IN UNSIGNED

DATA TYPES• Underflow will cause the calculation result to zero and overflow will not be compiled by the compiler and it will show error messages.

• Following are the limitations of different unsigned data types .

• Integer “o” (min) , “2147483648” ( Max ).

• Char “0”(MIN) , “255” (MAX).

Page 17: Moneeba Anwar

EXAMPLE :-• Suppose we have 2 unsigned integer types each

of value of “2147483648 “

• “A“ and “b” and we add them a+ b = 4294967296 which is larger them the max limited value that can be represented by an unsigned integer .

• So this is called “integer overflow” .

• Now we see another example .

• Unsigned integer a , b ;

• A=0;

• B=a-1;

• The value of b is -1 which is below the minimum value that can be stored . So this is called “integer underflow”.

Page 18: Moneeba Anwar

The end…….!!!!